[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Effective boolean value is not defined for a seque

Subject: Re: Effective boolean value is not defined for a sequence of two or more items starting with a numeric value
From: "Vyacheslav Sedov" <vyacheslav.sedov@xxxxxxxxx>
Date: Tue, 15 Apr 2008 17:17:35 +0400
Re:  Effective boolean value is not defined for a seque
thanks for all,

very funny - look like Marklogic XML database engine can understand
syntax like sequence[1,3,5,7] - but since ML still support only draft
of XQuery 1.0 specification, i can suggest that this possibility was
initially present but then removed from final recommendation of XPath
2.0.

so, where can i see discussion about this part of specification? i am
sure that it was smart idea and have rational explanation - just need
to see logic chain (maybe i can meet some new nice ideas about this
theme).

With best wishes,
Slav

On Tue, Apr 15, 2008 at 3:54 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> On 15/04/2008, Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx> wrote:
>
>  >  <xsl:value-of select="string-join((tokenize($uri,'/')[1 to (last()-1)]), '/')"/>
>
>  Instead of  [1 to n] which is really just a sequence of numbers, you
>  really mean:
>
>  [position() = (1 to n)]
>
>  which will return true if the item of the left is equal to any item in
>  the sequence on the right.
>
>  As others have said, [position() = (1 to last() - 1)] is the same as
>  [position() ne last()]
>
>  ("ne" compares two atomic items, whereas != compares two sets so in
>  this case you know position() and last() are always going to be atomic
>  values so "ne" can be used)
>
>  It is intuitive though (to me at least), that a predicate containing
>  [1, 3, 5] would select the first , third and fifth items in the
>  sequence...
>
>
>  cheers
>  --
>  Andrew Welch
>  http://andrewjwelch.com
>  Kernow: http://kernowforsaxon.sf.net/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.