The <defaultSubject> element specifies the default value for the attribute in cases where no value is specified. The default value must be one of the controlled values that are bound to the attribute.

Processing expectations

Specialization hierarchy

The <defaultSubject> element is specialized from <topicref>. It is defined in the subject scheme module.

Content model

<data> **

Zero or more Zero or more <data>


The following attributes are available on this element: link-relationship attributes, universal attributes, @impose-role, @keyref, @keys, @processing-role, and @toc.

For this element, the @impose-role attribute has a fixed value of keeptarget.


The following code sample limits the values for @platform to the os subject and sets the default value to linux:

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

The result is that only the following values are permitted for @platform:

  • linux
  • macos
  • mswin
  • zos

If no value is specified for the @platform attribute in the DITA source, the value is assumed to be linux.