This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Changing chapter title to include chapter id
- From: Paulo Eduardo Neves <pauloneves at gmail dot com>
- To: docbook list <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 10 May 2005 17:46:23 -0300
- Subject: [docbook-apps] Changing chapter title to include chapter id
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NJXpx49h7UQY/6wXAdsjR67yjE8TIGsb34n7GNuNKXzo/oIzmZO/NByFfBadbZ/UeAOoIqtON+lrToVugJqmwwENIN5R8HwC4hBszweNnZK4DVNKpeDA+UPro1rS62Wzw4/ILDZ+MWFOUz3PNWgtbGx3Fztif4tdckLQNujBOC0=
- Reply-to: Paulo Eduardo Neves <pauloneves at gmail dot com>
I'm using docbook to write use cases for a software application. I'm
trying to do some customizations, but I'm stucked.
The perfect customization would be in 3 steps:
1) Change "Chapter" to "Caso de Uso" (use case in Portuguese). Each
use case is written as a chapter.
2) Add the chapter to the chapter title. Since each Use Case have an
id, it'd be nice to use it as the chapter id. The references
would be a lot clearer, and
the doc generation would break if there's any duplicate id.
Example: <chapter id="uc330"><title>Do stuff</title> would become
Use Case uc330: "Do stuff"
3) This one isn't really necessary, but since we're in it, here it goes.
The rules above should
just be applied when the document has the subtitle "Use Case
Report" (the
xpath expression /book/bookinfo/subtitle[.='Use Case Report'] is true)
I'm stuck at 1). I did it following the instructions in
http://www.sagehill.net/docbookxsl/CustomXrefs.html#XrefGentext
I did:
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="pt_br">
<l:context name="title-numbered">
<l:template name="chapter"
text="Caso de Uso “%t”" />
</l:context>
</l:l10n>
</l:i18n>
There are so many configuration options that I'm still trying to grok
all this template processing. If anybody can point me in the right
direction, it would be a great help. Thanks in advance.
Regards,
--
Paulo Eduardo Neves
Agenda do Samba & Choro
http://www.samba-choro.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org