xsl-list
[Top] [All Lists]

Re: Tricky inclusion match

2005-03-29 10:12:26
but I am faithful there is a very realistic 1.0
solution!
It should be possible with XSLT 1.0.. Possibly you
need to use node-set function also. You can judge from
the solution I posted how relatively easy it is with
XSLT 2.0 .. All the hard work is done by the
processor. 
 
So, let me ask the following question:
Use a variable to store the results of an
apply-templates rule.  The
result is a new element which might look something
like this:
<data>
  <value>1</value>
  <value>1</value>
</data>

How can I aggregate (sum) the above data element
which is stored in a variable?
You would need to use node-set function as..
sum(node-set($temp)/data/value) . XSLT 1.0 does'nt
allow to treat result tree fragments as "node sets"
(but XSLT 2.0 does) ; so in 1.0 we need to convert RTF
to node set using node-set function.. 

Regards,
Mukul

Karl




                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>