Skip to content
jelovirt edited this page May 20, 2011 · 7 revisions

ISO Schematron schema for DITA

ISO Schematron schema for DITA 1.1 and 1.2 that handles cases that DTDs or XML Schemas cannot control. The current implementation covers for example:

  • nesting links inside links or titles
  • deprecated attributes and attributes
  • attributes not intended for author use.

Usage

The schema comes in four parts,

  • dita-1.1-for-xslt1.sch
  • dita-1.2-for-xslt1.sch
  • dita-1.1-for-xslt2.sch
  • dita-1.2-for-xslt2.sch

for different DITA and XSLT query binding versions. The schema has four phases:

mandatory
constraints in the DITA language specification prose
recommendation
constraints and recommendations in the DITA language specification prose
author
recommendations for authors
other
combination of recommendation and author phases

Validation is also available as a DITA-OT plug-in.

Source extensions

The Schematron source uses the following extension attributes in http://github.com/jelovirt/dita-schematron namespace:

e:extends
List of phase element identifiers. The contents of the referenced phase elements are imported as the first children of the phase, in the order.
e:ditaVersions
List of DITA versions. The attribute is used to filter out pattern elements which are not applicable for a given DITA version..

The extension attributes are stripped by the build process from the distributed schema files.