< symbols in <xsl:text xmlns:xsl="#unknown"></xsl:text>
-
How do I generate a < symbol using xsl:text? I have the following:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>but this would generate an error, (unexpected token) If I use:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>the text that is generated is a < b what would I need to do to have a < b to be generated? thanks
-
How do I generate a < symbol using xsl:text? I have the following:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>but this would generate an error, (unexpected token) If I use:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>the text that is generated is a < b what would I need to do to have a < b to be generated? thanks
Hi! Hmmm... the last code example you provided works fine for me. But if you're sure you're doing everything else right, try changing your output type to HTML:
<xsl:output method="html"/>
Add this just below your xsl:stylesheet tag if you don't already have an output type, change it to "html" if you do. It could work but I can't replicate your problem so I have no way to be sure. Hope This Helps! MrWolfy :-D
-
How do I generate a < symbol using xsl:text? I have the following:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>but this would generate an error, (unexpected token) If I use:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>the text that is generated is a < b what would I need to do to have a < b to be generated? thanks
You can always use a
CDATA
section if the&
escape is causing problems.--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen
-
How do I generate a < symbol using xsl:text? I have the following:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>but this would generate an error, (unexpected token) If I use:
<xsl:text disable-output-escaping="yes">
a < b
</xsl:text>the text that is generated is a < b what would I need to do to have a < b to be generated? thanks
Just use entity references: < > and & It might be messy to go through an entire XML doc to convert values containing these special characters so, in the past, I used to just load the XML into a XML DOM object and then get it again - the DOM object does the conversion for you! (ignore the HTML tags in my sig - I turned off HTML so that the entity references show up) Erik Westermann - wWorkflow.net - BizTalk Consulting Services SOA * ESB * BPI * SaaS ... forget the alphabet soup - get the main course with our consulting services! wWorkflow.net or +1 416-809-1453