<defaultSubject>

The <defaultSubject> element is used within an attribute enumeration to set the default value for the attribute in cases where no value is specified for the attribute. The default subject must be one of the controlled values that are bound to the attribute.

Content models

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

Inheritance

- map/topicref subjectScheme/defaultSubject

Example

The following example declares that each of the four defined "os" values is valid within the @platform attribute; if no value is specified, the default is "linux".

<subjectScheme>
  <subjectdef keys="os">
    <subjectdef keys="linux"/>
    <subjectdef keys="mswin"/>
    <subjectdef keys="zos"/>
    <subjectdef keys="macos"/>
  </subjectdef>
  <enumerationdef>
    <attributedef name="platform"/>
    <defaultSubject keyref="linux"/>
    <subjectdef keyref="os"/>
  </enumerationdef>
</subjectScheme>

Attributes

The following attributes are available on this element: Universal attribute group, Link relationship attribute group (with a narrowed definition of @href, given below), Topicref element attributes group, @outputclass, @keys, and @keyref. This element also uses @processing-role, @locktitle, and @toc from Attributes common to many map elements.

@href
A pointer to the resource represented by the <topicref>. See The @href attribute for detailed information on supported values and processing implications. References to DITA content cannot be below the topic level: that is, you cannot reference individual elements inside a topic. References to content other than DITA topics should use the @format attribute to identify the kind of resource being referenced.

Was this helpful?