There is one other approach that might work if you are using xsltproc
and the inserted informaltable is a CALS table. The entrytbl element has
the same content model as tgroup (except entrytbl does not accept
tfoot). Since xsltproc's XInclude implementation supports some xpath
syntax, you could try something like this, with the appropriate xpath:
<row>
<entry>...</entry>
<entrytbl><xi:include href="MyFile.xml"
xpointer="xpointer(/article/section[2]/informaltable[1]/tgroup/*"/></entrytbl>
This will include the content of the informaltable's tgroup into the
entrytbl element.
If this works, you will get the footnote at the bottom of the main
table, not the nested table, but at least it won't be duplicated.
If this doesn't suit you, then you'll need to create an XSL
customization layer to customize some XSL templates to handle the
footnote in the nested table.
Bob Stayton
Sagehill Enterprises
[email protected]
On 6/27/2018 11:49 PM, Matteo Regazzo wrote:
Thank you Bob,
the <entrytbl> is of course the perfect solution,
but the truth is… I wasn’t be honest J
I hoped to find a simple trick in your first answer.
The real problem for me is that the nested table (the internal one) is
obtained through a link.
The real code I’m using is like this
<row>
<entry><para> Lorem ipsum dolor sit amet </para></entry>
<entry><para><xi:include href="MyFile.xml"
xpointer="ID_TAB_XXX"
xmlns:xi="http://www.w3.org/2001/XInclude"
/>
</para>
</entry>
</row>
In this particular case, of course, it doesn’t accept me to insert the
“include” in a <entrytbl>. So I think the only solution is to modify
the .xsl files… do you agree? Or Do you think the are other solutions?
Matteo R.
*Da:*Bob Stayton [mailto:[email protected]]
*Inviato:* mercoledì 27 giugno 2018 19:27
*A:* [email protected]
*Oggetto:* Re: [docbook-apps] footnote - nested tables
It is possible but it would not be simple. The stylesheets were not
designed to handle a table nested in a para in a table entry.
Normally CALS tables are nested with an entrytbl replacing entry, not
a table element nested inside an entry element. In DocBook 5, your
file will not validate as it would violate the Schematron rule that
prevents putting informaltable inside entry. It should be invalid in
DocBook 4, but there is no way to express such an exclusion with DTD
syntax.
The footnote machinery is already complicated by having to keep
separate the table footnotes from the page footnotes. So you would
need to customize several templates that number and place footnote
markers, as well as places where footnote paragraphs are rendered, to
take into account nested table footnotes. Those templates are in the
footnotes.xsl and table.xsl stylesheet modules.
Bob Stayton
Sagehill Enterprises
[email protected] <mailto:[email protected]>
On 6/27/2018 5:49 AM, Matteo Regazzo wrote:
Hi everybody,
I’m facing a problem: I have a “table-in-a-table” and if I put a
footnote in the text inside the inner table, it is reported twice:
once out of the internal table and once out of the external one.
Is it possible to make it appear only under the internal table?
I hope my request is clear; I report my example and the result, to
make it easier to understand.
Thank you in advance!
Matteo
<informaltable>
<tgroup cols="3">
<thead>
<row>
<entry><para>External</para></entry>
<entry><para>Test</para></entry>
<entry><para>Table</para></entry>
</row>
</thead>
<tbody>
<row>
<entry><para>Lorem ipsum dolor sit amet</para></entry>
<entry><para>Lorem ipsum dolor sit amet</para></entry>
<entry><para>
<informaltable>
<tgroup cols="3">
<thead>
<row>
<entry><para>Internal</para></entry>
<entry><para>Test</para></entry>
<entry><para>Table</para></entry>
</row>
</thead>
<tbody>
<row>
<entry><para>Lorem ipsum dolor sit amet</para></entry>
<entry><para>Lorem ipsum dolor sit amet</para></entry>
<entry><para>Lorem ipsum dolor sit amet<footnote><para>My
footnote</para></footnote></para></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para></entry>
</row>
</tbody>
</tgroup>
</informaltable>
*Matteo**Regazzo*
Email: [email protected] <mailto:[email protected]> | Web:
www.cmz.it <http://www.cmz.it>
Tel: +39 0422 1566684 |
CMZ Sistemi Elettronici srl
Via dell'Artigianato, 21
Vascon di Carbonera (TV)
31050ITALY
<http://www.cmz.it>
<http://www.sogaenergyteam.com/cmz/>
*SUMMER CLOSING 2018: FROM 04 TO 26 AUGUST*
------------------------------------------------------------------------
The information transmitted, including attachments, is intended
only for the person(s) or entity to which it is addressed and may
contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any
action in reliance upon this information by persons or entities
other than the intended recipient is prohibited. If you received
this in error please contact the sender and destroy any copies of
this information.