xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] XML -> XML preserving CDATA


Subject: RE: [xsl] XML -> XML preserving CDATA
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2001 11:28:37 +0100

> My source XML can contain different (unknown) elements with CDATA
> sections,
> which should be copied preserving the CDATA sections untouched.
>
> How can this be done?
>

It can't; but it shouldn't matter. The XSLT/XPath specs take the view that
CDATA is purely an input convenience to save you having to escape special
characters; it doesn't affect the information content of a document. So

<foo><![CDATA[ Chic&Apart ]]></foo>

and

<foo> Chic&amp;Apart </foo>

are precisely equivalent. Most XSLT processors will output the latter, but
it shouldn't make any difference to subsequent users of the document which
they choose.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor