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

rjcbop
Posts: 4

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

Wed Aug 08, 2018 11:00 pm

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: 5760

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

Thu Aug 09, 2018 7:26 am

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/controlled-attribute-values-part-2.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests