docbook-apps

Re: [docbook-apps] Caption duplication in CALS tables

  • 1.  Re: [docbook-apps] Caption duplication in CALS tables

    Posted 03-13-2007 20:42
    The stylesheets had not caught up with the most recent changes in the
    DocBook 5 schema. Only recently was caption permitted in a CALS table.
    This is the fix that I just added to the XSL source:

    <xsl:template match="table" mode="title.markup">
    <xsl:param name="allow-anchors" select="0"/>
    <xsl:apply-templates select="(title|caption)[1]" mode="title.markup">
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
    </xsl:apply-templates>
    </xsl:template>

    You can add it to your customization layer, or wait for a new snapshot
    release.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net


    ----- Original Message -----
    From: "Fabrizio Gotti" <gottif@iro.umontreal.ca>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Tuesday, March 13, 2007 10:30 AM
    Subject: [docbook-apps] Caption duplication in CALS tables


    > Hello,
    >
    > When I try to insert a caption in a CALS table, the html output contains
    > its caption twice. For instance, the following valid docbook document
    > produces a table with the caption in the title as well as in its
    > "normal" place.
    >
    > Is there a way to suppress the caption occurrence in the title?
    >
    > I am using docbook 5, with Saxon 8B.
    >
    > Thank you
    >
    > Fabrizio Gotti
    >
    > =================
    >
    >
    > ]>
    > <book version="5.0" xmlns="http://docbook.org/ns/docbook">
    > <info></info>
    >
    > <chapter xml:id="hello">
    >
    > <para>
    > This is a small paragraph
    > </para>
    >
    >
    >
    > <titleabbrev>Short title</titleabbrev>
    > <tgroup cols="1">
    >
    > <row><entry><simpara>empty line</simpara>> entry></row>
    >
    > </tgroup>
    >
    >

    > <simpara>This is a caption, it should appear only
    > once.</simpara>
    >

    > </chapter>
    > </book>
    >
    > produces an html table like this:
    > Table 1.1. Sample CALS Table (long title)
    >
    > This is a caption, it should appear only once.
    >
    > [empty line]
    >
    > This is a caption, it should appear only once.
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >