Page 1 of 1

Set default value of an attribute

Posted: Tue Oct 16, 2018 5:44 pm
by rjcbop
Hi,

We'd like to set the default value of an attribute, specifically the value of the @align attribute for an <image> element. From some older posts, it appears that the attribute is defined in commonElements.mod. We've tried modifying that file in the various plug-ins in which it resides and re-installing those plug-ins but that's had no effect. For reference, we're using a local version of the DITA-OT2.x (outside of the native oXygen distribution).

Thanks in advance

Re: Set default value of an attribute

Posted: Wed Oct 17, 2018 9:22 am
by Radu
Hi,

It is incorrect to make changes directly to the DITA DTDs. Usually in such cases you should construct a DITA DTD specialization plugin (with custom public and system ID mappings for all your topics).
In this particular case, instead of changing the DITA DTDs to set a default attribute value for @align maybe it's easier to customize the published output using some custom XSLTs and when the @align attribute is missing on the image, treat it is if it would be aligned in a certain way.

Regards,
Radu

Re: Set default value of an attribute

Posted: Wed Oct 17, 2018 5:36 pm
by rjcbop
Thanks for the advice!