Element availability based on context
We have the following elements in our EDD:
- Section, which is the 'container' for the document text, etc.
- Activity, which is the 'container' for practical exercises
- List for Lists
- ListItem for the items within the List element
- Comment, which (using the Frame Below Pgf format) adds a line for handwritten text
Both the Section and Activity containers are ValidHighestLevel elements. The Activity element cannot be a child of the Section element.
The List element can be used in both the Section and Activity elements. Formatting is the same regardless, so the same element is used.
The Comment element is a child element of the ListItem element. However, the Comment element can only be used if the parent List element (ListItem < List) is a child of the Activity element (ListItem < List < Activity). If the List element (ListItem < List) is a child of the Section element (Listitem < List < Section), the Comment element cannot be used.
To illustrate:
Scenario 1
Section
List
LisItem
Comment (Invalid child element)
Scenario 2:
Activity
List
ListItem
Comment (Valid child element)
I know I can create a 'error trap' context rule that is something like (paragraphsing) If contect is *< Section, use an Autonumber format to show 'Error - invalid context'. Is it possible to, instead, have the Comment element only valid based on the Context in which is used (i.e. * < Activity = Valid, * < Section = Invalid)
