subjectScheme

A subjectScheme is a specialized DITA map that defines a collection of controlled values rather than a collection of topics.

Default values in the scheme (specified by <defaultSubject>) apply only if the XML DTD / schema or instance doesn't specify a value in some other way. The precedence of the different methods of setting a value is:

  1. An explicit value in the element instance
  2. A default value in the DTD or XML Schema
  3. Cascaded values within the document
  4. Cascades from a higher level document to this document
  5. A default controlled value for a scheme
  6. Values in processing rules

Contains

Note

These models represent only the default document types distributed by OASIS. Actual content models will differ with each new document type.
Doctype Content model
subjectScheme ( (title) (optional) then (topicmeta) (optional) then ( (anchor or data or data-about or enumerationdef or hasInstance or hasKind or hasNarrower or hasPart or hasRelated or navref or relatedSubjects or reltable or schemeref or subjectdef or subjectHead or subjectRelTable or topicref or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) ) (any number) ) )

Contained by

This element is not contained by any other elements.

Inheritance

- map/map subjectScheme/subjectScheme

Example

<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>

Example: how hierarchies affect filtering

In the following sample, there are subcategories within the general "os" category.

<subjectScheme>
  <subjectdef keys="os" navtitle="Operating system">
    <subjectdef keys="linux" navtitle="Linux">
      <subjectdef keys="redhat" navtitle="RedHat Linux"/>
      <subjectdef keys="suse"   navtitle="SuSE Linux"/>
    </subjectdef>
    <subjectdef keys="mswin" navtitle="Windows"/>
    <subjectdef keys="zos"   navtitle="z/OS"/>
  </subjectdef>
  <enumerationdef>
    <attributedef name="platform"/>
    <subjectdef keyref="os"/>
  </enumerationdef>
</subjectScheme>

The following values are valid on the platform attribute: linux, redhat, suse, mswin, zos. If any other values are encountered, processors validating against the scheme should give a warning. As a result, the values could be used in this way:

<p platform="linux">You must set up a cron job to ...</p>
<p platform="redhat">To set up the cron job, ...</p>

Processors should be aware of hierarchies of attributes defined in subject scheme maps, and process them differently than they might if the attributes were not defined in a hierarchy. Using the values "linux" and "redhat" from the scheme above, where the subject "linux" is a container for the subject "redhat", filtering and flagging operate as follows:

How to evaluate subjects in a hierarchy

Behavior of "linux" Behavior of "redhat" How to evaluate platform="redhat" How to evaluate platform="linux"
set to "exclude" set to "exclude" Excluded Excluded
set to "include" or "flag" Excluded. This is an error condition, because if all linux content is excluded, redhat is also excluded. Applications may recover by generating an error message. Excluded
unspecified Excluded, because "redhat" is a special kind of "linux", and linux is excluded. Excluded
set to "include" set to "exclude" Excluded, because all redhat content is excluded Included
set to "include" Included Included
set to "flag" Included and flagged with the "redhat" flag Included
unspecified Included, because all Linux content is included Included
set to "flag" set to "exclude" Excluded, because all redhat content is excluded Included and flagged with the "linux" flag
set to "include" Included and flagged with the "linux" flag, because linux is flagged and redhat is a type of linux Included and flagged with the "linux" flag
set to "flag" Included and flagged with the "redhat" flag, because a flag is available that is specifically for redhat Included and flagged with the "linux" flag
unspecified Included and flagged with the "linux" flag, because linux is flagged and redhat is a type of linux Included and flagged with the "linux" flag
unspecified set to "exclude" Excluded, because all redhat content is excluded If the default for platform values is "include", this is included. If the default for platform values is "exclude", this is excluded.
set to "include" Included Included, because all "redhat" content is included, and general Linux content also applies to RedHat
set to "flag" Included and flagged with the "redhat" flag Included, because all "redhat" content is included, and general Linux content also applies to RedHat
unspecified If the default for platform values is "include", this is included. If the default for platform values is "exclude", this is excluded. If the default for platform values is "include", this is included. If the default for platform values is "exclude", this is excluded.

Attributes

