A shell document type integrates one or more topic type or map type modules, zero or more domain modules, and zero or more constraint modules. A shell XSD is organized into sections, where each section contains a specific type of declaration.
An XSD document type shell must conform to the following coding requirements. XSD document type shells may not directly declare element types or attributes (except for the @domains attribute, which always reflects the details of the domains and structural types integrated by the shell).
DITA XSDs use the XML Schema redefine feature (xs:redefine) to override base group definitions for content models and attribute lists. This facility is analogous to the parameter entities used for DTDs. Unlike DTD parameter entities, an xs:redefine both includes the XSD file it redefines and holds the redefinition applied to the groups in the included XSD file. Thus, for XSD files that define groups, the file may be included via xs:include if it is used without modification or via xs:redefine if any of its groups are redefined.
Shell XSDs are organized into sections. Each section of the shell XSD is introduced by a comment. Shells should use these comments to identify each section of the shell. Each section should be present in the shell XSD, even if the section contains no declarations, and should occur in the order they are presented here. Shell XSDs should have an initial set of comments that describe the shell and indicate the URNs or absolute URLs by which the shell should be referenced from document instances or otherwise associated with documents. Shell XSDs may use the XSD appinfo and documentation elements to contain additional documentation about the shell.
The element domain inclusion section contains includes of each element domain integrated by the shell. This section should use the comment:
<!-- ================ ELEMENT DOMAINS ===================== -->
<xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:programmingDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:softwareDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:highlightDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:uiDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:utilitiesDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:indexingDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:hazardstatementDomain.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:abbreviateDomain.xsd:1.2" />
<!-- ================ ATTRIBUTE DOMAINS ===================== -->
<xs:include schemaLocation="urn:example.com:dita:domains:newAtt.xsd" />
<!-- ================ GROUP DEFINITIONS ===================== -->
For both map and topic shells, this section must include or redefine the common element group, the metadata declaration group, and the table model group.
<xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:taskGrp.xsd:1.2" /> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:metaDeclGrp.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:tblDeclGrp.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:topicGrp.xsd:1.2"/>
<xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:tblDeclGrp.xsd:1.2"/> <xs:redefine schemaLocation="urn:oasis:names:tc:dita:xsd:mapGrp.xsd:1.2"> <xs:group name="topicref"> <xs:choice> <xs:group ref="topicref"/> <xs:group ref="mapgroup-d-topicref"/> <xs:group ref="learningmap-d-topicref"/> </xs:choice> </xs:group> </xs:redefine> <xs:redefine schemaLocation="urn:oasis:names:tc:dita:xsd:commonElementGrp.xsd:1.2"> <xs:group name="index-base"> <xs:choice> <xs:group ref="index-base"/> <xs:group ref="indexing-d-index-base"/> </xs:choice> </xs:group> </xs:redefine> <xs:redefine schemaLocation="urn:oasis:names:tc:dita:xsd:metaDeclGrp.xsd:1.2"> <xs:group name="metadata"> <xs:choice> <xs:group ref="metadata"/> <xs:group ref="learningmeta-d-metadata"/> </xs:choice> </xs:group> <xs:group name="keywords"> <xs:choice> <xs:group ref="keywords"/> <xs:group ref="delay-d-keywords"/> </xs:choice> </xs:group> </xs:redefine>
<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>
<xs:attributeGroup name="props-attribute-extensions"> <xs:attributeGroup ref="props-attribute-extensions"/> <xs:attributeGroup ref="newAtt-d-attribute"/> <xs:attributeGroup ref="othernewAtt-d-attribute"/> </xs:attributeGroup> <xs:attributeGroup name="base-attribute-extensions"> <xs:attributeGroup ref="base-attribute-extensions"/> <xs:attributeGroup ref="newfrombaseAtt-d-attribute"/> <xs:attributeGroup ref="othernewfrombaseAtt-d-attribute"/> </xs:attributeGroup>
<!-- ================= MODULE INCLUDE DEFINITION ================== -->
<xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:commonElementMod.xsd:1.2"/> <!-- ======== Table elements ======== --> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:tblDeclMod.xsd:1.2"/> <!-- ======= MetaData elements, plus keyword and indexterm ======= --> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:metaDeclMod.xsd:1.2"/> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:topicMod.xsd:1.2" /> <xs:include schemaLocation="urn:oasis:names:tc:dita:xsd:conceptMod.xsd:1.2" />
<!-- ================= DOMAINS ATTRIBUTE DECLARATION ================== -->
<xs:attributeGroup name="domains-att"> <xs:attribute name="domains" type="xs:string" default="domain usage declarations" /> </xs:attributeGroup>
<xs:attributeGroup name="domains-att"> <xs:attribute name="domains" type="xs:string" default="(map mapgroup-d) (topic delay-d) (topic indexing-d) (topic learningmeta-d) (map learningmap-d) " /> </xs:attributeGroup>
<!-- ================= INFO TYPES DEFINITION ================== -->
This section must not be included in map shells.
<xs:group name="info-types"> <xs:sequence/> </xs:group>
<xs:redefine schemaLocation="urn:oasis:names:tc:dita:xsd:conceptMod.xsd:1.2" > <xs:group name="concept-info-types"> <xs:choice> <xs:group ref="concept-info-types"/> <xs:group ref="topic"/> </xs:choice> </xs:group> </xs:redefine>
Note that XSD rules require that the redefined group include a reference to itself in addition to any other components specified for the redefined group.
Return to main page.
DITA v1.2 CS 01
Copyright © OASIS Open 2005, 2010. All Rights Reserved.