OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Custom numbering scheme for a DocBook document(legal style stylesheet)


> I assumed that dblatex creates labels using the code in labels.xsl. But this
> is wrong; the numbering of headings is controlled by the settings that apply
> to \chapter, \section, \subsection etc. in the generated LaTeX file.
> 
> I suppose that it is possible to customize the LaTeX numbering scheme to
> achieve what you want, but I cannot say much more than that.
> 
> Mauritz

I have made the following question in DocBook and XSL forums [1][2], but
they have told me that I have to ask it here, because I use dblatex
0.2.12-4 and so, the problem is that the document is converted to latex,
and then to PDF. Therefore, some changes in XSL are ignored
(specifically, those described in [2])

Any ideas? I explain myself below, and I attach an example.

So: I have to change the latex stylesheet necessarily to achieve the
expected result, described below.

[1]
http://lists.oasis-open.org/archives/docbook-apps/201010/msg00060.html
[2]
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201010/msg00203.html

--------- Mensaje reenviado --------
De: Néstor Amigo Cairo <nestor@aberi.org>
Para: xsl-list@lists.mulberrytech.com
Asunto: Customizing DocBook numbering scheme using XSL (legal style)
Fecha: Thu, 14 Oct 2010 10:57:39 +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.

-- 
Néstor Amigo -- www.aberi.org -- +34 687 967 481 (lu-vi, 9-13h)
Presidente de la Asociación por la Libertad de la Información

ejemplo.tar.bz2



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]