[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Recursive substitution
I get bash-2.01$ xt a.xml a.xsl <PARAM name="tree" value="$depth 1| $depth 1| $$depth 2| $$depth 2| $depth 1| $depth 1| "/> which I think is what you want? from this <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" default-space="strip"> <xsl:template match="CGROUP" > <xsl:choose> <xsl:when test="ancestor(CGROUP)"><xsl:apply-templates/></xsl:when> <xsl:otherwise> <xsl:element name="PARAM"> <xsl:attribute name='name'>tree</xsl:attribute> <xsl:attribute name='value'><xsl:apply-templates/></xsl:attribute> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="CITEM" > <xsl:apply-templates mode="$" select="ancestor(CGROUP)" /> <xsl:apply-templates/> <xsl:text>| </xsl:text> </xsl:template> <xsl:template match="CGROUP" mode="$" >$<xsl:apply-templates mode="$" select="ancestor(CGROUP)" /> </xsl:template> </xsl:stylesheet> 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
|