Implementation: Creates RDF statements for each detected pattern in a schema: the original patterns and rules are available as statements. The context element of the patterns is located by an XPointer. Beta only:
Author: Rick Jelliffe
Current version: 1999-11-1

Intro: The RDF output can not only show where a schema tree-pattern has failed (using the assert element) but also it can detect tree-patterns (using the report element). In this way, you can use this Schematron to parse general marked-up text for patterns: this can allow the fast creation of large RDF indexes for regular documents based on their markup.

Details: Here is an example of RDF output. The example is WAI: see below for the data and schema.

schematron-rdf.xsl is a Schematron that puts out the messages as an RDF  document with XPointer links to the element that caused the error or report.

In this version there must also be an external file called config.xml. It contains the URL of the document to be tested. Here is an example.


Download schematron-rdf.xsl .


So the order is

xt schemafile.xml schematron-rdf.xsl  xxx.xsl
xt testfile.xml xxx.xsl outfile-rdf.xml

Example Schematron Schemas

Here are is a demonstration schema.

WAI: Web Accessability Inititative Guidelines

Many of the WAI guidelines can be turned into a schema easily. Here is the schema, and here is an evil test file. And here is the result, as generated by schematron-report.

Of course, any HTML in XML file or XHTML file can be used. The test file is certainly not good or even valid HTML (against the HTML DTDs). But you can see that this WAI schema does not require documents that are valid; it only is interested in validating the patterns that WAI is interested in. (Actually, I have just made each section in the WAI guidelines into a pattern: this perhaps is slack, since really a pattern should be a bunch or rules that are somehow interconnecting.)

Here is the same schema and document represented in RDF.

Copyright (C) Rick Jelliffe, Academia Sinica Computing Centre. The Schematron software and this page are available for any public use, under the conditions of the GPL or MPL, but please mention our names in any documentation or About screens for any products that uses it. Comments, fixes and upgrades welcome: email