[xsl] Customizing DocBook numbering scheme using XSL (legal style)

Subject: [xsl] Customizing DocBook numbering scheme using XSL (legal style)
From: Néstor Amigo Cairo <nestor@xxxxxxxxx>
Date: Thu, 14 Oct 2010 10:57:37 +0200
Hello,

I'm using dblatex v. 0.2.12-4 (GNU/Linux Ubuntu Lucid 10.04 64bit).

===

I'm trying to number DocBook document in the 'legal' (lawyer) style, to
say:

1 Chapter one
 Article 1. Article one
 Article 2. Article two
2 Chapter two
 Article 3. Article three (*not* 'one' again)
 Article 4. Article four (*not* 'two' again)

=

**I would just like to change <xsl:number> element to have the attribute
"level=any" on the title of a <section> element.**

===
I have used code from
http://www.dpawson.co.uk/xsl/sect2/N5758.html#d7876e154 (recommended
here, but simplified)

===
  <xsl:template match="sect1">
      <xsl:number level="any" from="chapter" format="1. "/>
      <xsl:apply-templates/>
  </xsl:template>
===

I have carefully read the documentation, and I understand how XSL works.
I have tried many different solutions, from different sites, but I have
got no positive results.

I have read on the book that XSL works with parameters, so I have tried
also the following (no positive result):

<xsl:param name="section.number.level">any</xsl:param>

and

<xsl:param name="section.title.number.level">any</xsl:param>

But I am stuck because I cannot change the element <xsl:number> without
having to rewrite a new template from scratch.

Any ideas? Thanks.

-- 
NC)stor Amigo Cairo -- www.aberi.org -- +34 687 967 481 (lu-vi, 9-13h)
Presidente de la AsociaciC3n por la Libertad de la InformaciC3n

Current Thread