The logical aspect of documents is not only described by their tree structure and the references. Each element of a document can have one or several logical attributes that add semantics to the element. Logical attributes are defined for each type of document in the corresponding structure schema.
There are global attributes, which can be associated with any element defined in the structure schema, and local attributes, which can only be associated with elements of a given type.
In the Report structure schema, one global attribute is defined, Highlight. It can take two values:
ATTR Highlight = Definition, Important;
Also, a local attribute with numeric value called First_page_number is defined for the Report element:
Report (ATTR First_page_number= Integer)
The editor allows attributes to be associated with elements of the logical structure of documents. It also enables their values to be displayed, modified and the attributes to be removed. The structure schema determines the way in which the operation is carried out: only attributes defined by the structure schema can be associated with an element and they can only take the defined values.
In addition to attributes explicitly defined in each structure schema, there is a global attribute defined by default, the Language attribute. This attribute can be associated with an element or a character string to specify the language in which the text of that element is written.
The Language attribute is taken into account by the editor when it performs linguistic operations such as hyphenation (see section 8.3.4) or spelling checking (see section 21). Such processing produce good results if the Language attribute has a correct value, for the different parts of the document in case of a multilingual document.
The notion of language includes the natural languages (French, English, German, Italian, Spanish, Portuguese, etc.) and some special ``dialects'' such as:
The editor automatically applies a Language attribute to the root element (the Report element here) of the documents being created. The default value of this attribute is the dialogue language of the editor (see section 23.1.1) but it can be modified (see section 6.3).
Any text element is considered as written in the language specified by the Language attribute attached to the first enclosing element that carries such an attribute. As a result, the language can be defined for a whole section of a Report by applying a Language attribute to the element that represents the section. However, if the whole document is written in one language, the dialogue language, there is nothing special to do.
The Language attribute and the attributes defined in the structure schema can be assigned to the selected elements by using the ``Attributes'' menu. The content of this menu depends on the current selection as well as on structure schemas: it lists all attributes that can be applied to the first selected element. Moreover, if attributes are already attached to that element, they appear in the menu preceded by a star.
To associate an attribute with the selected elements, choose the required option in the ``Attributes'' menu. Then select or enter in the form the value to be allocated to that attribute. The command is validated by clicking on the ``Apply'' button. The form stays on the screen so that the same attribute can be applied to another element after having changed its value if required. Click on the ``Done'' button to dismiss the form.
Thus, if you select a single word in this paragraph, you can apply the attribute defined in the Report schema: Highlight. If you select the whole report, the First_page_number attribute appears in the ``Attributes'' menu.
A further example is given in Fig. 3. Another structure schema is used: Draw2 (see section 18.1). In this structure schema, many attributes are defined in order to express the geometric relationships between elements. If you select the grey rectangle (element of type Graphic_object) and call the ``Attributes'' menu, the attributes of the Article schema appear as well as those for the Draw2 schema. You can choose the ``Horiz_centered'' attribute, then click on the white rectangle: it allows the grey rectangle to be centered relative to the white rectangle. Then, any shift or change in height (see section 18.1.1) in the white rectangle will move the grey rectangle so as to maintain the centering relation defined by the attribute.[Here is a Drawing]
Figure 3 - Positional relation attributes
An attribute can be made mandatory by a structure schema for certain element types. In such case, when an element of that type is created, the editor requires that you enter the value of that element : it refuses any other command as long as the attribute has no value. An example is given with the OriginLink attribute which is applied to the SimpleLink element of the document type Draw (see section 18.1). When you create a SimpleLink element, entering the OriginLink attribute is made mandatory (the origin of the link must be designated).
To know all attributes associated with an element, first select that element, then call the ``Attributes'' menu. That menu offers the list of all attributes that can be applied to the element. A toggle indicates attributes which are effectively associated with the element.
To discover the value of an attribute carried by an element, first select that element, then call the ``Attributes'' menu; the toggle incates if the attribute of interest is present for this element. By choosing this entry, you display a form which shows the value of the attribute. Click on the ``Done'' button to close the form.
To remove an attribute attached to an element, carry out the same operation and click on the ``Delete'' button in the form. This form stays on the screen and can be used to remove an attribute of the same type carried by another element: just select the desired element and click on the ``Delete'' button. Click on the ``Done'' button to close the form.
To modify the value of an attribute attached to an element, the same operation is required. However, you must enter the new value of the attribute, then click on the ``Apply'' button.
The form used for searching text and structure (see sections 3.8 and 4.2.2) can also be used to search for the elements carrying certain attributes. To do this, the ``Search for'' and ``Type to search'' fields must be empty. Choose the first entry of the ``Attribute to search'' list (any) or the entry that corresponds to the required attribute, then click on the ``Confirm'' button. The editor searches for the next attribute in the domain specified by the ``Search where'' menu (see section 3.8). It selects the element carrying this attribute and displays, under the ``Attribute to search'' area, the value of the attribute found and its type, if this is not specified.
The list of attributes to be searched for can be updated by selecting different structure schemas from the ``Natures'' menu (see section 4.2.1).
The search for an attribute can be combined with the search for text (in this case it can also be combined with a replacement) and/or with the search for a given element type (see section 4.2.2).
[Section 7] [Table of contents]