[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Auto numbering Tips
Hello, in my document I use some tips and warnings, like <tip> <title> Tip- </title> <para> This the first example Tip. </para> </tip> <tip> <title> Tip- </title> <para> This the second example Tip. </para> </tip> same for warnings... My aim is to get the Tips and Warnings auto numbered. What means after compilation, the title should be set like Tip-01, Tip-02 etc. For that, I wrote a small template: <xsl:template match="tip/title"> <xsl:text>Tip-</xsl:text> <xsl:variable name="tipnr"> <xsl:number count="tip" level="any"/> </xsl:variable> <xsl:number value="$tipnr+-1" format="01"/> </xsl:template> It counts up, but it do not sets the title, it sets the firstline of the paragraph text. What am I doing wrong? Thanks in advance! The second step, that would be perfekt, if <tip> would be rewritten to <tip xml:id="tip-01">. Do you know how to do it? -Halm
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]