Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Taylor 873 posts 2086 karma points
    Jul 06, 2011 @ 16:41
    Matt Taylor
    0

    MiniCart.xslt error "The '$' character..." after adding orderline

    I've created my own product document type that inherits the standard 'Product' document type so it has all the correct product properties plus a few extra I need.

    After adding the product to the order in my .Net user control with the following test code:

    TeaCommerce.Base.AddOrderLine(Node.GetCurrent().Id, 1);

    I get the following error: "The '$' character, hexadecimal value 0x24, cannot be included in a name." when the following line in MiniCart.xslt is executed:

    <xsl:variable name="order" select="teacommerce:GetOrderXml()" />

    Any ideas what this could mean?

     

    System.Xml.Xsl.XslTransformException was unhandled by user code
      Message=An error occurred during a call to extension function 'GetOrderXml'. See InnerException for a complete description of the error.
      Source=System.Data.SqlXml
      LineNumber=0
      LinePosition=0
      StackTrace:
           at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args)
           at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
           at System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in D:\Websites\5starfootballtickets\xslt\miniCart.xslt:line 17
           at System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
           at System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
           at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
           at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
           at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
           at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
           at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
           at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
           at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt)
           at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
      InnerException: System.Xml.XmlException
           Message=The '$' character, hexadecimal value 0x24, cannot be included in a name.
           Source=System.Xml
           LineNumber=0
           LinePosition=6
           StackTrace:
                at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
                at System.Xml.Linq.XName..ctor(XNamespace ns, String localName)
                at System.Xml.Linq.XNamespace.GetName(String localName)
                at System.Xml.Linq.XName.Get(String expandedName)
                at System.Xml.Linq.XName.op_Implicit(String expandedName)
                at TeaCommerce.Data.OrderProperty.GetXElement()
                at TeaCommerce.Data.OrderLine.<GetXElement>b__d(OrderLineProperty i)
                at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
                at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
                at System.Xml.Linq.XElement..ctor(XName name, Object content)
                at TeaCommerce.Data.OrderLine.GetXElement()
                at TeaCommerce.Data.Order.<GetXElement>b__68(OrderLine i)
                at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
                at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
                at System.Xml.Linq.XContainer.Add(Object content)
                at TeaCommerce.Data.Order.GetXElement()
                at TeaCommerce.Data.Order.GetXml()
                at TeaCommerce.Library.GetOrderXml()
           InnerException:

  • Anders Burla 2560 posts 8256 karma points
    Jul 06, 2011 @ 17:19
    Anders Burla
    0

    Hi Matt

    Is one of your product property alias's named with a $? Or do you have a $ other places that could be of interest to us?

  • Matt Taylor 873 posts 2086 karma points
    Jul 06, 2011 @ 17:27
    Matt Taylor
    0

    I was thinking along the same lines but I would never use a $ in the naming of anything. I've checked and it hasn't been used.

    It's a bit confusing and I wonder if the error message is a little misdirecting?

  • Anders Burla 2560 posts 8256 karma points
    Jul 06, 2011 @ 19:57
    Anders Burla
    0

    We found the bug and will fix it and upload new beta tomorrow

  • Matt Taylor 873 posts 2086 karma points
    Jul 07, 2011 @ 11:38
    Matt Taylor
    0

    Thanks, I've tried the new version and it works.

Please Sign in or register to post replies

Write your reply to:

Draft