Re: Comparing and re-assigning variables.
Have you considered a two-pass approach, reading and sorting your information in the first step into an intermediate result tree and then chaining to a second step that can address your information in the new already-sorted intermediate as a source node tree?
Just a newbie question concerning this issue...
I have never tried putting a for-each inside a variable, but if that is possible in the specs, could you then not do something like:
<xsl:variable name="SorterList"> <xsl:for-each select="report-root/txns"> <xsl:sort select="cpmBI"/> <xsl:sort select="date"/> </xsl:variable>
<xsl:variable name="SortList2" select="document('')/xsl:stylesheet/xsl:template/xsl:variable[@name='SortList']/cpmMemBI"/>
Then loop trough SortList2 and get the values of the current and preceding cpmMemBI element?
I don't know if this is at all possible (and if the syntax should differ), but I think this would be easier than a two-pass solution.
Ragulf Pickaxe :)
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
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