Subject: [xsl] preserving count function when adding template From: Tom Wern <twern@xxxxxxxxx> Date: Wed, 19 Apr 2006 12:13:47 -0400 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="node"> <div style="text-indent:{count(ancestor-or-self::node)*2}em"> <xsl:value-of select="name"/> </div> <br/> <xsl:apply-templates select="node"/> </xsl:template> </xsl:stylesheet>
<node> <id>123456789</id> <name>COMPANY ABC</name> <node> <id>456789123</id> <name>COMPANY<exist:match>XYZ</exist:match></name> </node> </node>
COMPANY ABC COMPANY XYZ
<xsl:template match="exist:match"> <span style="background-color: #FFFF00"> ??? </span> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANNOUNCE] Document XQuery wi, Stylus Studio | Thread | RE: [xsl] preserving count function, Michael Kay |
Re: [xsl] Matching the first text e, Wendell Piez | Date | RE: [xsl] preserving count function, Michael Kay |
Month |