L
laredotornado
Hello, I am trying to decipher an XSL sheet that is not my own, and
yes, I'm a newbie.
<xsl:template match="sentence">
<xsl:variable name="lines" select="count(line) +
count(preceding::line)"/>
<xsl:copy>
<xsl:attribute name="sectionnumber"><xsl:value-of
select="floor($lines div 15) + 1"/></xsl:attribute>
<xsl:apply-templates/>
<br/>
</xsl:copy>
</xsl:template>
Is "count(line)" returning the count of all lines so far parsed in the
document, or does it have something to do with the "sentence" tag being
matched? Also, what does "preceding::line" mean?
Hey, thanks for all the advice, - Dave
yes, I'm a newbie.
<xsl:template match="sentence">
<xsl:variable name="lines" select="count(line) +
count(preceding::line)"/>
<xsl:copy>
<xsl:attribute name="sectionnumber"><xsl:value-of
select="floor($lines div 15) + 1"/></xsl:attribute>
<xsl:apply-templates/>
<br/>
</xsl:copy>
</xsl:template>
Is "count(line)" returning the count of all lines so far parsed in the
document, or does it have something to do with the "sentence" tag being
matched? Also, what does "preceding::line" mean?
Hey, thanks for all the advice, - Dave