To support extensibility and pluggability, DITA requires that an XML schema implementation of structural and domain specialization modules conform to well-defined design patterns.
This section describes those design patterns. These design patterns realize the specialization architecture with the capabilities and within the limitations of the XML schema grammar.
<xs:redefine schemaLocation="topicMod.xsd" > <xs:complexType name="topic.class"> <xs:complexContent> <xs:extension base="topic.class"> <xs:attribute name="domains" type="xs:string" default="(topic ui-d) (topic hi-d) (topic sw-d) (topic pr-d) (topic ut-d)"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:redefine>
<xs:group name="info-types"> <xs:choice> <xs:group ref="concept-info-types"/> </xs:choice> </xs:group>
<xs:group name="concept-info-types"> <xs:choice> <xs:group ref="concept"/> </xs:choice> </xs:group>
The module schema document defines every specialized element used as substructure within the structural type. The specialized elements must follow the rules of the architecture in defining content models and attributes. The naming convention for content models must use the root structural element name and.class.
In particular, the module schema document defines a class attribute for every specialized element. The class attribute must include the value of the class attribute of the base element and append the element name qualified by the root structural element name or domain name with at least one leading and trailing space. The class attribute for an element introduced by structural specialization must start with a minus sign.
The model group schema document defines model groups for each new specialized element in a structural type. Each structural type and domain must have a model group schema document . The model group schema document is an essential part of the specialization.
<xs:group name="concept"> <xs:sequence> <xs:element ref="concept"/> </xs:sequence> </xs:group>
A domain type schema document with a name consisting of the domain name and the Domain.xsd extension.
As in a structural module, the domain module must define each specialized element, its attributes and its model groups. As with any specialization, the domain element must restrict the base element. The class attribute of the domain element must start with a plus sign but, otherwise, follows the same rules as the class attribute for an element introduced by a topic specialization.
For each element extended by one or more domains, the domain type schema document defines a model group for the base element to a list of alternatives including the literal name of the element and the element extension entity from each domain that is providing specializations.
<xs:group name="ui-d-ph"> <xs:choice> <xs:element ref="uicontrol" /> <xs:element ref="menucascade" /> </xs:choice> </xs:group>
<xs:group name="pre"> <xs:choice> <xs:group ref="pre" /> <xs:group ref="pr-d-pre" /> <xs:group ref="ui-d-pre" /> <xs:group ref="sw-d-pre" /> </xs:choice> </xs:group>
<xs:group name="pre"> <xs:choice> <xs:group ref="pre"/> <xs:group ref="pr-d-pre" /> <xs:group ref="domainName-d-element"/> </xs:choice> </xs:group>
OASIS DITA Architectural Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.