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]

copying CData sections from the source to destination documents


Hi,

Is it possible to copy an element and its contents from a source document to a
destination document exactly as it is contained in the source?

I have a stylesheet that alters xml documents through the addition and
alteration of data. One of the source document elements may contain a CData
section. I want this to be copied to the output document exactly as it is in
the input, with the CData section intact.

Currently I am copying a node and its descendants (including the descendant
with the CData section) using <xsl:copy-of select="."/>. The output from this
has been altered though to convert all invalid characters in the CData section
into entity references (i.e. &lt;), and it is no longer contained in a CData
section.

So, is there a way that I can specify that a node and its descendants should be
copied 'as is'?

Thanks
Richard.

-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


 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]