Content Test Dialog Box
The Content Test dialog box opens when you carry out one of the following actions in the Condition dialog box, while creating a condition for an element or a table of contents (TOC):
• Choosing the New Content Test button
• Highlighting an existing content test and choosing Edit
The title of the dialog box will be either New Content Test or Edit Content Test, depending on which operation you used to invoke it. It allows you to create or edit a content test for an element condition or a TOC condition.
The Content Test dialog box contains the following options. The available options, or their intended uses, may differ slightly depending on whether you are creating a test for an element condition or a TOC condition:
• Element whose content to test - Specifies the element whose content is to be tested. Choose one of the following options:
◦ Current Element (available if creating a condition for an element) - select this option to test the content of the element for which you are creating the condition. The name of the current element is displayed in a read only field.
◦ Title Element (available if creating a condition for a table of contents) - select this option to test the content of the title elements included in the TOC. If there is only one element styled as Title in the stylesheet, the name of that element is displayed in a read only field, otherwise the field is hidden.
◦ Parent - select this option to test the content of the direct parent of either the current element or the TOC title element.
◦ Ancestor - select this option to test the content of an ancestor of either the current element or the TOC title element. Select an ancestor from the drop down list, or type an element name in the field.
• Test type - Determines whether to test for the presence or absence of the specified content. Choose Includes to test for the presence of the specified content. Choose Does not include to test for the absence of the specified content.
• Test depth - Determines the level to which to test for the specified content. Select one of the following options:
◦ Choose At top level to test only in the direct child elements of the specified element.
◦ Choose At any level to test in all descendant elements of the specified element.
The value set in this field decides which elements are displayed for selection in the Content to test for field.
• Content to test for - Indicates the content for which Arbortext Styler should test. Choose one the following options:
◦ Select (Any element or text) (default) - test for the presence or absence of any element or text in the specified element.
◦ Select (Text content) - test for the presence or absence of text content in the specified element.
◦ Select a specific descendant element from the list to confirm that Arbortext Styler should test for the presence or absence of that child element in the specified element. The elements included in the list depend on the value selected in the Test depth field:
▪ If Test depth is set to At top level, only the direct child elements of the specified element are included in the list.
▪ If Test depth is set to At any level, all possible descendant elements of the specified element are included in the list.
▪ If the document is free-form XML, or the element entered in the Element whose content to test field is not declared in the document type, all elements in the document are included in the list.
The list includes Styler Formatting Elements, User Formatting Elements, and descendant elements.
You can also type an element name in the Content to test for field.