W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > July 2001

will last() and position() be supported in xquery?

From: Per Bothner <per@bothner.com>
Date: 03 Jul 2001 11:41:34 -0700
To: www-xml-query-comments@w3.org
Cc: per@bothner.com
Message-ID: <m2bsn1ety9.fsf@kelso.bothner.com>
While I understand the list of builtin function will appear later,
I am rather curious about whether last() and position() will be
included.  I'm asking because the formal semantics of predicates
(as specified in doesn't seem to provide any way that
last() or position() can be implemented.  There is a concept of
"current node" but no concept of "context position" or "context
size".  There is a special feature to support indexing, but its
implementation uses a special re-writing (using the index
function) that is incompatible with implementing position or last.

If the intention *is* to allow position(), then it would seem
like a pointless complication to define things the way they
are defined.  Instead, E1[I] should be defined as E1[I==position()].
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/
Received on Tuesday, 3 July 2001 14:39:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:13 UTC