W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > January to March 2002

RE: Question for implementors: XPath model and CDATA sections

From: Joe Kesselman <keshlam@alum.mit.edu>
Date: Tue, 12 Feb 2002 10:25:18 -0500
Message-ID: <3C6933DE.941EE7E@alum.mit.edu>
To: w3c-ietf-xmldsig@w3.org
Xalan's behavior when run against a DOM is essentially
identical (in this regard) to that of the proposed DOM XPath
API. You might want to review that, and the reasons behind
it, before deeming it wrong.

Basically: The DOM and XPath data models do not agree. A
single XPath text node may be made up of multiple DOM nodes,
due to CDATA Section markup and entity references and simple
history of how that DOM was constructed. If you ask XPath to
give you the location of an XPath text node within a DOM in
DOM terms, the best that can be done is to give you the node
in the DOM where that text starts, plus a convenience method
to retrieve the entire block of text.

Yes, we could return an aggregating pseudo-node -- but
that's less convenient for folks who actually want to use
the XPath to find a place in the DOM and then continue
operating on the DOM API and is really no cleaner.
Received on Tuesday, 12 February 2002 10:23:08 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.29 : Thursday, 13 January 2005 12:10:14 GMT