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

RE: break or exit in xsl?

Subject: RE: break or exit in xsl?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 7 Mar 2005 13:08:39 -0000
RE:  break or exit in xsl?
> I wish to add something important.. There is something
> called "document order" - which is order of nodes in
> the original document(and it is fixed). In
> xsl:for-each the select attribute evaluates to a
> node-set. The XSLT 1.0 spec says (about select
> attribute of xsl:for-each).. "the nodes are processed
> in document order, unless a sorting specification is
> present"..

This statement is actually rather confusing, especially when quoted in this
particular context. It gives the impression that the specification requires
the processor to process the first node first, then the second node, and so
on. In fact this is not the intent. What it is really describing is a
mapping of an input sequence to an output sequence: the nodes obtained by
processing the first node in the input sequence come first in the output
sequence, followed by the nodes obtained by processing the second node in
the output sequence, and so on. So long as the order of the output sequence
corresponds in this way to the order of the input sequence, the nodes can
actually be processed in any order or in parallel. For example, you could
start by processing the last input node to generate the final output nodes,
then the second-last input node, and so on.

Michael Kay
http://www.saxonica.com/

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.