Home > CDX > Business Rules and DOH Tasks > About Schematron Files

About Schematron Files

Table of contents
No headers

Schematron files, XML representations of Business Rules, play a key role in validating run records. To better understand the role of schematron files, a basic understanding of the validation process is required.

To validate a run record, several checks and balances must be completed to ensure the accuracy, completeness, and compliance of the data being submitted. The first of these checks involves the NEMSIS XML Schema, also referred to as an XSD. To begin, the XML Schema checks an XML document (the run record) to ensure its adherence to the basic rules of XML; for example, the schema verifies all elements are in tags and have both an opening <tag> and closure </tag>.

If all elements meet the requirements, the XML document is checked for validity to verify the elements conform to the schema. An XML Schema defines the rules for the data an XML document can contain and how it can be structured. For example, the NEMSIS Schema may indicate that an element can occur only once, must contain a string, and/or cannot exceed 50 characters in length. Other parameters the NEMSIS Schema checks include the:

  • Locations of elements

  • Groupings of elements

  • Recurrences of elements

  • Data types (strings, integers, and so forth)

  • Minimum and maximum values

  • Patterns (using regular expressions)

The NEMSIS Schema cannot perform every check, however, and it cannot cross-check data between elements. It cannot, for example, recognize that response times must occur in a certain order (Dispatched must come before On Scene). Therefore, schematron files are used to complete the validation process.

Schematron files catch what the NEMSIS Schema cannot. After the first NEMSIS XML Schema check, the run record is checked against the schematron rules file. An XML document, the schematron file contains patterns, rules, and asserts that can quickly identify additional errors in a run record. Unlike the NEMSIS XML Schema, schematron can denote both Warnings and Errors. Thus, the schematron may not reject a document due to a Warning; this is why it is possible to correct Errors in the run record but still submit it despite prevailing Warnings.

With schematron files, administrators can add rules as applicable to their department, ensuring the run records meet not only the State standards, but also the standards of each individual department. Learn more about schematron files and how they are used in TripTix CDX by reading the following related articles:

Last modified



This page has no classifications.