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

RE: merging of text-nodes and CDATA

Subject: RE: merging of text-nodes and CDATA
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 5 Sep 2001 17:34:43 +0100
merge the text nodes
> given the following XML fragment:
>
> <strval>
>   <![CDATA[bla ]]>
> </strval>
>
... My understanding is that the
> parser generates three text nodes:
> - one containing the first '\n' after <strval> and a couple of spaces,
> - one containing 'bla '
> - one with the closing '\n'
>

No, the parser doesn't generate three text nodes and then merge them. Well,
it might, but there is nothing anywhere that says it should.

Of course, it would be possible to change the XPath data model so that CDATA
boundaries are considered significant in delimiting the strings to be
considered as candidates for whitespace elimination; but if CDATA is to be
significant for that purpose, people would want it to be significant for
lots of other purposes, and you might as well go the whole way of adding
CDATA nodes to the model.

Mike Kay


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


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.