xsl-list
[Top] [All Lists]

formatting <xsl:number> for multi-level sections

2003-03-18 08:06:58

  i was looking at an example of numbering sections and 
subsections from tidwell's book, and for some sample XML code
involving <chapter>, <sect1>, <sect2> and so on, he shows
how to add multi-level numbering with a format of "1.1.1.1. ":

  <xsl:number level="multiple" count="chapter|sect1|sect2|sect3"
        format="1.1.1.1. "/>

  while the format nicely matches up with the fact that there
are four levels, isn't the format specification overkill?
it seems, from testing, that format="1. " would have worked
fine.  it seems that if more levels are needed than are
specified in the format attribute, the format is simply
padded further with whatever the last level format is.

  so if i had used format="1.A. ", i might have produced
numbering like
  
 1.
 1.A.
 1.B.
 1.B.A
 1.B.B

and so on.

  is this correct?  or is there something subtlely different
between "1. " and "1.1.1.1. "?  just being pedantic.

rday


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>