List Info

Thread: Caption duplication in CALS tables




Caption duplication in CALS tables
user name
2007-03-13 13:30:48
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

=================

<?xml version="1.0"
encoding="UTF-8"?>
<!DOCTYPE book [<!ENTITY myent "My Entity"
>]>
<book version="5.0" xmlns="http://docboo
k.org/ns/docbook">
    
<info><title>Example</title></info>

     <chapter xml:id="hello">
         <title>Chapter title</title>
         <para>
             This is a small paragraph
         </para>

         <table xml:id="ex.calstable"
frame='all' shortentry="1">
             <title>Sample CALS Table (long
title)</title>
             <titleabbrev>Short
title</titleabbrev>
             <tgroup cols="1">
                 <tbody>
                    
<row><entry><simpara>empty
line</simpara></ 
entry></row>
                 </tbody>
             </tgroup>
             <caption>
                 <simpara>This is a caption, it should
appear only  
once.</simpara>
             </caption>
        </table>
     </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-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Caption duplication in CALS tables
user name
2007-03-13 13:41:57
this is a styling artifact of a bug in the new schema that
was turned
into a feature

in the links you will find a workaround, i think

http://so
urceforge.net/tracker/index.php?func=detail&aid=1579883&
amp;group_id=21935&atid=373747

http://so
urceforge.net/tracker/index.php?func=detail&aid=1596778&
amp;group_id=21935&atid=373749

http://so
urceforge.net/tracker/index.php?func=detail&aid=1627845&
amp;group_id=21935&atid=384107


On 3/13/07, Fabrizio Gotti <gottifiro.umontreal.ca>
wrote:
> 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
>
> =================
>
> <?xml version="1.0"
encoding="UTF-8"?>
> <!DOCTYPE book [<!ENTITY myent "My
Entity" >]>
> <book version="5.0" xmlns="http://docboo
k.org/ns/docbook">
>     
<info><title>Example</title></info>
>
>      <chapter xml:id="hello">
>          <title>Chapter title</title>
>          <para>
>              This is a small paragraph
>          </para>
>
>          <table xml:id="ex.calstable"
frame='all' shortentry="1">
>              <title>Sample CALS Table (long
title)</title>
>              <titleabbrev>Short
title</titleabbrev>
>              <tgroup cols="1">
>                  <tbody>
>                     
<row><entry><simpara>empty
line</simpara></
> entry></row>
>                  </tbody>
>              </tgroup>
>              <caption>
>                  <simpara>This is a caption, it
should appear only
> once.</simpara>
>              </caption>
>         </table>
>      </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-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>
>


-- 
http://chris.chiasson.nam
e/

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Caption duplication in CALS tables
user name
2007-03-13 15:41:44
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
bobssagehill.net


----- Original Message ----- 
From: "Fabrizio Gotti" <gottifiro.umontreal.ca>
To: <docbook-appslists.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
>
> =================
>
> <?xml version="1.0"
encoding="UTF-8"?>
> <!DOCTYPE book [<!ENTITY myent "My
Entity" >]>
> <book version="5.0" xmlns="http://docboo
k.org/ns/docbook">
>    
<info><title>Example</title></info>
>
>     <chapter xml:id="hello">
>         <title>Chapter title</title>
>         <para>
>             This is a small paragraph
>         </para>
>
>         <table xml:id="ex.calstable"
frame='all' shortentry="1">
>             <title>Sample CALS Table (long
title)</title>
>             <titleabbrev>Short
title</titleabbrev>
>             <tgroup cols="1">
>                 <tbody>
>                    
<row><entry><simpara>empty
line</simpara></ 
> entry></row>
>                 </tbody>
>             </tgroup>
>             <caption>
>                 <simpara>This is a caption, it
should appear only 
> once.</simpara>
>             </caption>
>        </table>
>     </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-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>
>
> 



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )