Ah, yes, you would need to specify the column count on the entrytbl.
There is no way to populate that from the XInclude.
Regarding the duplicate letters, that is not what I get when I test
this. I XInclude two different tables using this method into two
different <entrytbl> elements in a table. Each has two footnotes, and
they are numbered a, b, c, d. Can you post a short example of your XML?
The XInclude process occurs before the stylesheet sees the XML. The
stylesheet counts table footnotes inside or <informaltable>.
Once the XIncludes are resolved, there is no inner table element, so
they should number properly as in my test.
Bob Stayton
Sagehill Enterprises
bobs@sagehill.netOn 6/29/2018 2:10 AM, Matteo Regazzo wrote:
>
> Great Bob, thank you very much, it works! J
>
> While making some tests I’ve found 2 minor problems:
>
> -if I have to include more than one table in more than one <entrytbl>
> and I have a different footnote in each table, each footnote takes the
> same reference (e.g. letter “a”) so at the end of the main table I’ll
> found all notes with the same reference letter;
>
> -by including the <tgroup> I need to specify the number of the columns
> in the <entrytbl> tag (like <entrytbl cols="”3”">). If I don’t it
> reports me the error “CALS tables must specify the number of columns”.
> Is there a way to make it able to learn the column number by itself?
>
> Thank you again,
>
> Matteo R.
>
> *Da:*Bob Stayton [mailto:
bobs@sagehill.net]
> *Inviato:* giovedì 28 giugno 2018 22:19
> *A:*
docbook-apps@lists.oasis-open.org> *Oggetto:* Re: [docbook-apps] R: [docbook-apps] footnote - nested tables
>
> 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"></xi:include>
> 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
>
bobs@sagehill.net <mailto:
bobs@sagehill.net>
>
> 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"></xi:include>
>
> xpointer="ID_TAB_XXX"
>
> xmlns:xi="http://www.w3.org/2001/XInclude"
> <http:
www.w3.org/2001/xinclude=""> />
>
> </http:></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:
bobs@sagehill.net]
> *Inviato:* mercoledì 27 giugno 2018 19:27
> *A:*
docbook-apps@lists.oasis-open.org> <mailto:
docbook-apps@lists.oasis-open.org>
> *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
>
>
bobs@sagehill.net <mailto:
bobs@sagehill.net>
>
> 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">
>
>
>
> <row>
>
> <entry><para>External</para></entry>
>
> <entry><para>Test</para></entry>
>
> <entry><para>Table</para></entry>
>
> </row>
>
>
>
>
>
> <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">
>
>
>
> <row>
>
> <entry><para>Internal</para></entry>
>
> <entry><para>Test</para></entry>
>
> <entry><para>Table</para></entry>
>
> </row>
>
>
>
>
>
> <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>
>
>
>
> </tgroup>
>
> </informaltable>
>
> </para></entry>
>
> </row>
>
>
>
> </tgroup>
>
> </informaltable>
>
>
> *Matteo**Regazzo*
>
> Email:
matteo.regazzo@cmz.it <mailto:
matteo.regazzo@cmz.it> |
> 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.
>
</http:></http:></http:></mailto:
matteo.regazzo@cmz.it></mailto:
bobs@sagehill.net></mailto:
docbook-apps@lists.oasis-open.org></entrytbl></entrytbl></mailto:
bobs@sagehill.net></row></entrytbl></entrytbl></tgroup></entrytbl></informaltable>
</entrytbl>