Removal of generated text in table title

Deepthi
Posts: 4

Removal of generated text in table title

Tue Dec 19, 2017 11:59 am

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: 5510

Re: Removal of generated text in table title

Tue Dec 19, 2017 3:51 pm

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

Re: Removal of generated text in table title

Wed Dec 20, 2017 8:29 am

It is for PDF output
Deepthi
Posts: 4

Re: Removal of generated text in table title

Wed Dec 20, 2017 8:37 am

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: 5510

Re: Removal of generated text in table title

Wed Dec 20, 2017 11:06 am

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

Re: Removal of generated text in table title

Wed Dec 20, 2017 11:14 am

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: 5510

Re: Removal of generated text in table title

Wed Dec 20, 2017 11:19 am

Hi Deepthi,

Great, thanks for the update.

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

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests