AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

source footnote not working if it is target of an xref #165

Closed steinbacher01 closed 3 years ago

steinbacher01 commented 3 years ago

We're seeing an issue with footnotes within a table that are referenced by an xref in a different table entry.

For example this is the source fn..

<entry>Support<fn id="fn_fm1_q2k_w3b">The N-CAiO module only support single agent display and identify.</fn></entry>

and an entry in the row below it references the same fn...

<entry>Support<xref format="dita" href="#AirwayGasesParametersGasModules-DC5E82AD/fn_fm1_q2k_w3b" type="fn"/></entry>

When published, the original fn is missing the footnote *# and the link to the footnote at bottom of the table.

missing-fn

I tested the "use-by-reference footnote" sample from the DITA-Spec

http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part3-all-inclusive/langRef/base/fn.html

It seems to work fine when it is within the same entry (c_footnote.dita). But, not when the xref is in a different table entry.

Any suggestions on how to fix this?

I've attached a sample with the resulting PDF.

footnote-sample.zip

Thanks,

Leroy Steinbacher

ToshihikoMakita commented 3 years ago

According to the DITA specification, fn with @id attribute itself does not generates any outputs. It exists with xref elements that refers this fn elements.

3.2.2.16 <fn>

A footnote that specifies an @id attribute is a use-by-reference footnote. Upon output, it does not appear anywhere unless it has been referenced using an with the @type attribute set to "fn".

In your example you should author xref element besides fn element like below:

<entry>Support<fn id="fn_fm1_q2k_w3b">The N-CAiO module only support single
    agent display and identify.</fn><xref format="dita"
        href="#AirwayGasesParametersGasModules-DC5E82AD/fn_fm1_q2k_w3b"
        type="fn"/></entry>

Hope this helps your understanding.

Regards,

steinbacher01 commented 3 years ago

Thanks for the explanation. I changed the content as suggested and the footnotes are now working as expected.