[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: (newby) extraction of CDATA nodes to different XML

Subject: RE: (newby) extraction of CDATA nodes to different XML files
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 1 Apr 2005 10:28:28 +0100
extract cdata xsl
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:  (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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.