A subject scheme map allows you to create and manage custom profiling values in DITA documents without having to write a DITA specialization. Ultimately, this allows you to filter and flag content in Author mode or in transformed output.
Subject scheme maps use key definitions to define a collection of profiling values. You can also use subject scheme maps to filter out (reject) the values for certain attributes so that you only see the attributes or values that you want to use in Author mode or the transformed output.
@type
attribute needs to be set to subjectScheme for the reference, as in the
following
example:<topicref href="test.ditamap" format="ditamap" type="subjectScheme"/><navtitle> element). This element is not
required, but if you use it, the text that you enter for the <navtitle>
will be used (instead of the name of the value) in the various places where profiling attributes are presented in Oxygen XML Author Eclipse plugin.
An example of when this might be helpful is if you want to use abbreviations for the
name of a value, but you want to see its full name in Oxygen XML Author Eclipse plugin.<attributedef> and <subjectdef> elements
inside the <enumerationdef> element. Notice that in the examples below, the audience attribute is bound to the
audienceKey value.outputclass="single_value" to specify that a
certain attribute only accepts a single value at a time and the attribute will be
presented in Oxygen XML Author Eclipse plugin with radio buttons instead of checkboxes. For
example: <enumerationdef outputclass="single_value">
<attributedef name="audience"/>
<subjectdef keyref="audienceKey"/>
</enumerationdef>You can also define a specific set of possible
attribute values for a specific attribute name that is set on a specific element name.
For example, you can define a specific set of @outputclass attribute
values only for the <image>
element: <enumerationdef>
<elementdef name="image"/>
<attributedef name="outputclass"/>
<subjectdef keyref="imgOutputClassValuesKey"/>
</enumerationdef>props and
otherprops attributes in the examples below). This means that those attributes will not appear
in the various places where profiling attributes are presented in Oxygen XML Author Eclipse plugin.subjectScheme. The easiest way
to do this is:audience attribute in a hierarchical subject scheme
is surgeon and it has two subordinate values of
neuro-surgeon and plastic-surgeon (see the examples below). You could create a DITAVAL file with the following
content:<val>
<prop action="exclude" att="audience" val="surgeon"/>
</val>That DITAVAL file could then be used for a condition
set to filter content in Author mode or during the
transformation stage to filter
content in the output and the neuro-surgeon and
plastic-surgeon values would be excluded by the filter since the subject
scheme defines them as subordinate values of the surgeon value.
This example uses typical audience values for medical personnel
(therapist, oncologist, physicist,
radiologist, surgeon, and so on). The
audience attribute is bound to the audienceKey value
(which defines the tree of values). You can also see that it filters out all possible values
for other attributes (props and otherprops) so that they
won't be available in the various places where profiling attributes are presented in Oxygen XML Author Eclipse plugin.
Example using Author mode controls:
<subjectScheme>
<!-- A scheme that defines audience user values -->
<subjectdef keys="audienceKey">
<subjectdef keys="therapist"/>
<subjectdef keys="oncologist"/>
<subjectdef keys="physicist"/>
<subjectdef keys="radiologist"/>
<subjectdef keys="surgeon">
<subjectdef keys="neuro-surgeon"/>
<subjectdef keys="plastic-surgeon"/>
</subjectdef>
</subjectdef>
<!-- Binding the audience attribute to the values defined in the key -->
<enumerationdef>
<attributedef name="audience"/>
<subjectdef keyref="audienceKey"/>
</enumerationdef>
<!--Reject all possible values for other profiling attributes-->
<enumerationdef>
<attributedef name="props"/>
<subjectdef/>
</enumerationdef>
<enumerationdef>
<attributedef name="otherprops"/>
<subjectdef/>
</enumerationdef>
</subjectScheme>For more information about using a DITA subject scheme map, watch our video demonstration: