Xpath and DOM

Leigh Dodds ldodds at ingenta.com
Fri Dec 17 09:50:22 GMT 1999


> Actually, I would have preferred to have a small set of
> query mechanism independent API in the DOM API.

You're right it would make sense to have it separate to 
the DOM.
 
> Here is a string-based version:
> 
> interface DocumentQuery {
>   NodeIterator getQueryResult(String query);
> }
> 
> where query is prefixed with query type information such
> as "xpath:" or "xsql:".  API for plugging in new query
> engine is needed to support new query types.

Hmm, I'd suggest:

interface QueryFactory {

  DocumentQuery getDocumentQuery(String queryType);
}

And have the query type, "xpath" or "xsql" passed in to the 
factory method. Solves the plugging in of new query types, and 
avoids having to prepend the query string with "xpath:" or whatever.

L.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list