Subject: Re: [xsl] document function and counting From: tcn@xxxxxxxxxxxxx (Trevor Nash) Date: Thu, 02 Aug 2001 09:30:14 GMT |
>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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] document function and cou, Francis Norton | Thread | Re: [xsl] document function and cou, Francis Norton |
RE: [xsl] MSXML - Processing non st, Michael Kay | Date | RE: [xsl] [BUG] Resin XSL, Michael Kay |
Month |