Document Types > Using a Schematron > Using a Schematron with a Document Type
  
Using a Schematron with a Document Type
Arbortext Architect allows you to associate Schematron files with your document type. Support is provided for the ISO standard version of Schematron as defined in the ISO/IEC 19757-3:2006 standard. This version of Schematron is available from the ISO Publicly Available Specifications list. Note that Arbortext Architect uses the standard Schematron namespace (http://purl.oclc.org/dsdl/schematron). If you have an existing Schematron that uses the previous http://www/ascc.net/xml/schematron namespace, you must update your Schematron before using it with Arbortext products.
Arbortext Architect enables you to both create a new Schematron for your document type and to edit an existing Schematron. You can have multiple Schematron file for a given document type. By default, Arbortext products expect the Schematron associated with a document type to be in the document type directory and to be named doctypename.sch. You can override the default and provide alternatives through the document type configuration (.dcf) file or with the doc_type_schematron_file ACL function. Note that if your document type is an XML schema and you have integrated the Schematron rules into that Schema, you must use either the .dcf file or the doc_type_schematron_file function to set the Schematron files to doctypename.xsd.
When your document type has a Schematron or Schematrons associated with it, you can validate a document against the Schematrons through the Arbortext EditorTools > Check Completeness feature. Any resulting Schematron warnings are reported in the Schematron Warnings category of the Completeness Check Log window.
A Schematron document type is in Arbortext-path\doctypes\schematron directory. Note that the schematron.xsd file there is non-normative. There are some differences in the definition of the pattern and rule elements in that schema.
The following two sample Schematron files are located in the Arbortext-path\samples\schematron directory:
axdocbook.sch — A sample file for the Arbortext XML DocBook V4.0 document type
This sample provides some example Schematron tests for this document type.
dcfdtd.sch — A sample file for the .dcf file document type
This sample provides example Schematron tests that are the same as Arbortext Editor uses when validating a .dcf file without a Schematron.
You can copy the sample file into the document type directory for one of these document types to associate the sample with that document type. You can then edit a document for that document type in Arbortext Editor and use the Check Completeness feature to see how Schematron warnings are reported. You can also open the document type in Arbortext Architect to view the sample Schematron file.