Page 1 of 1

Providing additional attributes for published HTML

Posted: Thu Jan 16, 2025 6:14 pm
by IanMayo
I wish to add table sorting to my published HTML.
1. I've added the JS sources to this library to my `libraries` fragment: https://www.kryogenix.org/code/browser/sorttable/
2. I've used `outputclass` to label the relevant table as `sortable`
3. I need to include a custom attribute `sorttable_customkey` in the exported HTML:

Code: Select all

<td sorttable_customkey="2">two</td><td>Jan</td>
Is there a way to do this using the standard DITA attributes for a table cell `entry` in OxygenXML Author?

Re: Providing additional attributes for published HTML

Posted: Fri Jan 17, 2025 11:55 am
by julien_lacour
Hello,

Could you indicate which version of Oxygen you are using?

Could you also indicate in which scenario you want to make this modification?
Published HTML formats include HTML5, XHTML and WebHelp Responsive.

In any of these cases you will need to implement the modification in an XSLT stylesheet in order to convert the outputclass into sorttable_customkey.

Regards,
Julien

Re: Providing additional attributes for published HTML

Posted: Tue Jan 28, 2025 1:14 pm
by IanMayo
Hello Julien,
sorry - I missed your reply.

The publishing would be to WebHelp responsive.

I think I'm going to find it easier to specify the attribute as a custom class on the table cell via `outputclass` - like `customkey_xxx`. Then I'll modify the JS code to check for this class prefix in the class names for that element, and use the remaining text as the key if present.

Thanks for your support Julien,
Ian