number level="multiple" count="chapter|sect1|sect2" format="I-A-i: "
File: Data.xml <?xml version="1.0"?> <book> <title>XSLT Topics</title> <chapter> <title>title 1</title> </chapter> <chapter> <title>title 2</title> </chapter> <chapter> <title>title 3</title> </chapter> <chapter> <title>title 4</title> </chapter> <chapter> <title>title 5</title> </chapter> <chapter> <title>title 6</title> </chapter> <chapter> <title>title 7</title> </chapter> </book> File: Transform.xslt <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="book"> <xsl:for-each select="."> <xsl:number level="multiple" count="chapter|sect1|sect2" format="I-A-i: "/> <xsl:value-of select="title"/> <xsl:text>
</xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet>