Working with element attributes

Learn how to work with element attributes in structured authoring in Adobe FrameMaker.

In this topic

Introduction

The elements in a structured document define the content in the document. You can also use element attributes to include additional information (metadata) to elements. An attribute is a name-value pair associated with a specific element.

For example, say the content elements in a Structured Application have an @audience attribute. You might use this attribute to single-source content. You can set the attribute of elements to e.g. admin and enduser. Your can then use these attributes to create a Responsive HTML5 output with dynamic content or, for example, two versions of a PDF: one PDF for administrators and another PDF for end users.

The same approach could be used to create outputs for different versions of your product, different versions for print and online output, or e.g. different sales regions.

Note: The elements that display in the elements catalog are defined in the Structured Application on which the document is based. Similarly, attributes for each element are also defined in the associated Structured Application.

Set attribute values for elements

To set attribute values for elements, do the following:

  1. Select an element in the document hierarchy.

  2. Choose Element > Edit Attributes to open the Attributes dialog.

  3. Click on an attribute in the dialog.

    At the bottom of the dialog, information about the attribute is displayed:

    Name

    The name of the attribute as it appears on the dialog.

    Type

    If the attribute value is optional or required. Also, the type of the value:

    String

    Enter a value for the attribute

    Choice

    Select a value from the available drop-down list.

    Default value

    Displays the default value, if any. Or specifies that no default value is required.

  4. For String type attributes, you can enter a text value.

    For Choice type attributes, you need to select a value from the value drop-down list.

View the attributes of an element

You can view the attribute values set for an element in the Attributes dialog (Element > Edit Attributes).

Alternatively, you can view the attribute values set for an element in the Structure View. To view the attribute values:

  1. Click the arrow sign to the right of the element in the Structure View.

    If one or more attribute value is set for the element, the list displays only those attributes. However, the arrow sign remains.

    Click the arrow sign again to display the complete list of attributes.

  2. If no attribute value is set for the element, the complete list of attributes is displayed.

Set attributes display options on element insertion

You can specify how the attributes display in the Structure View when an element is inserted in the document hierarchy. To specify the display options open the Attribute Display Options dialog (View > Attribute Display Options).

Required and Specified Attributes

The required and specified attributes of the element display when the element is inserted into the document.

All Attributes

All attributes of the element display when the element is inserted into the document.

No Attributes

No attributes of the element display when the element is inserted into the document.

Note: If you change the options in the Attribute Display Options dialog, the settings are applied to the currently opened document. For example, if you change the option from No Attributes to All Attributes, all the elements in the documents in the Structure View are expanded to display all the attributes.

Copy the attribute values from one element to another

You can copy all the attribute values set on one element to other elements in a document.

  1. In Structure View, right-click on the element from which you want to copy attribute values and choose Copy Attribute Values from the drop-down list.

  2. Right-click on the element to which you want to copy the attribute values and choose Paste from the drop-down list.

    To copy the attribute values to multiple elements, use shift + click to select multiple contiguous elements in the document and choose Edit > Paste.