###### 2.1.4.3.8.2.2 Structural specialization coding requirements

An XSD structural module declares a top-level map or topic type, implemented as a pair of XSD documents, one that defines groups used to integrate and override the type and one that defines the element types specific to the type.

A structural type module must conform to the following coding requirements in addition to the general module coding requirements:

###### Module files

A structural vocabulary module must have two files:

- A module schema document. The file name is the name of the root structural element plus Mod plus the .xsd extension. For example, conceptMod.xsd is the module schema document for the concept topic type.
- A module group definition schema document. The file name is the name of the root structural element plus Grp plus the .xsd extension. For example, conceptGrp.xsd is the module group definition schema document for the concept topic type.

###### Structural module schema document

The root element must reference the @DITAArchVersion attribute and the @domains attribute. These attributes give processors a reliable way to check the architecture version and look up the list of domains available in the document type. The @DITAArchVersion attribute is referenced as in the following example:

    <xs:attribute name="id" type="xs:ID" use="required"/>
    <xs:attribute ref="ditaarch:DITAArchVersion" />

See 2.1.4.2.2 XSD document-type shell: Coding requirements for information on how to set the values for the domains attibute for XSD shells.

For topic modules, the last position in the content model must be the topictype-info-types nested topics group as in the following example of the root element of the concept topic:

    <xs:complexType name="concept.class">
      <xs:sequence>
        <xs:group ref="title"/>
        <xs:group ref="titlealts" minOccurs="0"/>
        <xs:choice minOccurs="0">
          <xs:group ref="shortdesc" />
          <xs:group ref="abstract" />
        </xs:choice>
        <xs:group ref="prolog" minOccurs="0"/>
        <xs:group ref="conbody" minOccurs="0"/>
        <xs:group ref="related-links" minOccurs="0"/>
        <xs:group ref="concept-info-types" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      ...
    </xs:complexType>

###### Topic module schema document

For topic modules, the module schema document must define an info-type model group. The name of this group is the topic element name plus -info-types. Thus, the info-type model group for the concept topic type is concept-info-types. The following example shows how this group is defined in conceptMod.xsd:

    <xs:group name="concept-info-types">
      <xs:choice>
        <xs:group ref="concept" minOccurs="0"/>
        <xs:group ref="info-types" minOccurs="0"/>
      </xs:choice>
    </xs:group>

Previous Topic: 2.1.4.3.8.2.1 General element type declaration coding requirements

Next Topic: 2.1.4.3.8.2.3 Attribute domain coding requirements

Parent Topic: 2.1.4.3.8.2 XSD schema specialization module coding requirements

Sibling Topics:

2.1.4.3.8.2.1 General element type declaration coding requirements

2.1.4.3.8.2.3 Attribute domain coding requirements