W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2005

DOM XPath: Who's responsible for merging text nodes? User or implementation?

From: Frans Englich <frans.englich@telia.com>
Date: Tue, 10 May 2005 01:36:08 +0000
To: www-dom@w3.org
Message-Id: <200505100136.09176.frans.englich@telia.com>


Hello,

Is the XPath implementation or the user of the implementation responsible for 
ensuring that no logically-adjacent text nodes exists? The specification[1] 
says this in section 1.2.4, Text Nodes:

"Applications using XPath in an environment with fragmented text nodes must 
manually gather the text of a single logical text node possibly from multiple 
nodes beginning with the first Text node or CDATASection node returned by the 
implementation."

I interpret that as the implementation can "expect" only separate text nodes 
to be exist, but that still leaves the a bit unsure sitation of when the user 
code simply is buggy; that the user forgets to manually merge text 
nodes(think web browsers).


Regards,

		Frans


Frans Englich
KDE Developer


1.
http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html#TextNodes
Received on Tuesday, 10 May 2005 01:26:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT