Schematron Data Validation
Schematron and XSLT-Based Data Validation Are Fully Supported with Validation Models in the eiConsole’s Validation Editor and XML Validation Processor
While XML Schema is easily the most common means of dictating the structure of an XML instance document, it has some significant limitations.
For instance, XML schema cannot:
- Describe elements that are conditionally required based on the existence or contents of another node
- Place requirements on nodes identified by anything other than type (e.g., position in the DOM)
- Allow for customized, human-readable error messages
Schematron is an ISO-standard alternative or complement to XML Schema. Rather than providing a grammar-based schema language, Schematron is written in XPath-based assertions. This approach allows for pattern-based definition of rules which in turn address each of the aforementioned limitations of XML Schema.
XSLT is declarative language for XML transformations. While the main use of XSLT in the eiConsole is for this purpose, it may also be used to implement Schematron or independently describe more complex data validation or business rules.
Validation Models in the eiPlatform and eiConsole provide full support for Schematron and XSLT-based data validation.