Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] (newby) extraction of CDATA nodes to different XML files

From: "Michael Kay" <mike@------------>
To:
Date: 4/1/2005 9:29:00 AM
Can't be done in XSLT: CDATA is not considered to be information-bearing in
the XPath data model. In other words,

<![CDATA[xyz]]>

is exactly the same content as

xyz

just as a="3" and a='3' are considered simply as two different ways of
writing the same thing.

If you have used CDATA in your source document to convey information that
needs to be retained, consider a textual transformation (e.g. in Perl) to
replace the CDATA delimiters by element start and end tags.

Michael Kay
http://www.saxonica.com/ 



> -----Original Message-----
> From: dalloro@xxxxxxxxx [mailto:dalloro@xxxxxxxxx] 
> Sent: 01 April 2005 10:03
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] (newby) extraction of CDATA nodes to different 
> XML files
> 
> Hi,
> 
> I need to extract the contents of three particular nodes in an XML
> file to three separate XMLs.
> The elements have the strange definition shown below:
> <![CDATA[   .....snip.....   ]]>
> 
> Whenever I encounter that type of construct I would like to extract
> the data that it contains to a separate XML.
> 
> Can you give some hints to solve this task?
> 
> Thank you very much.
> Best regards.
> 
> Livio


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent