RE: [xsl] ACCESSING SPECIFIC CDATA FIELD

Subject: RE: [xsl] ACCESSING SPECIFIC CDATA FIELD
From: "Nick Fitzsimons" <nick@xxxxxxxxxxxxxx>
Date: Tue, 13 Dec 2005 18:01:05 -0000 (GMT)
>> > >        <etp id="200">
>> > >            <![CDATA[Trying accessing only this]]>
>> > >            <nvgs>
>>
>>   Maybe your parser makes a text node for "\n ", between the
>> 'etp' element and the CDATA section, and an other text node
>> for the cntent of the CDATA section itself.  I think it has
>> to merge all the text in 'etp' before the 'nvgs' element in
>> one single text node.
>
> I've heard of products that do that - especially if you supply the input
> as
> a DOM - but it's not conformant behaviour.
>
> Michael Kay
> http://www.saxonica.com/
>

The usual suspect:

"In most cases, the behavior of the MSXML processor conforms to white
space handling rules imposed by the XML and XSLT specifications.

"The following are exceptions.

"Adjacent text nodes are not treated as one node. Adjacent text nodes can
appear if:

"The user inserts them into the tree through the DOM API.

"CDATA sections border #PCDATA nodes."

... and more of the same, at:
<http://msdn.microsoft.com/library/en-us/xmlsdk/html/e8b00d48-e9f5-4a25-a650-71c284bb3f3a.asp>

-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/

Current Thread