Altova Mailing List Archives


RE: [xsl] merging of text-nodes and CDATA

From: "Michael Kay" <mhkay@------------>
To:
Date: 9/5/2001 8:38:00 AM
> 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

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.