1 minute read

Element Child Relation Constraints

The “TE” element will be added to the list of allowed child elements for “Sense”. Subsequently there will be an “Add: TE” command in the menu that appears when right-clicking on “Sense” in the Tree View.

One can remove an element from the list of allowed child elements for the selected element by selecting them in the “Child element” list and clicking the “Rem. child ->” button.

Advertisement

Figure 32:

“DTD structure” tab, Child elements editing window: Editing the list of allowed child elements of the “Sense” element

Element Child Relation Constraints

Each “parent->child” element relation may also have a constraint associated with it, such as “this element may have only one child of this type”. For example, if the “Subentry->Sense” child relation specified that no more than one “Sense” may be attached to a “Subentry”, then TLex will not allow more than one “Sense” to be added to the “Subentry” element when editing in the Tree View, and this option will be “greyed out” in the right-click menu of the Tree View. There are four possible constraint types, which may be selected using the “Child element constraint” drop-down list in the “Allowed child elements” window of the “DTD structure” tab: 1. One: One child of this type only. 2. Zero or more: Zero or more children of this type. 3. One or more: One or more children of this type (“at least one”). 4. Zero or one: Either zero or one child of this type, but no more than one. The order that child elements appear in the Tree View may also be modified by using the “Move up” and “Move down” buttons. (Note: This only affects the order that elements appear in the Tree View, and not the output order of child elements in the Preview Area or RTF, HTML, etc. exporters. The output order is configured separately, and will be explained later.)

This article is from: