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

Re: document function and counting

Subject: Re: document function and counting
From: tcn@xxxxxxxxxxxxx (Trevor Nash)
Date: Thu, 02 Aug 2001 09:30:14 GMT
Re:  document function and counting
>How about something like this?
>
><untested>
>...
><xsl:for-each select="document('foo-1.xml')//item |
>document('foo-2.xml')//item" >
>	<xsl:value-of select="position()" /> 
>	<xsl:copy-of select="." />
></xsl:for-each>
>...
></untested>
>
>Francis.
>
A case where testing would not guarantee a bulletproof answer!

The trouble is, for-each processes the nodes in 'document order'.
>From the spec:
"There are no constraints on how the implementation orders documents
other than that it must do so consistently: an implementation must
always use the same order for the same set of documents."

In other words a processor might decide to give you all the items from
foo-2 first.  I think the spec even lets the same processor give you
different answers on different runs, depending on how strongly you
take 'consistent'.  It could certainly be the case that it might base
the order on the URIs of the documents.

Pity, it is a nice idea.

Regards,
Trevor Nash 
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

 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.