473,320 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Really impossible in XPath 1.0?

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
Jul 20 '05 #1
4 1182

"Soren Kuula" <do******@daimi.au.dk> wrote in message
news:d1**********@news.net.uni-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
Jul 20 '05 #2
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
Jul 20 '05 #3
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
Jul 20 '05 #4
| 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
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
5
by: Gnic | last post by:
Hi , I have an XmlDocument instance, I want to find a node in the xml, but I don't know it's path until runtime, for example <aaa> <bbb name="x"/> <aaa attr="y"> <ccc>sometext</ccc> </aaa>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.