[xquery-talk] Re: position() and atomic values
Pierrick Brihaye
pierrick.brihaye at culture.gouv.fr
Wed Jul 6 14:24:03 PDT 2005
Hi,
Michael Kay <mhk at ...> writes:
> It's very hard to come up with plausible examples for using position()
> outside a predicate in XQuery
Indeed :-) The same for last() I presume. So... what make them different from
the other "Context Functions" (http://www.w3.org/TR/xpath-functions/#context) ?
let $a := ("a","b","","d")
for $b in $a
return
fn:current-dateTime()
... returns no error whereas...
let $a := ("a","b","","d")
for $b in $a
return
position()
...does.
> position(), like ., plays little role in FLWOR expressions because unlike
> xsl:for-each in XSLT, a "for" expression does not change the focus. Only "/"
> and "[]" change the focus in XQuery.
That's what I was missing... thank you for the clarification.
Cheers,
p.b.
More information about the talk
mailing list