Removal of generated text in table title

Post here questions and problems related to editing and publishing DITA content.
Deepthi
Posts: 4
Joined: Tue Dec 19, 2017 11:27 am

Removal of generated text in table title

Post by Deepthi »

Hi Team,

When <title> is used inside the<table> element I am getting "Table" generated text. Now according to my customization
I dont need "Table" generated text when <title> is inserted in <table> element.

It should be removed based on the on a condition that if root element has outputclass="xxx"

Please help me to remove the "Table" text when <title> is inserted in <table>.

Thank you!

BR
Deepthi
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Removal of generated text in table title

Post by Radu »

Hi,

Could you provide more details? For example do you need this for the PDF output or for HTML-based outputs?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Deepthi
Posts: 4
Joined: Tue Dec 19, 2017 11:27 am

Re: Removal of generated text in table title

Post by Deepthi »

It is for PDF output
Deepthi
Posts: 4
Joined: Tue Dec 19, 2017 11:27 am

Re: Removal of generated text in table title

Post by Deepthi »

Hi Radu,

Thanks for your reply.

I have tried in this way

Code: Select all


table > *[class~="topic/title"]:before(10) {
content:"";
}
This is not working and please let me know how to find whether the root element contains the outputclass="xxx".

BR
Deepthi.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Removal of generated text in table title

Post by Radu »

Hi,

In the Oxygen "Transformation Scenarios" dialog there are two predefined transformation scenarios, "DITA Map PDF" and "DITA Map PDF - WYSIWYG".
Which one of them are you using?

1) PDF customizations via CSS can only be done with the second one ("DITA Map PDF - WYSIWYG"). If you open the CSS:

OXYGEN_INSTALL_DIR\frameworks\dita\css\core\-table-html-cals.css

it has a property somewhere like:

Code: Select all

content: "Table " counter(tablecount) ": ";
which can be changed to remove the static text. Or from your custom.css you can override the entire selector. You also need to edit in the list of transformation scenario parameters and set the "args.css" parameter point to your custom CSS.

2) The "DITA Map PDF" transformation is based on XSLT customizations.
There is a book called "DITA For Print" which contains various ways in which to make PDF customizations for it:

http://xmlpress.net/publications/dita/dita-for-print/

For your particular problem there is a language dependent XML configuration file which defines various variables, like:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.pdf2\cfg\common\vars\en.xml

contains:

Code: Select all

    <variable id="Table.title">Table <param ref-name="number"/>: <param ref-name="title"/></variable>
<variable id="Table Number">Table <param ref-name="number"/></variable>
and these variables can be modified to change the output.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Deepthi
Posts: 4
Joined: Tue Dec 19, 2017 11:27 am

Re: Removal of generated text in table title

Post by Deepthi »

Hi Radu,

I have achieved it using the following code in CSS.

Code: Select all


:root[outputclass~="xxx"] >* *[class~="xyz/table"] > *[class~="xyz/title"]:before{
content:"";
}
Thanks for your quick reply. :)

BR
Deepthi
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Removal of generated text in table title

Post by Radu »

Hi Deepthi,

Great, thanks for the update.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply