[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] position() error?
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] position() error? |
Date: |
Wed, 17 Jul 2002 10:20:42 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610 |
Marco Vezzoli wrote:
{--1--} for $task in document("project.xml")//task return
{--2--} $task/position()
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Maybe I didn't understand the proper use of position() but it looks like
an error.
I think so too. The support for position() is a bit ad hoc. The
support for last() is even worse, because it makes good performance
difficult.
It doesn't help that the XQuery documents are inconsistent as to the
semantics of position(). (Is it "lexically scoped", as implied by the
formal semantics, or "dynamically scoped", as implied by the other
documents? I haven't managed to get an answer on this fundamental
question.)
--
--Per Bothner
address@hidden http://www.bothner.com/per/