Subject:Problems using '&' and '>' in C code generated using XML and XSL Author:Shahid Khan Date:08 Mar 2006 04:59 PM
Hi all,
I am new to XML and XSL(T) world.
I have a XSL stylesheet (AA.xslt) which takes as input an XML file (BB.xml) and generates code in C-language (DD.c).
I am trying to generate some code that involves '&' and '>' for pointer reference etc. But in my final DD.c file I get '&' and '>' instead of '&' and '>' signs.
So far I have tried:
1. <![CDATA[ ... ]]>
2. <xsl:text disable-output-escaping='yes'> ... </xsl:text>
3. A combination of both of the above.
4. Using the code : & for '&'
Subject:Problems using '&' and '>' in C code generated using XML and XSL Author:Minollo I. Date:08 Mar 2006 05:12 PM
What is your output method? If the output method is "text", as I would assume it is - as you are creating "C", specifying to disable escaping should avoid escaping &'s and >'s
You can change the output method in the "Params" tab of Stylus Studio XSLT editor, or by typing:
<xsl:output method="text"/>
...after the <xsl:stylesheet> element in yout XSLT.