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]

RE: merging of text-nodes and CDATA


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]