Constrain the values of an attribute based on the value of another attribute

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

Constrain the values of an attribute based on the value of another attribute

Post by rjcbop »

We have what I understand is a co-occurrence constraint where we want the allowed values of a particular attribute, say B, to be constrained based on the specified value of another attribute, say A. Is there some way to embed this constraint in the authoring environment such that you have pick lists for A and B, and where the available values of B depend on what's selected for A? For reference, we tried to do this through a subject scheme but were not successful.
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: Constrain the values of an attribute based on the value of another attribute

Post by Radu »

Hi,

Indeed having this possibility through a Subject Scheme map would have been cool. Especially that Oxygen uses Subject Scheme maps also for validation and would have flagged such problems. But Subject Scheme maps do not have the mechanism to express this.
We do have a content completion configuration file which can call an XSLT extension to achieve what you want, there is a blog post by my colleague Alex about this:

http://blog.oxygenxml.com/2015/07/contr ... art-2.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Constrain the values of an attribute based on the value of another attribute

Post by rjcbop »

Thank you!
Post Reply