Name Description Data Type Default Value Required?
id Allows an ID to be specified for the map. Note that maps do not require IDs (unlike topics), and the map ID is not included in references to elements within a map. ID #IMPLIED No
conref This attribute is used to reference an ID on a map that can be reused. See The conref attribute for examples and details about the syntax. CDATA #IMPLIED No
conrefend The conrefend attribute is used when reusing a range of elements through conref. The syntax is the same as for the conref attribute; see The conrefend attribute for examples. CDATA #IMPLIED No
conaction This attribute enables users to push content into a new location. See The conaction attribute for examples and details about the syntax. (mark | pushafter | pushbefore | pushreplace | -dita-use-​conref-​target) #IMPLIED No
conkeyref Allows conref to operate using a key instead of a URI. See The conkeyref attribute for more details about the syntax and behaviors. CDATA #IMPLIED No
anchorref Identifies a location within another map file where this map will be anchored at runtime. Resolution of the map is deferred until the final step in the delivery of any rendered content. For example, anchorref="map1.ditamap/a1" causes this map to be pulled into the location of the anchor point "a1" inside map1.ditamap when map1.ditamap is rendered for delivery. CDATA #IMPLIED No
xmlns:ditaarch Declares the default DITA namespace. "http://dita.​oasis-open.​org/​architecture/​2005/"
DITAArchVersion Designates the version of the architecture that is in use. The default value will increase with each release of DITA. CDATA "1.2" No
domains Indicates the specialized domains that are included in the DTD or Schema. This value will differ depending on what domains are included in the current DTD or Schema. CDATA Varies based on the DTD or Schema; a sample value is "(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic indexing-d)" No
collection-type Collection types describe how links relate to each other. The processing default is "unordered", although no default is specified in the DTD or Schema.
unordered
Indicates that the order of the child topics is not significant.
sequence
Indicates that the order of the child topics is significant; output processors will typically link between them in order.
choice
Indicates that one of the children should be selected.
family
Represents a tight grouping in which each of the referenced topics not only relates to the current topic but also relate to each other.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.

Usage of the collection-type attribute on <reltable> and <relcolspec> is currently undefined and reserved for future use.

(unordered | sequence | choice | family | -dita-use-​conref-​target) #IMPLIED No
processing-role Describes the processing role of the referenced topic. The default for this attribute on this element is "resource-only". If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
normal
Normal topic that is a readable part of the information.
resource-only
The topic is used as a resource for processing purposes, but is not a readable unit of information on its own. This topic should not be included in a rendered table of contents, and the topic should not be rendered on its own.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(normal | resource-only | -dita-use-​conref-​target) resource-only No
type Describes the target of a reference. See The type attribute for detailed information on supported values and processing implications. CDATA #IMPLIED No
scope The scope attribute identifies the closeness of the relationship between the current document and the target resource. See The scope attribute for more information on values. (local | peer | external | -dita-use-​conref-​target) #IMPLIED No
locktitle If locktitle is set to "yes", the <navtitle> element or @navtitle attribute is used if it is present. Otherwise, the navtitle is ignored and the navigation title is retrieved from the referenced file.

Note

The @navtitle attribute is deprecated in favor of the <navtitle> element. When both a <navtitle> element and a navtitle attribute are specified, the <navtitle> element should be used.
yes
The navtitle in the map is used.
no
The navtitle or title of the topic is used. This is the processing default.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(yes | no | -dita-use-​conref-​target) #IMPLIED No
format The format attribute identifies the format of the resource being referenced. See The format attribute for details on supported values. CDATA #IMPLIED No
linking Defines some specific linking characteristics of a topic's current location in the map. If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
targetonly
A topic can only be linked to and cannot link to other topics.
sourceonly
A topic cannot be linked to but can link to other topics.
normal
A topic can be linked to and can link to other topics. Use this to override the linking value of a parent topic.
none
A topic cannot be linked to or link to other topics.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(targetonly | sourceonly | normal | none | -dita-use-​conref-​target) #IMPLIED No
toc Specifies whether a topic appears in the table of contents (toc); on this element the default is no. This value defaults to no for elements such as reltable, which typically cannot appear in the toc, and for elements such as glossref that generally are not desired in the toc. (yes | no | -dita-use-​conref-​target) "no" No
print Specifies whether the topic should be included in a print-specific rendition, such as PDF. The processing default is "yes". If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
yes
Include the topic in the print-oriented file.
no
Do not include the topic in a print-oriented file.
printonly
Only include the topic when rendering the DITA content in a print-oriented context; the topic should not be included in other contexts, such as when rendering as HTML.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(yes | no | printonly | -dita-use-​conref-​target) #IMPLIED No
search Describes whether the target is available for searching. If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
yes
no
-dita-use-​conref-​target
(yes | no | -dita-use-​conref-​target) #IMPLIED No
chunk When a set of topics is transformed using a map, the chunk attribute allows multi-topic documents to be broken into smaller files and multiple individual topics to be combined into larger combined documents.

For a detailed description of the chunk attribute and its usage, see Chunking in the DITA Architectural Specification.

CDATA #IMPLIED No
select-atts attribute group (props, base, platform, product, audience, otherprops, importance, rev, status) A set of related attributes, described in select-atts attribute group
localization-atts attribute group (translate, xml:lang, dir) A set of related attributes, described in localization-atts attribute group.
global-atts attribute group (xtrf, xtrc) A set of related attributes, described in global-atts attribute group
class, outputclass Common attributes described in Other common DITA attributes

Was this helpful?