[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 11:15:40 GMT
Re:  reccursive sum ?
		<xsl:variable name="ThisMEid">
			<xsl:value-of select="@id"/>

don't use xsl:variable with content unless your really need that
you can just go
		<xsl:variable name="ThisMEid" select="@id"/>
which is more efficient and more flexible as teh variable then holds an
attribute rather than a result tree fragmment.
In this case you don't need a variable at all, just go
<xsl:with-param name="MEid" select="@id"/>

Similarly you don't need MEfile you can just go


If you could change your input to

	<ME id="0010.xml"/>
	<ME id="0045.xml"/>
	<ME id="0152.xml"/>

then you would not need teh concat above, just use


could use the following to get the total


But unfortunately using concat produces a string which stops document()
automatically taking the union of all the documents in the node set.

In XSLT1 the easiest way if you can not change your input format is
probably to do one pass into a variable that changes all the 
<ME id="0010"/> in to <ME id="0010.xml"/>
then use your processor's node-set() extension function to
apply templates to this new input as above.



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:

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.