Re: [docbook-apps] R: [docbook-apps] footnote - nested tables

2018-06-28 Thread Bob Stayton
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:



  ...
  xpointer="xpointer(/article/section[2]/informaltable[1]/tgroup/*"/>


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
b...@sagehill.net

On 6/27/2018 11:49 PM, Matteo Regazzo wrote:


Thank you Bob,

the  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

    

     Lorem ipsum dolor sit amet 

xmlns:xi="http://www.w3.org/2001/XInclude; 
/>


    

    

    

In this particular case, of course, it doesn’t accept me to insert the 
“include” in a . 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:b...@sagehill.net]
*Inviato:* mercoledì 27 giugno 2018 19:27
*A:* 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
b...@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

    

  

    

  

External

Test

Table

  

    

    

  

    Lorem ipsum dolor sit amet

    Lorem ipsum dolor sit amet

    

    

    

  

    

Internal

Test

Table

    

  

  

    

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit ametMy
footnote

    

  

    

    

    

  

    

  

    


*Matteo**Regazzo*

Email: matteo.rega...@cmz.it  | Web:
www.cmz.it 
Tel: +39 0422 1566684 |



CMZ Sistemi Elettronici srl
Via dell'Artigianato, 21
Vascon di Carbonera (TV)
31050ITALY







*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 

[docbook-apps] R: [docbook-apps] footnote - nested tables

2018-06-28 Thread Matteo Regazzo
Thank you Bob,
the  is of course the perfect solution,
but the truth is… I wasn’t be honest ☺
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



 Lorem ipsum dolor sit amet 
http://www.w3.org/2001/XInclude; />




In this particular case, of course, it doesn’t accept me to insert the 
“include” in a . 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:b...@sagehill.net]
Inviato: mercoledì 27 giugno 2018 19:27
A: 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

b...@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



  

  
External
Test
Table
  



  
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet




  

  Internal
  Test
  Table

  

  

  Lorem ipsum dolor sit amet
  Lorem ipsum dolor sit amet
  Lorem ipsum dolor sit 
ametMy footnote

  




  

  


[cid:image001.png@01D40EBC.92D1CAD0]




Matteo Regazzo

Email: matteo.rega...@cmz.it | Web: 
www.cmz.it
Tel: +39 0422 1566684 |

CMZ Sistemi Elettronici srl
Via dell'Artigianato, 21
Vascon di Carbonera (TV)
31050 ITALY

[cid:image003.png@01D40EBC.92D1CAD0]
[cid:image005.png@01D40EBC.92D1CAD0]


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.