 |
 |
 |
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: [xsl] 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
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |