[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: reccursive sum ?

Subject: Re: reccursive sum ?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 2 Mar 2004 13:59:08 GMT
ricaud matthieu
  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.