System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 19, position 190. at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.Xsl.Xslt.XsltInput.ReadTextNodes() at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling() at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content, InstructionFlags flags) at System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate(NsDecl stylesheetNsList) at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet() at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument() at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
System.Xml.Xsl.XslLoadException: The '=' character, hexadecimal value 0x3D, cannot be included in a name. An error occurred at E:\inetpub\wwwroot\GTCC\gtcc.edu\xslt\635221875670388992_temp.xslt(21,9). at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Add value to end of hyperlink
I have a value that is displayed on a webpage using this line of code
<xsl:value-of select="NameOfCountry" disable-output-escaping="yes"/>
I would like to create a hyperlink which will have the above value at the end of the hyperlink
<a href="/country?ct={@NameOfCountry}"> Country </a>
but that doesnt work?
How should i be getting the NameofCOuntry in my hyperlink?
Thanks
It's been a while haven't written any XSLT but the below should be your answer:
Hi J,
The @ is used to retrieve attributes from an XML node, but your value is a child element, so you can just get rid of the @ sign:
/Chriztian
I have this iframe:
<iframe width="350" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.fastweb.com/displayed_widgets/6626?utm_source=scholarship_widget&utm_content=Guilford_Technical_CC_NC"></iframe>
and I'm getting this error:
Error occured
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 19, position 190.
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Xsl.Xslt.XsltInput.ReadTextNodes()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content, InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate(NsDecl stylesheetNsList)
at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet()
at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument()
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
How can I make this to work?
Hi Maritza,
The thing that gives you problems with your iframe is the & in the url. You can use & to make the and sign.
This should give you the iframe.
Hope this helps,
/Dennis
Thank you Dennis !! :)
I love knowdlege!
I want to embed a google spreadsheet on my page - I'm creating an xslt file for my micro -
<xsl:element name ="iframe">
<xsl:attribute name="width=">
100%
</xsl:attribute>
<xsl:attribute name="height">
700
</xsl:attribute>
<xsl:attribute name="frameborder">
0
</xsl:attribute>
<xsl:attribute name="src">
https://docs.google.com/spreadsheet/pub?key=0Aq_kuPyd0mV1dFhpeTZCcFZRdjdrbm9HUm10MWlvMmc&output=html&widget=true
</xsl:attribute>
<xsl:attribute name="scrolling">
0
</xsl:attribute>
<xsl:attribute name="marginheight">
0
</xsl:attribute>
<xsl:attribute name="marginwidth">
0
</xsl:attribute>
</xsl:element>
This is the error:
System.Xml.Xsl.XslLoadException: The '=' character, hexadecimal value 0x3D, cannot be included in a name. An error occurred at E:\inetpub\wwwroot\GTCC\gtcc.edu\xslt\635221875670388992_temp.xslt(21,9).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I need help
Hi Maritza,
I have just spotted what gives your the error.
Try this one instead that shoud give you an iFrame.
The difference between your code and the code I have posted is in the width attribute. In your code you have an = inside the attribute name like this:
Hope this will help you.
/Dennis
Thank you Dennis
HIGH FIVE! :)
is working on a reply...