[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [XSL] How to display special characters in a xsl:messa
Hello XSL List members,
I would like to display characters in a message (eq. through xsl:message) on the MS-DOS console such as : > (superior, ascii 0x3E) I tried that : XSL file : =================================================== <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="msg" select="'>'"/> <xsl:message><xsl:value-of select="$msg"/></xsl:message> <xsl:message><xsl:value-of disable-output-escaping="yes" select="$msg"/></xsl:message> <xsl:message><xsl:value-of disable-output-escaping="no" select="$msg"/></xsl:message> <xsl:message><xsl:text>></xsl:text></xsl:message> <xsl:message><xsl:text disable-output-escaping="yes">></xsl:text></xsl:message> <xsl:message><xsl:text disable-output-escaping="no">></xsl:text></xsl:message> <xsl:message><![CDATA[>]]></xsl:message> <xsl:variable name="msg2" select="'>'"/> <xsl:message><xsl:value-of select="$msg2"/></xsl:message> <xsl:message><xsl:value-of disable-output-escaping="yes" select="$msg2"/></xsl:message> <xsl:message><xsl:value-of disable-output-escaping="no" select="$msg2"/></xsl:message> <xsl:message><xsl:text>></xsl:text></xsl:message> <xsl:message><xsl:text disable-output-escaping="yes">></xsl:text></xsl:message> <xsl:message><xsl:text disable-output-escaping="no">></xsl:text></xsl:message> <xsl:message><![CDATA[>]]></xsl:message> </xsl:template> </xsl:stylesheet>
Xalan1.10 =================================================== XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) XSLT Message: > (...) ================================================== Although chapter 4.7 of XSLT2.0 norm says that disable-output-escaping is deprecated and not REQUIRED to be compliant, I would like to be able to have the character '>' in the strings output by xsl:message. Xalan looks right to me, as xsl:message are used for debug purpose, or to be nice to the user and tell him what's happening when things can be a little time consuming. So outputting a '>' through xsl:message has little chance of disrupting anything. Although I prefer Saxon method that displays only what is in the xsl:message (and no other string I didn't ask as Xalan does) I can't make it output a '>' But I can't stick with Xalan because I need XSLT2.0 features to generated my site. The XSLT2.0 norm does also says that the feature disable-output-escaping is deprecated has been replaced by character-map. But character-map looks "global" to me (it seams to apply at the xsl:output level), and I want this "no-escaping" only on some xsl:message, and not on my regular output which should be properly escaped when needed. For the same reason, I cannot make my output method="text" (which has better chances of not escaping!) because I need XHTML or HTML as regular output. Any idea of how to get '>' (or any character XSL will escape) on the MS-DOS console as xsl:message result with Saxon8.9 (without un-escaping '>' everywhere on my regular output) ? Regards.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|