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: toc for glossary

I have a couple of standalone Glossaries for my docus to be printed out as kind of a lexicon. So I wanted a nice table of content made out of glossdivs and glossentries. I therefor took a template and changed it to what I thought was the right way to get what I wanted; here's the customized template:

    <!-- writes a table of contents for the glossary -->
    <xsl:template match="d:glossary|d:glossdiv|d:glossentry|d:glossterm" mode="toc">
        <xsl:param name="toc-context" select="."/>
        <xsl:variable name="id">
            <xsl:call-template name="object.id"/>
        <xsl:variable name="cid">
            <xsl:call-template name="object.id">
                <xsl:with-param name="object" select="$toc-context"/>
        <xsl:call-template name="toc.line">
            <xsl:with-param name="toc-context" select="$toc-context"/>

        <xsl:variable name="nodes" select="d:glossary|d:glossdiv|d:glossentry"/>

        <xsl:variable name="depth.from.context"

            test="$toc.section.depth > 0
            and $toc.max.depth > $depth.from.context
            and $nodes">
            <fo:block id="toc.{$cid}.{$id}">
                <xsl:attribute name="margin-{$direction.align.start}">
                    <xsl:call-template name="set.toc.indent"/>

                <xsl:apply-templates select="$nodes" mode="toc">
                    <xsl:with-param name="toc-context" select="$toc-context"/>

This works fine, the glossary toc looks like it should:

But I get a lot of errors during generation, saying labels for glossdiv and glossentries are missing:

Request for label of unexpected element: glossdiv
Request for label of unexpected element: glossentry

Probably a daft question, but where are the labels being called in the template?
As I said, the outcome is not affected by these messages, but the data generation process looks a bit messy - and it can't be right.
Any comment is appreciated!


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