Hi,
I used node-set in conjunction with some exslt functions (math:max etc.)
to get this done. I have a question however about how node-set() works.
E.g., if I get a result fragment tree(by doing something like //a
meaning get all the elements that are needed), convert it to a
node-set() and then use it, and I do this 2-3 times for different
problem sets in say the same template, isn't there a lot of redunancy
going on?
Is there like a design pattern for doing multi-pass (I hope this is what
is called a multi-pass) transformations?
Harsh.
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Wednesday, October 10, 2007 4:18 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] More addition questions
I am using Xalan and XSLT 1.0 for the following
since xalan supports exslt:node-set I'd use that which will allow you to
use sum() on the numbers you have already generated.
<top>
<xsl:variable name="x">
what you have..
</xsl:variable>
<xsl:copy-of select="$x"/>
<sumOfAGroup>
<xsl:for-each
select="exslt:node-set($x)/top/sumsForEachElementByKeyMultipliedByPositi
on">
<sum><xsl:value-of select="sum(element)"/></sum>
</sumOfAGroup>
</xsl:for-each>
</top>
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--