[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] hierarchic counting in flat structures


Subject: Re: [xsl] hierarchic counting in flat structures
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 02 Nov 2012 13:06:00 +0000

How about

<xsl:number from="H3" level="any"/>

It's not the usual use case given for level="any", but I think it should work, provided that an H3 actually exists.

(It's a shame that it doesn't work with level="single": the from attribute would be a lot more useful if it were defined this way).



On 02/11/2012 11:26, Norbert Heidbrink wrote:
Hi folks,


[Michael Kay]:
Have you tried

<xsl:number from="H3"/>

I did. However, this yields the same result as a pure <xsl:number /> All the H4 of the document are counted, not just the ones that follow the latest H3.

(Using Saxon-HE 9.2.1.1J)


Best wishes, Norbert


Current Thread