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

RE: [dom-xpath] Competing Proposals Proposal

From: Jonathan Marsh <jmarsh@microsoft.com>
Date: Mon, 8 May 2000 15:06:15 -0700
Message-ID: <116DFD732FA92E4D9B647C8EEF6DAF1015E1C7@red-pt-02.redmond.corp.microsoft.com>
To: www-dom-xpath@w3.org
> -----Original Message-----
> From: Scott Boag/CAM/Lotus [mailto:Scott_Boag@lotus.com]
> I would propose that we create three rough competing 
> proposals for a DOM
> XPath:
> 1) Ultra Minimal (e.g. Microsoft/Oracle selectNodes as they 
> exist today).

I'd be happy to work on option 1.  As a startng point I'll document
Microsoft's current state, and Oracle's to the best of my ability.

           document.setProperty("SelectionLanguage", language) [MSXML 2.6]
           document.setProperty("SelectionNamespaces", namespaces) [MSXML
  nodeList node.selectNodes(queryString) [MSXML 2.0 (IE5)]
  node     node.selectSingleNode(queryString) [MSXML 2.0 (IE5)]

- The SelectionLanguage property recognizes "XSL Pattern" and "XPath"; it
defaults to "XSL Pattern" for backward compatibility with IE5.
- The SelectionNamespaces namespace declaration string is in the form of a
string containing xmlns attributes, e.g. "xmlns:a='uri1' xmlns:b='uri2'".
If the result of wrapping this string with "<test " and "/>" is a
well-formed XML + namespaces document, the string is accepted.
- Expressions must evaluate to nodelists, otherwise error.
- selectSingleNode is equivalent to node.selectNodes(queryString).item(0).

My understanding of Oracle's current implementation (based solely on docs on
their website) is:

  nodeList node.selectNodes(queryString)
  node     node.selectSingleNode(queryString)
  node     node.selectSingleNode(queryString, NSResolver)
  object   node.valueOf(queryString)

- Behavior of selectNodes with no namespace declarations is unknown to me.
- The object returned can be a string, boolean, number, or nodeList,
depending upon the type of the expression result.
Received on Monday, 8 May 2000 18:08:01 UTC

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