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

RE: Sequences: how to get them (eg in Saxon)?

Subject: RE: Sequences: how to get them (eg in Saxon)?
From: "Evan Lenz" <evan@xxxxxxxxxxxx>
Date: Mon, 29 Apr 2002 15:02:15 -0700
RE:  Sequences: how to get them (eg in Saxon)?
Mike Kay wrote:
> Node-sets in XPath 1.0 are replaced by node sequences; the difference is
> that a node sequence may be in any order, not necessarily document order.

Another significant difference to note is that sequences, unlike node-sets,
can contain the same node more than once.

The following expression returns one bar element and one foo element in a
document-order sequence (as with XPath 1.0, duplicates are removed):

(bar[1] | foo[1] | bar[1])

However, the following expression (using the new comma operator) returns a
sequence of the bar element followed by the foo element followed by the same
bar element again, in that order (regardless of their relative document
order):

(bar[1], foo[1], bar[1])

Hopefully, these examples clearly illustrate this characteristic of
sequences (if not its usefulness (and it is useful)).

Evan


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.