[xquery-talk] string manipulation
John Snelson
jsnelson at sleepycat.com
Sun Feb 5 20:21:58 PST 2006
Ryan Grimm wrote:
>> Unfortunatley, the predicate "[1 to last() - 1]" will not work, since
>> the predicate only selects the node at the numeric position when given
>> an expression that returns a /single/ numeric value. "1 to last() - 1"
>> will return a sequence of numeric values.
>
> The behavior you are describing for the expression "1 to last() - 1" is
> exactly what I was looking for. Putting this type of expression inside
> of a predicate is something that I make heavy use of. However, it
> appears that it is something that not all xquery engines support. Doing
> this works perfectly well in Mark Logic but I just tested it using Saxon
> and it does not work there.
> I checked out the spec and I can't find mention of this feature being
> present but it makes for a very handy short form of subsequence().
The Mark Logic XQuery engine implements the May 2003 Working Draft of
XQuery, and a lot has changed since then. The expression we are talking
about is one of the things that has changed - the other XQuery engines
you talk about seem to be specification complient in this respect.
John
--
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com
Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml
More information about the talk
mailing list