Declaring and Using Variables

A variable in XSLT has more in common with a variable in algebra than with a variable in a typical programming language. It’s a name that represents a value and, within a particular application of a template, it will never represent any other value — it can’t be reset using anything described in the XSLTRecommendation. (Some XSLT processors offer a …

Declaring and Using Variables Read More »


Numbering The <xsl:number> element performs two functions: It evaluates a numeric expression and converts the result into a formatted string: <xsl:number value=”3″ format=”A. “/><xsl:number value=”count(listitem)” format=”01″/> It counts elements in the source tree and converst the result into a formatted string: <xsl:number count=”listitem” format=”i. “/> <xsl:number count=”chapter” from=”book” level=”any” format=”1. “/> <xsl:number count=”h1|h2|h3″ level=”multiple” from=”chapter|appendix” …

Numbering Read More »