Assign attribute values

Understand how you can work with attributes in structured documents in Adobe FrameMaker.

In this topic

Introduction

Attributes store supplementary information about an element that does not appear with the contents of the document. You can see attributes and their values in the Structure View.

Figure 1. Attributes in the Structure View
Attributes of an elementin the Structure View

An attribute’s definition specifies the type of values that are acceptable (such as text or numeric) and sometimes includes a list of possible values or a numeric range.

The definition also determines whether the value is optional, required, or read only. It sometimes provides a default value. You can assign values to an attribute if the attribute is not read only.

If an attribute’s current value does not conform to the specifications in its definition, the attribute is invalid.

Note: FrameMaker can provide the values for ID and ID Reference attributes used in cross-referencing. These attributes are usually defined as read-only.

Enter attribute values as you insert elements

If an element requires a specific attribute, FrameMaker asks you to provide the attribute value. If an attribute is required, the Attributes For New Element dialog appears, listing all the attributes (except read-only ones) defined for the element. For each required attribute value, select the attribute in the Attribute Name scroll list, enter the value in the Attribute Value box, and press Enter. If an attribute is required, you must enter a value for the element to be valid.

The value you can enter, such as text or a number, is determined by the attribute’s type. If an attribute has a set of predefined values, choose from the Attribute Value drop-down list rather than entering a value.

A description of the selected attribute (its type, whether a value is required, and so on) appears in the dialog box below the Attribute Value area.

If an attribute is not required but optional, you can provide the attribute value at any time after inserting the element.

Click Insert Element.

Note: In XML, attribute values names support the Unicode text-encoding standard.
Attention: When working with SGML, do not use multibyte (Asian-language) characters when entering attribute values. These characters are not exported to SGML correctly because multibyte characters are not supported in the SGML workflow.

Enter or edit attribute values for elements already in a document

To change an attribute value rather than a value, select the element with the attribute value you want to change.

You can select more than one element of the same type, and apply the change to all. The elements must be contiguous. For example, if several <p> elements in a row have a @audience attribute, you can change the value of that attribute for all the <p> elements at one time.

Double-click an attribute name or value in the Structure View to display the Attributes dialog box.

Alternatively, choose Elements > Edit Attributes to open the Attributes panel.

For each attribute value to enter or edit, select the attribute in the Attribute Name scroll list, enter the value in the Attribute Value box, and press enter.

If an attribute has a set of predefined values, choose from the Attribute Value drop-down list rather than entering a value.