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






