|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] avoiding recursion
Hi,
I am converting a series of old msxsl2 scripts to xsl 1.0, or at least rewriting them with the originals as a guidline. The last script in the one I am working on at the moment is similar to this (in layout) <xsl:template match="*[@CHGLVL='1'][. != context(-2)] |
LIST/ITEM[@CHGLVL='1'][. != context(-3) |
PERS/REEQ[@CHGLVL='1'][. != context(-3) |
.... and so on for about 20 similar items... >
<span class="changed">
<img class="changebar" src="../images/bar.gif"/>
<xsl:apply-templates select="."/>
</span>
</xsl:template>Its fairly easy to see what it is doing but how can I do a similar thing in xsl 1.0? (ie without the 'context' function) there are about 20 named sections that it checks so putting that code everywhere else it needs to be would be excessive and obviously without the context() it will just infinitely recurse. any ideas how I can create the same effect? 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
|

Cart








