Validating text input
More formally, the nodes and arcs within a graph of data can be traversed to both identify nodes, and then make assertions about the relationships of those nodes to others within the same graph.
Assertions are therefore the mechanism for placing constraints on the relationships between nodes in a graph (elements and attributes in an XML document).
Tree patterns do just that, and XPath provides a convenient syntax in which to express those patterns.
Validation using tree patterns is a two-step process: Both the candidate object selection, and the assertions can be defined in terms of XPath expressions.
The Schematron conformance language for custom implementation is also introduced.
The paper completes with some suggestions of possible future extensions.
The use of XML syntax provides additional flexibility through leveraging existing tools for markup manipulation, while the 'value added' features satisfy the requirements of developers looking for closer integration with databases and object-oriented languages.There is no enforcement that an IDREF must point to an ID on a particular element type, simply that is must point to an existing ID, and further that all IDs must be unique.Having highlighted the fact that the existing schema paradigm can only express constraints among data items in terms of the child and sibling axes, it is natural to consider whether an alternate paradigm might allow a schema author to exploit these additional relationships to define additional types of constraint amongst document elements.This comes at very little cost: XPath is available in most XML environments.For example the following types of constraint are hard, or impossible to express with other schema languages.
This paper provides an introduction to Schematron; an innovative XML validation language developed by Rick Jelliffe.