About Arbortext Styler > Arbortext Styler Dialog Boxes > Attribute Test Dialog Box
  
Attribute Test Dialog Box
The Attribute 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 Attribute Test button
Highlighting an existing attribute test, and choosing Edit
The title of the dialog box will be either New Attribute Test or Edit Attribute Test, depending on which operation you used to invoke the dialog box. It allows you to create or edit an attribute test for an element condition or a TOC condition.
The Attribute 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:
Test attribute of - Controls the element whose attribute's value is to be tested. The options are:
Current Element (available if creating a condition for an element) - select this option to test an attribute 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 an attribute 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 an attribute of the direct parent of either the current element or the TOC title element.
Ancestor - select this option to test an attribute 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 Ancestor field.
Attribute Name - Provides a list of valid attributes for the selected element if the element is in the DTD or schema used by the document. If there is no DTD or schema, but the selected element is in the document, the list includes all attributes defined in the document for the selected element. If the selected element is not in the DTD, schema, or document, the list is empty, and you can type in an attribute name.
Attribute Value - Choose the test type and the value of the attribute that you want to test, where applicable. The options are:
Assigned any value (default)
Not assigned a value
Includes whole word - Select this option then specify an alphanumeric character string as the word the attribute value must include.
Comparison - Select this option, choose an operator (=, <, >, <=, >=, or !=), then enter an alphanumeric character string in the text box for Arbortext Styler to compares with the matching attribute in a document. This text field will include a drop down list of values if the selected attribute has an enumerated set of values.
If one of the numeric operators <, <=, >, or >= is chosen, the attribute value and the value it is being compared with must both be numeric or the test will fail. The values will be compared after being converted to numbers. For example, “09” would be considered greater than “2”.
If the attribute value and the value being compared are both numeric, use = and != operators to carry out a numeric comparison. As an example, this will ensure that the value “01” is considered equal to “1” or “1”.
* 
In pre-5.4 releases of Arbortext Styler, a "not equal" (defined with the != comparison option) attribute test of a condition would succeed when publishing with the FOSI engine and fail in XSL-based outputs when the attribute in question was unassigned. In 5.4, XSL outputs changed so that the results match those obtained with the FOSI engine. Please refer to the release notes for release 5.4 for further information.