Re: How deal with complex conditions with combinations of AND, OR and NOT #conditional-processing
I haven’t done it yet, but have you looked into groups?
From: firstname.lastname@example.org <email@example.com> on behalf of Reece Roggentien <Reece.Roggentien@...>
Sent: Friday, April 3, 2020 10:33:15 AM
To: firstname.lastname@example.org <email@example.com>
Subject: Re: [dita-users] How deal with complex conditions with combinations of AND, OR and NOT
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: firstname.lastname@example.org [mailto:email@example.com]
On Behalf Of Bella Zhao via groups.io
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?