This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: document function and counting
All I can say is it was late and I was tired and it looked plausible...
in other words I was being lazy and I knew it...
Thanks for straightening that out!
Francis.
Trevor Nash wrote:
>
> >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@melvaig.co.uk
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list