Associating Schematron with documents in editors

Plus a link to a video!

By Rick Jelliffe
May 21, 2009 | Comments: 1

I see that there is an effort at ISO SC34 WG1 to try to get an agreed on way to associate documents with schemas. XSD has its hints like @xsi:schemaLocation, but it has the flaw of needing the schema to be altered in order to allow the document with the hint to be valid. A PI is clearly a much less intrusive approach, with the model being <?xml-stylesheet?>

Topologi has long used a PI at the top to give the document a label, which can then be used to select a configuration file. It was one of my projects to push ahead with getting such a PI (George Bina from Oxygen was onside too) before my surgical adventures of a couple of years intervened: I am glad that others in WG1 are taking this up.

XMLBlueprint XML Editor version 7 has been released. Among the new features is support for ISO Schematron - Validation and XML Completion, including a Schematron editor. Documents can be associated with Schematron schemas using a processing instruction <?blueprint schematron="book.sch"?>

I see also that the most recent version of Oxygen XML also supports a good range of the ISO DSDL spectrum: ISO Schematron (including abstract patterns and XSLT2 constraints), RELAX NG, NVDL. Documents can be associated with Schematron schemas using a processing instruction <?oxygen SCHSchema="file:/C:/work/book.sch" type="xml"?>

Oxygen also have a good short video introduction to Schematron for programmers that I recommend.

XML Mind also supports ISO Schematron, They have a PI for associating RELAX NG schemas, but I didn't see one for Schematron.

However, I was really pleased to see how they supported phases (a mechanism in Schematron that groups patterns so that you run some and not others): according to their configuration guide you can actually use an expression in their configuration file to decide which phase to use: excellent!

The Eclipse Schematron editor plug-in has a PI <?schematron-schema href="book.sch"?>


You might also be interested in:

1 Comment

UPDATE: Standards bodies ISO/IEC JTC1 SC34 and W3C have collaborated on a standard processing instruction now. Great!

See http://www.w3.org/XML/2010/01/xml-model/

News Topics

Recommended for You

Got a Question?