W3C home > Mailing lists > Public > www-dom-xpath@w3.org > May 2000

RE: Pulling together some threads ...

From: Aaron Skonnard <aarons@develop.com>
Date: Thu, 4 May 2000 23:52:54 -0600
To: <www-dom-xpath@w3.org>
> >
> > 3. It must allow XPath expressions to define some subset of an XML
> >    document, stream, or database and provide a way of iterating over
> >    or otherwise processing that subset.
> We need to say more here ... help me with some wording about XPath
> variables, functions, etc.

I would tighten the wording like this:

3. It must define the evaluation context for an XPath expression. In XPath,
the context consists of a context node, context position, context size,
variable bindings, function library, and namespace declarations. How each of
these map to this API must be clearly defined. For example, when I call
selectNodes what namespace declarations are part of the evaluation context?

4. It must allow XPath expressions to define Infoset subsets regardless of
the underlying DOM implementation (e.g., stream, DB, etc.) and it must be
possible to iterate over these subsets using standard DOM mechanisms (e.g.,
NodeList, NodeIterator, etc.).

FWIW, in terms of #3, I think the hardest thing to get right are the
variable bindings. As far as namespaces go, I think it's completely
acceptable to use the DOM's namespace declarations when evaluating XPath
expressions in this situation. I agree with Scott that in certain
environments (like XSLT), where XPath expressions live in other documents
than those being queried, the namespace prefixes are only meaningful within
the document where the expression lives. However, when applying an XPath
expression to a DOM node, there is no other document in play, so the
in-scope namespaces for the given node seems reasonable.


Received on Friday, 5 May 2000 05:29:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:43:07 UTC