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] customizing glossaries (as list, FO output)

Some answers below, prefaced by "BOB:".
Other answers may follow as time and research permit.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: Bergfrid Skaara
To: docbook-apps@lists.oasis-open.org
Sent: Monday, July 20, 2009 1:47 AM
Subject: [docbook-apps] customizing glossaries (as list, FO output)

Hi, I'm having multiple customiztion problems related to glossaries in FO

1. I've set the glossary.sort parameter to 1, but I would like space and
hypens to be ignored when sorting (so that you get ca, car, ca-range and not
ca, ca-range, car). I've looked at the normalize.sort.input and
normalize.sort.output gentext templates (en-US), but I can't see how
changing them will give the desired result.

2. In our standalone glossary, the root element is book, directly followed
by an info element and then the glossary itself (which has glossdivs and
xincludes from modular files). Now, the TOC contains one entry, "Glossary",
and the  PDF bookmarks are "Table of Contents" and "Glossary". I would like
to replace entries saying "Glossary" with a list of glossdivs (the title is
the letters a-z), is this possible?

BOB: TOC entries are generated by processing document nodes in mode="toc".
The default template in that mode for glossary just outputs the "Glossary"
line.  Customize this template:

<xsl:template match="bibliography|glossary"

so that it does xsl:apply-templates mode="toc" to its children, and then add
templates in that mode for the children.  If this is too brief an 
please ask for details.

3. Some glossentries have multiple glossdefs; is it possible to
automatically enumerate the glossdefs for such entries? If yes, which
templates must be overridden?

BOB: Customize this template from fo/glossary.xsl:

<xsl:template match="glossentry/glossdef" mode="glossary.as.list">

and possibly also this one if you want to use a nested fo:list-block for
multiple entries:

<xsl:template match="glossentry" mode="glossary.as.list">

The match="glossentry" template must generate the fo:list-block, and the
template for each glossdef should generate each fo:list-item.

4. Some time ago, I posted a message about modular glossaries in which we
replace the otherterm attributes with xlink:href attributes (sorry, I can't
find the post). The suggested customization (from Bob) was for glosseealso
elements. I've since then tried to use the same pattern for glossee
elements, and ran into problems with the "See" gentext". With glosseealso,
"See also" is correctly inserted at the beginning of the line before the
links, but with glossee I do not get the "See" gentext before the link.
Which template calls the gentext in these cases?

5. Is there an easy way to override text alignment just for glossaries? I've
currently copied the template matching d:glsosdiv in mode glossary.as.list
to add text-align parameter to teh fo:list-block . It would be nice if there
were something like the attribute set for indexes: index.entry.properties.

Working with stylesheets 1.75.1

BOB: Starting with 1.75.0, some attribute-sets were added to control
formatting of the glossary entries:


Best regards,
Bergfrid Skaara

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