Re: Question for implementors: XPath model and CDATA sections

 "So when you run an XPath against a DOM and
   return text as a DOM node, we return the
   _first_ such node in the contiguous text,
   whether it's Text or CDATASection. It is
   the caller's responsibility to check whether
   additional text follows, if that's relevant
   for your application."

and Xalan is right on that. They are following the DOM Level 3 Xpath
working draft:
The XPath model relies on the XML Information Set [XML Information set]
ands represents Character Information Items in a single logical text
node where DOM may have multiple fragmented Text nodes due to cdata
sections, entity references, etc. Instead of returning multiple nodes
where XPath sees a single logical text node, only the first non-empty
DOM Text or CDATASection node of any logical XPath text will be returned
in the node set.

You'll need to use the wholeText property, introduced in DOM Level 3
Core to retrieve the text. Or, in the meantime, look for the text


Received on Tuesday, 12 February 2002 11:53:25 UTC