Hi,
I can't seem to get a handle on how to set a counter or variable then then
output the results. I have a XML file (snippet) tagged like so:
Input:
<body>
<lev>
<hd>heading</hd>
<lev>
<hd>heading</hd>
<lev>
<hd>heading</hd>
<lev>
<hd>heading</hd>
</lev>
</lev>
</lev>
</lev>
</body>
How can I set a counter and insert the results in the <HD?> tag below?
Output:
<body>
<lev>
<hd1>heading</hd>
<lev>
<hd2>heading</hd>
<lev>
<hd3>heading</hd>
<lev>
<hd4>heading</hd>
</lev>
</lev>
</lev>
</lev>
</body>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="div">
<xsl:text
disable-output-escaping="yes"> <ParaStyle:div></xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="div">
<xsl:text
disable-output-escaping="yes"> <ParaStyle:div></xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="heading">
<xsl:text
disable-output-escaping="yes"> <ParaStyle:hd1></xsl:text>
<xsl:apply-templates/>
</xsl:template>
--~------------------------------------------------------------------
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>
--~--