<?xml-model?> is processing instruction which can be used for associating schema with an XML document. It can be used for associating schema written in any schema language (including RELAX NG, W3C XML Schema, DTD and Schematron) and several schemas can be associated at the same time.
It is especially useful when ad-hoc schema has to be used for document validation and it's impractical to setup schema association indirectly.
Syntax of <?xml-model?> processing instruction is
similar to a well known <?xml-stylesheet?> processing
instruction. The simplest usage is just to
use href
attribute to reference desired
schema.
<?xml version="1.0" encoding="utf-8"?> <?xml-model href="my-schema.rng"?> <document> ... </document>
Specification for <?xml-model?> was jointly developed by the W3C and ISO/IEC JTC1/SC34. Technically identical specification is available from both places:
The following tools are supporting <?xml-model?> processing instruction:
If you know tool which supports <?xml-model?> and it is not listed here please let me know.
This site is maintained by Jirka Kosek. I am member of XML Guild and my XML related thoughts can be found on my blog.