[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)?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|