xref and table title

Post here questions and problems related to editing and publishing DITA content.
gbv34
Posts: 66
Joined: Thu Jan 20, 2022 12:36 pm

xref and table title

Post by gbv34 »

Hello, everyone!

When I do a cross-reference to a table with a title, the generated link displays the following string: "Table" with a numbering.
In my case, I don't want to remove the numbering of the table in the topic, but only in the link that points to the table.

Example in the current situation:

Topic -> Table title ("Table 1 . My Fantastic Table Title")
External topic -> xref -> "Table 1"

What I'm trying to achieve:
Topic -> Table title ("Table 1 . My Fantastic Table Title")
External topic -> xref -> "My Fantastic Table Title"

I looked through the tables.xsl and found the template that relates to the title-number. But for my need, I should instead access to the template related to xref.

Would you have any pointer for me?
Thank you for your advices.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: xref and table title

Post by Radu »

Hi,

To what output format do you publish the DITA content? Is it HTML5, WebHelp, PDF (XSL-FO based) or PDF (CSS based)?
Did you make in the past other customizations for the output format?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbv34
Posts: 66
Joined: Thu Jan 20, 2022 12:36 pm

Re: xref and table title

Post by gbv34 »

Hi Radu,
For this project, I'll publish with HTML5.
For this output format, I didn't apply any customization yet.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: xref and table title

Post by Radu »

Hi,
If you edit the transformation scenario, in the Parameters list there should be a parameter named "args.tablelink.style" which you can set to value "TITLE".
https://www.dita-ot.org/dev/parameters/ ... -base.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbv34
Posts: 66
Joined: Thu Jan 20, 2022 12:36 pm

Re: xref and table title

Post by gbv34 »

Thanks a lot, Radu!
I'll test this asap :)
gbv34
Posts: 66
Joined: Thu Jan 20, 2022 12:36 pm

Re: xref and table title

Post by gbv34 »

Hi again, Radu!
Considering that I want to specifY a default value for this parameter, I declared the argument in the plugin.xml of org.dita.html5

Code: Select all

     <param name="args.tablelink.style" type="string">
      <val default="true" desc="displays the title of the tab">TITLE</val>
    </param>
    
However, I suspect I should place this param declaration somewhere else because it doesn't have any effect on the transformation whereas when I edit a default HTML5 scenario, I can access the different options: NUMBER, TITLE, and NUMTITLE and the transformation is correctly applied.

I don't get where I should declare this param if not in the plugin.xml...
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: xref and table title

Post by Radu »

Hi,

That <param> you are declaring in the plugin.xml is just some metadata used by third party applications like Oxygen to detect the public parameters which can be set to a plugin from the outside. So the default value you set there does not influence the transformation in any way.
You would need to declare the param with its default value directly in the ANT build file for your HTML plugin. something like here:

https://www.dita-ot.org/dev/topics/html ... e-css.html

Code: Select all

   <property name="args.css" value="custom.css"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbv34
Posts: 66
Joined: Thu Jan 20, 2022 12:36 pm

Re: xref and table title

Post by gbv34 »

Thank you so much, Radu. It works as expected :)
Post Reply