Set default attribute value by constraint module

Post here questions and problems related to editing and publishing DITA content.
xephon
Posts: 136
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Set default attribute value by constraint module

Post by xephon »

Hi,

probably I miss something quite trivial: I'd like to set an attribute to #REQUIRED by constraint module. I want <chapter> elements to always use @keyref. But the following constraint module does not resolve the %chapter-atts; entity and I'd like to avoid to resolve it manually in the constraint module, because this would also mean I'd have to manually add @props extensions to the constraint module.

Code: Select all

<!ENTITY chapter-constraints "(myBookmap chapter-c)">

<!ENTITY % chapter.attributes
"%chapter-atts;
keyref
CDATA
#REQUIRED">
Where is my mistake? How should I do that?

Thank you very much
stefan-jung.org – Your DITA/DITA-OT XML consultant
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Set default attribute value by constraint module

Post by Radu »

Hi Stefan,

The question is if the main DTD shell using the constraint is valid or not. The module in itself may be invalid but if the main DTD is valid, then that's OK.
If this does not work for you maybe you could attach your customization plugin to an email and I could try to look into this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
xephon
Posts: 136
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: Set default attribute value by constraint module

Post by xephon »

Thank you Radu,

you've got mail.

Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Post Reply