Hidden And Read-Only Attributes - Adobe 65030365 - FrameMaker - PC Developer's Manual

Structure application developer's guide
Hide thumbs Also See for 65030365 - FrameMaker - PC:
Table of Contents

Advertisement

11
W r i t i n g a t t r i b u t e d e f i n i t i o n s f o r a n e l e m e n t
If a value is optional, you can assign a default value to the attribute. A default value can be
used to control the element's formatting or to work with a structure API client. For more
information, see "Default value" on page 176.

Hidden and Read-only attributes

You may sometimes want to restrict end users from editing the value of an attribute, and
let FrameMaker or a structure API client provide the value instead. This is especially helpful
for an attribute you want to use for precise tracking of particular element instances or
changes in a document.
For example, FrameMaker can set an attribute value for elements used in cross-referencing.
You specify read-only for a UniqueID attribute that stores an ID as source information for
its element. Then when an end user inserts an element-based cross-reference to an
instance of the element, FrameMaker sets the attribute's ID for that instance. For
information on using an attribute in this manner, see "Using UniqueID and IDReference
attributes" on page 176.
Your structure application might store information in attributes that is of no interest to the
end user. In that case, you can make the attribute hidden. Not only is the end user kept
from editing the attribute value, he or she will never see the attribute or its value.
These are possible uses for read-only or hidden attributes with values set by an API client:
The attribute stores key information in a structured document that is a representation of
a database. For example, a UniqueID attribute in FrameMaker might store an object ID
with data extracted from a database. You may want to preserve the ID so that you can
export the data back to its source location in the database.
The attribute stores information about the version of a document. For example, some
version-control schemes have an IDReference attribute pointing to each element in a
document, and the attribute is updated for each revision.
To make an attribute read-only, insert a ReadOnly element after the Required or
Optional element in the attribute definition. For example:
1. Name: Source
To make an attribute hidden, insert a Hidden element after the Required or Optional
element in the attribute definition. For example:
1. Name: Source
If you make an attribute read-only or hidden, we suggest that you specify the value
to be optional. If a value is required and an instance of the attribute does not have
a value, the document will show a validation error that the end user cannot correct.
Although a read-only or hidden attribute is not editable in the FrameMaker user interface,
you can still edit its value with a structure API client. For information on API clients, see the
Structure Import/Export API Programmer's Guide.
Attribute Definitions
UniqueID
Optional
UniqueID
Optional
Read-only
Hidden
174

Advertisement

Table of Contents
loading

This manual is also suitable for:

Framemaker 7.1

Table of Contents