Page 1 of 1

Removal of generated text in table title

Posted: Tue Dec 19, 2017 11:59 am
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

Re: Removal of generated text in table title

Posted: Tue Dec 19, 2017 3:51 pm
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

Re: Removal of generated text in table title

Posted: Wed Dec 20, 2017 8:29 am
by Deepthi
It is for PDF output

Re: Removal of generated text in table title

Posted: Wed Dec 20, 2017 8:37 am
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.

Re: Removal of generated text in table title

Posted: Wed Dec 20, 2017 11:06 am
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

Re: Removal of generated text in table title

Posted: Wed Dec 20, 2017 11:14 am
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

Re: Removal of generated text in table title

Posted: Wed Dec 20, 2017 11:19 am
by Radu
Hi Deepthi,

Great, thanks for the update.

Regards,
Radu