What does mapmod means in DITA

35 Views Asked by At

I am new to DITA world and looking at the DITA 1.3 I found we have map.xsd, topic.xsd...etc. But at the same time there's mapMod.xsd, topicMod.xsd...etc.

What does the "mod" stand for? What's the difference between map and mapmod (topic and topicmod)?

Also map vs mapGrp vs mapGroupMod

2

There are 2 best solutions below

0
mamift On BEST ANSWER

What does the "mod" stand for? What's the difference between map and mapmod (topic and topicmod)?

'Mod' just stands for 'module' where the word 'module' here is used to just refer XML Schema definitions that are linked together by xs:import or xs:redefine in the same file. If you take a look at mapmod.xsd there's a comment at the top of the file:

<!-- MODULE: DITA MAP XSD Module -->

In map.xsd, it imports mapmod.xsd:

<xs:redefine schemaLocation="mapMod.xsd">

It's basically a way to break up schemas into smaller components, with the added benefit that those components can be re-usable. mapmod.xsd is also imported by bookmap.xsd.

The same with topic.xsd that imports topicMod.xsd:

<xs:redefine schemaLocation="topicMod.xsd">

NOTE: xs:redefine is similar to xs:import but it also allows overriding a schema definition for a complexType or group or attributeGroup so long as the namespaces are the same.

Also map vs mapGrp vs mapGroupMod

The mapGrp.xsd file is so named (with 'Grp' in the filename) because it contains only xs:group definitions, and again is a schema file that is also imported by bookmap.xsd.

mapGroupMod.xsd contains both xs:group, xs:attributeGroup, xs:element definitions that are related, hence are in the same file (i.e a module). If you look inside mapGroupMod.xsd there's a comment:

<!--PURPOSE:    Define elements and specialization attributes    -->
<!--            for Map Group Domain                             -->

'Map group' refers the conceptual grouping of XML elements that make up a map in the DITA spec: https://docs.oasis-open.org/dita/v1.2/os/spec/common/map_elements.html

map.xsd essentially is the schema file that brings it all together, as it imports mapMod.xsd and mapGroupMod.xsd.

NOTE: The above links are for an older version of DITA, it may not match the version you have, I linked to them as they are online as a convenient reference.

0
Radu Coravu On

The DITA XML standard comes with schemas used to validate DITA XML documents. There are three types of schemas shipped with the DITA XML standard: DTD, XML Schema and Relax NG schemas. The most commonly used schemas in practice are the DTDs. You seem to refer to the XML schema modules. This part of the DITA 1.2 specification seems to cover what each of those module files does for XML Schemas: https://docs.oasis-open.org/dita/v1.1/CD01/archspec/schemaorganization.html

The standard imposes that the schemas used for DITA XML validation should be structured in a certain way: https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/coding-requirements.html