This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSL Transformation of CDATA sections


["Clark, Jason]
>
> I have an xml file that I transforms into a new xml structure.  Within the
> input xml some elements have CDATA sections.  Is there a way to test if an
> element has a CDATA?  So the output xml will have the same.

This was already discussed on the list yesterday.  The simple answer is that
you cannot find out if an element has CDATA content.  That is because the
xml parser turns all the CDATA into regular character data - that's what the
CDATA section means - so when the xslt processor gets it, there is no longer
any indication of the origin of any characters, whether they came from
entities, CDATA or whatever.

If you are doing anything with normal xml processors, there is no need for
knowing which elements had contained CDATA sections.  Why do you think that
you need to know?

Cheers,

Tom P


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]