This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
AW: XML -> XML preserving CDATA
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: AW: [xsl] XML -> XML preserving CDATA
- From: "Roman Heinz" <rheinz at icteam dot de>
- Date: Wed, 12 Sep 2001 13:21:41 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Von: Christopher R. Maden [mailto:crism@maden.org]
> Gesendet: Mittwoch, 12. September 2001 11:35
> An: xsl-list@lists.mulberrytech.com
> Betreff: Re: [xsl] XML -> XML preserving CDATA
>
> ><foo><![CDATA[ Chic&Apart ]]></foo>
> ><bar><![CDATA[ 99 < 100 ]]></bar>
> >
> >Should pass the transformation untouched and shoud not result in
> >
> ><foo>Chic&Apart</foo>
> ><bar>99 < 100</bar>
> >
> >which would be obviously invalid input for further processing.
>
> No XSLT engine should do that, either. What you're most like
> to get is
>
> <foo> Chic&Apart </foo>
> <bar> 99 < 100 </bar>
Of cource you are are right at this.
My fault ().
> (note the spaces, which are part of those CDATA marked sections)
>
> This is valid input for further processing, and is exactly
> identical in
> everything except the syntax to your input document.
I agree.
But at the end of my processing, there may be some Java Application
receiving the Document as a String.
Using DOM, or SAX parsing at this point would give me the desired
result, but when I want to do
a simple task without parsing, using String manipulation, I see escaped
data in the String.
regards,
Roman
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list