|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|

Cart








