Subject: Re: [xsl] reccursive sum ? From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 2 Mar 2004 13:59:08 GMT |
I don't see the link between concat id + ".xml" and the <xsl:value-of select="document($theFileName)..."/> $theFileName is not a node set, no ? That's right: if you use concat (or a xsl:variable with content) then $theFileName is only a string and so document() will only load one file, but if your attributes had the full file name then you could do document(ME/@id) and now the argument to document() _is_ a node set of all the id attributes of all your ME elements, and in that case document() loads _all_ of the referenced files in one go. assuming your processor has a node-set() extension (most do) then since you don't want to change your input you just need to go <xsl:variable name="addxml"> <xsl:for-each select="ME"> <ME id="{@id}.xml"/> </xsl:for-each> </xsl:variable> then select="count(document(saxon:node-set($addxml)/ME/@id)/ME/FOURN/DEVOIR"/> is the number you are after, if you are not using saxon replace saxon:node-set by your system's node set extension function. david -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] reccursive sum ?, Ricaud Matthieu | Thread | RE: [xsl] reccursive sum ?, Ricaud Matthieu |
RE: [xsl] reccursive sum ?, Ricaud Matthieu | Date | RE: [xsl] reccursive sum ?, Ricaud Matthieu |
Month |