Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] document function and counting

From: tcn@------------- (------ ----)
To:
Date: 8/2/2001 1:56:00 AM
>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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent