W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

Re: Namespace resolver in DOM-XPath (suggests additional Node method in Core)

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Mon, 16 Jul 2001 11:56:31 -0400
To: "'www-dom@w3.org'" <www-dom@w3.org>
Message-ID: <OFC90D2328.241D5233-ON85256A8B.0056CEE4@pok.ibm.com>

The downsides of passing in a string:

1) You have to generate the string, then reparse it. Wasted work if the
data was already in an easier-to-retrieve form.

2) You have to build a complete list; you can't defer resolution and
compute it on demand. This too may impose additional costs. In use case B,
for example, you may have to walk the context-node's parents to gather
namespaces; a string requies you scan them all, whereas an API has the
option of looking back only as far as necessary for this query, and looking
farther at a later time if another query has not yet been resolved.

Abstracting this into a NamespaceResolver API leaves us room to consider
those issues.

 If someone wants to use a single string internally, that's fine. And
perhaps we should consider a factory that accepts such a string and returns
a NamespaceResolver with that content.  But I think nailing it down as only
a string would excessively constrain implementations.

______________________________________
Joe Kesselman  / IBM Research
Received on Monday, 16 July 2001 11:57:05 GMT

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