Really impossible in XPath 1.0?

Discussion in 'XML' started by Soren Kuula, Mar 17, 2005.

  1. Soren Kuula

    Soren Kuula Guest

    Hi,

    In the XPath 2.0 requirements (http://www.w3.org/TR/xpath20req/), you
    see claims like:

    1. In XPath 1.0, the expression |5 > $ns| evaluates to true if |5| is
    greater than the |number()| value of at least one node in the
    |$ns| node set. There is no way to test whether |5| is greater
    than the |number()| values of all nodes in |$ns|.

    Is it really so ? What's wrong with 'not (5 < $ns)' ?

    (ok I could try in some XPath evaluator, but I might do it wrong, it
    might have bugs, and in any case I would not get to know the reason for
    being right / wrong)

    Soren
     
    Soren Kuula, Mar 17, 2005
    #1
    1. Advertising

  2. "Soren Kuula" <> wrote in message
    news:d1cfir$bv2$-c.dk...
    > Hi,
    >
    > In the XPath 2.0 requirements (http://www.w3.org/TR/xpath20req/), you see
    > claims like:
    >
    > 1. In XPath 1.0, the expression |5 > $ns| evaluates to true if |5| is
    > greater than the |number()| value of at least one node in the
    > |$ns| node set. There is no way to test whether |5| is greater
    > than the |number()| values of all nodes in |$ns|.
    >
    > Is it really so ? What's wrong with 'not (5 < $ns)' ?


    Nothing. But it shoud be:

    not (5 <= $ns)

    Yes, this particular statement of the XPath 2.0 Requirements is not true.


    Cheers,
    Dimitre Novatchev
     
    Dimitre Novatchev, Mar 17, 2005
    #2
    1. Advertising

  3. Soren Kuula

    Soren Kuula Guest

    Dimitre Novatchev wrote:

    >>Is it really so ? What's wrong with 'not (5 < $ns)' ?
    >>
    >>

    >
    >Nothing. But it shoud be:
    >
    > not (5 <= $ns)
    >
    >
    >

    Oooops, yes.. <sick-excuses>You can't compare floating point values
    accurately anyway :)</sick-excuses>

    >Yes, this particular statement of the XPath 2.0 Requirements is not true.
    >
    >
    >

    Many of the others aren't either, then ..?

    Soren
     
    Soren Kuula, Mar 17, 2005
    #3
  4. Soren Kuula

    Soren Kuula Guest

    Soren Kuula wrote:

    >> Many of the others aren't either, then ..?

    >

    In fact, I see something funny about all of them ....

    1) We just got that falsified

    2) That the number() values of all in $ns1 are graeater than all the
    number() values in $ns2, means
    not (exists(node n in $n2, so that forall node m in $n1:
    number(n)>=number(m)))
    not($ns2 >= $ns1)

    3) not (5!=$ns)

    4) same as 2

    5) Huh? Any of the attributes with the same name, on the same element?
    And how many would that be, of not 1?
    Do they mean some namspace something?

    Maybe I should stick with XPath 1.0 :)

    Soren
     
    Soren Kuula, Mar 17, 2005
    #4
  5. Soren Kuula

    Soren Kuula Guest

    | 5) Huh? Any of the attributes with the same name, on the same element?
    And how many would that be, of not 1?

    Zzzzzzzzero, of course, I forgot. But that still doesn't give us a need
    for a mechanism for finding something in any attribute of the same name,
    under the same element.

    Soren
     
    Soren Kuula, Mar 17, 2005
    #5
    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. Amir
    Replies:
    3
    Views:
    599
  2. oldschool

    Is this really impossible??

    oldschool, Mar 4, 2005, in forum: Java
    Replies:
    6
    Views:
    381
    Paul van Rossem
    Mar 5, 2005
  3. nc
    Replies:
    1
    Views:
    502
    nice.guy.nige
    Feb 3, 2005
  4. Juha Nieminen
    Replies:
    3
    Views:
    1,156
    Juha Nieminen
    Feb 22, 2008
  5. Replies:
    5
    Views:
    261
    Michele Dondi
    Jun 30, 2006
Loading...

Share This Page