Re: Simple xPath. Specyfication lapse?

Discussion in 'XML' started by Martin Honnen, Apr 16, 2009.

  1. szomiz wrote:

    > Step 3.1: "child::para", context: <div i="2">
    > Result 1: <para i="5">
    >
    > Ups...


    XPath 1.0 expressions return unordered node-sets, see the introduction
    in the XPath 1.0 specification:
    "The primary syntactic construct in XPath is the expression. An
    expression matches the production Expr. An expression is evaluated to
    yield an object, which has one of the following four basic types:

    * node-set (an unordered collection of nodes without duplicates)

    "

    So in terms of the XPath 1.0 specification there is no order of the
    returned nodes.

    If you choose an implementation like MSXML that returns a DOM NodeList
    then that implementation has to choose an order. I think with MSXML the
    order is document order.

    --

    Martin Honnen
    http://msmvps.com/blogs/martin_honnen/
    Martin Honnen, Apr 16, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,951
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,364
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    504
  4. goog
    Replies:
    0
    Views:
    490
  5. Richard Tobin
    Replies:
    0
    Views:
    538
    Richard Tobin
    Apr 16, 2009
Loading...

Share This Page