DITA Resource Center

<attributedef>

The <attributedef> element specifies the attribute that is bound to a set of controlled values. This binding restricts the permissible values for the attribute to those that are contained in the set of controlled values.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

- topic/data subjectScheme/attributedef

Example

In this example, enumerations are specified for the @platform and @otherprops attributes. Note that the enumeration identifies a category of values; the values within the category are valid, while the category itself is not a valid value. For example, in the code sample here, the @platform attribute is associated with the enumeration for the category "os"; all values within the "os" category are thus valid on the @platform attribute, while the value "os" itself is not.

<subjectScheme>
  <!-- Pull in a scheme that defines unix OS values -->
  <schemeref href="unixOS.ditamap"/>
  <!-- Define new OS values that are merged with those in the unixOS scheme -->
  <subjectdef keys="os">
    <subjectdef keys="linux"/>
    <subjectdef keys="mswin"/>
    <subjectdef keys="zos"/>
  </subjectdef>
  <!-- Define application values -->
  <subjectdef keys="app" navtitle="Applications">
    <subjectdef keys="apacheserv" href="subject/apache.dita"/>
    <subjectdef keys="mysql"      href="subject/sql.dita"/>
  </subjectdef>

  <!-- Define an enumeration of the platform attribute, equal to
       each value in the OS subject. This makes the following values
       valid for the platform attribute: linux, mswin, zos -->
  <enumerationdef>
    <attributedef name="platform"/>
    <subjectdef keyref="os"/>
  </enumerationdef>
  <!-- Define an enumeration of the otherprops attribute, equal to
       each value in the application subjects.
       This makes the following values valid for the otherprops attribute:
       apacheserv, mysql -->
  <enumerationdef>
    <attributedef name="otherprops"/>
    <subjectdef keyref="app"/>
  </enumerationdef>
</subjectScheme>

Attributes

The following attributes are available on this element: ID attribute group, @status and @base from Metadata attribute group, @outputclass, Debug attribute group, @class (Not for use by authors), and the attributes defined below.

@name (REQUIRED)
Defines an attribute that will take a set of enumerated values.
@translate
Indicates whether the content of the element should be translated or not. For this element the default value is "no". Setting to "yes" will override the default. The DITA architectural specification contains a list of each OASIS DITA element and its common processing default for the translate value; because this element uses an actual default, it will always be treated as translate="no" unless overridden as described. Available values are:
no
The content of this element is not translateable.
yes
The content of this element is translateable.
-dita-use-conref-target
See Using the -dita-use-conref-target value for more information.

Was this page helpful?