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] XREF in an article

Hi Ellen,
Are your sections numbering in articles but not in books (using the section.autolabel parameter)?  If so, then you are getting the gentext template for your sections from the context with name="xref-number-and-title".  So you need to customize that as well.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
----- Original Message -----
Sent: Tuesday, February 13, 2007 4:58 PM
Subject: [docbook-apps] XREF in an article

Hello list,
I created a customization layer for our user manuals, which are docbook "books". Now I am adapting that customization for "articles" (for release notes, etc).

However, when I generate the PDF, the XREFs are not formatted the same way in the article as they are in the book, even though the XSL is exactly the same (see code snip below).

In the book, an xref produces the following (xref text marked like *this*):
...Other automation information can be found in *Automation Control (p. 25)*...

But in the article, xrefs look like this:
...Other automation information can be found in *Section 5, "Automation Control"*...

Is there something special I need to do to affect xrefs in articles in addition to books? I am using the most recent version of the docbook stylesheets. Thanks for your help in advance.


Product Specialist, LCS Series
Meyer Sound Laboratories

<xsl code snip>

<xsl:template match="chapter|sect1|sect2|sect3|sect4|sect5|section" mode="insert.title.markup">
        <xsl:param name="purpose" />
        <xsl:param name="xrefstyle" />
        <xsl:param name="title" />
            <xsl:when test="$purpose = 'xref'">
                <fo:inline color="#002266" font-style="italic" font-weight="bold">
                    <!-- This sets attributes for the title on xrefs -->
                    <xsl:copy-of select="$title" />
                <xsl:copy-of select="$title" />
    <xsl:attribute-set name="xref.properties">
        <!-- This sets attributes for the page # on xrefs -->
        <xsl:attribute name="color">black</xsl:attribute>
        <xsl:attribute name="font-style">normal</xsl:attribute>
        <xsl:attribute name="font-weight">normal</xsl:attribute>
    <xsl:param name="local.l10n.xml" select="document('')" />
        <l:l10n language="en">
            <l:context name="xref">
                <l:template name="appendix" text="%t (p. %p)" />
                <l:template name="chapter" text="%t (p. %p)" />
                <l:template name="sect1" text="%t (p. %p)" />
                <l:template name="sect2" text="%t (p. %p)" />
                <l:template name="sect3" text="%t (p. %p)" />
                <l:template name="section" text="%t (p. %p)" />

</xsl code snip>

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