|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: CDATA Handling
CDATA is treated by XSLT as an input convenience: the XSLT processor doesn't know that the data was entered using CDATA, any more than it knows whether you used the SHIFT key or CAPS LOCK. It's just a shortcut for data entry, not part of the information content of the document. This also explains why there is very weak support for producing CDATA on output. If your XML document design uses CDATA to convey information, then you need to think seriously about improving the design. If the receiving application only works if the data is enclosed in CDATA, then you need to think seriously about improving that application. If you can't do either of those things, then you are going to have to do some messy programming to generate the CDATA section. One way is to use cdata-section-elements on xsl:output as suggested already on this thread, another is to generate the CDATA start and end strings (<![CDATA[ and ]]>) using character maps or disable-output-escaping. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: J. S. Rawat [mailto:jrawat@xxxxxxxxxxxxxx] > Sent: 06 January 2009 05:56 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: CDATA Handling > > Hi, > Can anyone help let me about the handling of CDATA by XSLT > 2.0 (saxon). > > Input > <img.embed><![CDATA[R0lGODlhDQANAMQ0IAOw==]]></img.embed> > > Required output > <![CDATA[R0lGODlhDQANAMQ0IAOw==]]> > > Thanks > ...JSR
|
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
|






