RE: Pulling together some threads ...

>
> >
> > 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.

-aaron

-aaron

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