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]

RE: xsl:copy-of


> This does the job fine. Now I want to make my XSLT more
> generic so I don't
> have to specifically say that the "<BODY>" is a CDATA
> section. Basically I
> want an exact copy of the original document whatever the
> original document
> may be.

If you're saying, you want CDATA sections in the input to result in CDATA
sections in the output, you can't: the XML parser throws away the
information as to whether the input was CDATA before the XSLT transformer
gets to see it.

This is because in the XPath data model

<BODY><![CDATA[SomeData]]></BODY>

and

<BODY>SomeData</BODY>

are defined to be precisely equivalent: they are simply different ways of
writing the same thing.

Mike Kay


 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]