Re: How deal with complex conditions with combinations of AND, OR and NOT #conditional-processing

Reece Roggentien

We have some complex conditionalization, too, and these are some techniques I’ve used. For ditavals:


·       “Exclude” all profiling attributes by default: <prop action="exclude"/>

·       “Include” all @otherprops by default: <prop action="include" att="otherprops"/>

·       “Include” any other profiling attributes that shouldn’t get filtered


What this does:


·       It allows us to use @otherprops for selective exclusion (one-off filtering), like: <prop action="exclude" att="otherprops" val="everyone_but_customer_1"/>

·       It allows us to use @props and any specializations of @props for selective inclusion, like: <prop action="include" att="props" val="only_customer_1"/>


In the content itself, it’s sometimes impossible to accomplish the and/or/not behavior we want on a single element. In those cases we’ve repeated the element but applied different profiling attributes to each one to get the desired output. We could use also a single keyref or conkeyref with conditionalized keydefs instead.




From: [] On Behalf Of Bella Zhao via
Sent: Friday, April 03, 2020 12:08 AM
Subject: [dita-users] How deal with complex conditions with combinations of AND, OR and NOT




The conditional attributes are very complex for our documentation because our product is highly customer configurable.


Our conditions have complex combinations of AND, OR, and NOT, for example, (A || B) && C && !D. In real cases there can be much more layers. While I think DITAVAL can only deal with OR and NOT, such as (A || B) and !A?


Is there any way to deal with such complex conditions in DITA? Do we need some special programming?






Join to automatically receive all group messages.