Set default value of an attribute

Post here questions and problems related to editing and publishing DITA content.
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Set default value of an attribute

Post 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
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Set default value of an attribute

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Set default value of an attribute

Post by rjcbop »

Thanks for the advice!
Post Reply