index.html 28.2 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Associating Schemas with XML documents 1.0 (Second Edition)</title><style type="text/css">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

ol.enumar      { list-style-type: decimal; }
ol.enumla      { list-style-type: lower-alpha; }
ol.enumlr      { list-style-type: lower-roman; }
ol.enumua      { list-style-type: upper-alpha; }
ol.enumur      { list-style-type: upper-roman; }

.ednote { background-color: #d0ffff; }


div.exampleInner pre { margin-left: 1em;
                       margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em; margin-top: 1em; }
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}
</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE.css"></head><body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a></p>
<h1><a name="title" id="title"></a>Associating Schemas with XML documents 1.0 (Second Edition)</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Group Note 11 August 2011</h2><dl><dt>This version:</dt><dd> <a href="http://www.w3.org/TR/2011/NOTE-xml-model-20110811/">http://www.w3.org/TR/2011/NOTE-xml-model-20110811/</a> </dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xml-model/">http://www.w3.org/TR/xml-model/</a></dd><dt>Previous version:</dt><dd><a href="http://www.w3.org/TR/2010/NOTE-xml-model-20100415/">http://www.w3.org/TR/2010/NOTE-xml-model-20100415/</a></dd><dt>Editors:</dt><dd>Paul Grosso, PTC/Arbortext <a href="mailto:pgrosso@ptc.com">&lt;pgrosso@ptc.com&gt;</a></dd><dd>Jirka Kosek <a href="mailto:jirka@kosek.cz">&lt;jirka@kosek.cz&gt;</a></dd></dl><p>This document is also available in these non-normative formats: <a href="xml-model.xml">XML</a>.</p><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy;&nbsp;2011&nbsp;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&reg;</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr><div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2><p>This document allows schemas using any schema definition language to be associated with an XML document by including one or more processing instructions with a target of <code>xml-model</code> in the document's prolog.</p></div><div>
<h2><a name="status" id="status"></a>Status of this Document</h2><p><em> This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/. </em></p><p>Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This is <span>the second</span> publication of this document as a Working Group Note. This document is a product of the <a href="http://www.w3.org/XML/Core/">XML Core Working Group</a> as part of the <a href="http://www.w3.org/XML/Activity.html">W3C XML Activity</a>. The English version of this specification is the only normative version. However, for translations of this document, see <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xml-model"> http://www.w3.org/2003/03/Translations/byTechnology?technology=xml-model</a>. </p><p>The content of the first edition of this WG Note was reviewed by various audiences including ISO JTC1/SC34, and this second edition reflects changes due to those comments.</p><p> Please submit any comments on this document to <a href="mailto:xml-editor@w3.org">xml-editor@w3.org</a>; public <a href="http://lists.w3.org/Archives/Public/xml-editor/">archives</a> are available.</p><p>Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>However, this specification is being jointly developed by W3C and ISO/IEC JTC1/SC34. The technical content of this specification and that of ISO/IEC 19757-11 is expected to be identical, so the basic content of this WG Note may be&mdash;or may become&mdash;referenceable in another form.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/18796/status#disclosures">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2><p class="toc">1 <a href="#introduction"> Introduction</a><br>
2 <a href="#conformance-requirements"> Conformance requirements</a><br>
3 <a href="#the-xml-model-processing-instruction">The xml-model processing instruction</a><br>
</p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3><p class="toc">A <a href="#references">Normative References</a><br>
B <a href="#d0e666">Examples</a> (Non-Normative)<br>
C <a href="#d0e679">Suggested use of schematypens for determining schema language</a> (Non-Normative)<br>
</p></div><hr><div class="body"><div class="div1">
<h2><a name="introduction" id="introduction"></a>1  Introduction</h2><p><em>(This section is non-normative.)</em></p><p>There are several document schema definition languages in common use today that can be used to specify one or more validation processes performed against Extensible Markup Language (XML) documents. Some schema languages provide their own syntax for associating schemas with documents (DTD, W3C XML Schema) and some languages (RELAX NG, Schematron) do not provide schema association mechanisms at all. The purpose of this specification is to define a common, schema-agnostic syntax for associating schema documents written in any schema definition language with a given XML document.</p><p>This specification defines the syntax and processing expectations for an xml-model processing instruction. Such processing instructions associate one or more schemas with the XML document in which they are present. The associated schemas may be written in any schema definition language. Applications can use the associated schemas for any purpose including those such as document validation, content completion in interactive editors, or creating models for data binding. Presence of an xml-model processing instruction is not in itself an instruction to any processor to validate the document, nor is it a statement that the document is not to be processed without validation. It is a declarative statement of a relationship between the document and one or more external schemas. <span>This specification does not prescribe what, if anything, an application does with an xml-model processing instruction. The presence of an xml-model processing instruction referencing a DTD does not affect the validity of the document which contains it.</span></p><p>It should be noted that this specification is not meant as a replacement for other technologies that provide more general and indirect schema association features like NVDL and XProc. This specification is complementary technology which can be used when it is necessary to store ad-hoc schema associations directly inside XML document.</p></div><div class="div1">
<h2><a name="conformance-requirements" id="conformance-requirements"></a>2  Conformance requirements</h2><p>All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.</p><p>The key words <strong>must</strong>, <strong>must not</strong>, <strong>should</strong>, <strong>should not</strong> and <strong>may</strong> in the normative parts of this document are to be interpreted as described in RFC 2119. These words do not appear in all uppercase letters in this specification <a href="#rfc2119">[RFC2119]</a>.</p><dl><dt class="label">Documents</dt><dd><p>A document is considered to conform to this specification if it satisfies all <strong>must</strong>-level criteria in this specification that apply to documents.</p></dd><dt class="label">xml-model processors</dt><dd><p>XML defines an <a href="http://www.w3.org/TR/XML/#dt-app">application</a> as a software module which receives the information content of an XML document from an <a href="http://www.w3.org/TR/XML/#dt-xml-proc">XML processor</a>. [<a name="dt-xml-model-processor" id="dt-xml-model-processor" title="xml-model processor">Definition</a>: An <b>xml-model processor</b> is such an application which processes XML <a href="http://www.w3.org/TR/XML/#sec-pi">processing instructions</a> in accordance with this specification.] </p><p>An <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> <strong>may</strong> be part of a larger XML application, or <strong>may</strong> function independently. In either case, [<a name="dt-application" id="dt-application" title="application">Definition</a>: an <b>application</b> is the consumer of the pseudo-attribute information defined in this specification.]</p><p>An <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> is considered to be a conforming <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> if it satisfies all <strong>must</strong>-level criteria in this specification that apply to <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processors</a>; <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processors</a> do not have to check or enforce any of the constraints on documents.</p></dd></dl><p>This specification is defined with reference to the vocabulary for XML provided by the XML Information Set as well as the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing">rules for parsing pseudo-attributes from a string</a> as defined in the Associating Style Sheets with XML documents Recommendation <a href="#assocss">[ASSOCSS]</a>.</p><p>The productions in this specification use the same notation as used in the XML Recommendation. Tokens in the grammar and terms used in this specification that are not defined in this specification are defined in the XML Recommendation <a href="#xml">[XML]</a> or the Associating Style Sheets <a href="#assocss">[ASSOCSS]</a> Recommendation.</p></div><div class="div1">
<h2><a name="the-xml-model-processing-instruction" id="the-xml-model-processing-instruction"></a>3 The xml-model processing instruction</h2><p>[<a name="dt-potential-xml-model" id="dt-potential-xml-model" title="potential xml-model processing instruction">Definition</a>: A processing instruction information item is said to be a <b>potential xml-model processing instruction</b> if it has the [target] property <code>xml-model</code> and it is in the [children] property of a document information item and appears before the element information item of the document information item's [children] property.]</p><p>For such <a title="potential xml-model processing instruction" href="#dt-potential-xml-model">potential xml-model processing instructions</a>, <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processors</a> <strong>must</strong> report to the <a title="application" href="#dt-application">application</a> the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> of invoking the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing">rules for parsing pseudo-attributes from a string</a>, using the processing instruction information item's [content] property as the string.</p><p>[<a name="dt-xml-model" id="dt-xml-model" title="xml-model processing instruction">Definition</a>: A <a title="potential xml-model processing instruction" href="#dt-potential-xml-model">potential xml-model processing instruction</a> is said to be an <b>xml-model processing instruction</b> if the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> is not an error when invoking the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing">rules for parsing pseudo-attributes from a string</a>, using the processing instruction information item's [content] property as the string.]</p><p>Documents <strong>must not</strong> <span>use</span><span>contain</span> processing instruction information items with the [target] property <code>xml-model</code> <span>if they</span><span>that</span> are not <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a>.</p><p>An <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> <strong>must</strong> process all <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a> properly and <strong>must</strong> pass on to the <a title="application" href="#dt-application">application</a> the full <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> for each <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instruction</a>.</p><p>An <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instruction</a> will match the following production:</p>
<h5><a name="d0e351" id="d0e351"></a>Production for xml-model processing instruction</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-StyleSheetPI" id="NT-StyleSheetPI"></a>[1]&nbsp;&nbsp;&nbsp;</td><td><code>XmlModelPI</code></td><td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td><td><code>"&lt;?xml-model" (<a href="http://www.w3.org/TR/XML/#NT-S">S</a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#NT-PseudoAtts">PseudoAtts</a>)? - (<a href="http://www.w3.org/TR/XML/#NT-Char">Char</a>* "?&gt;" <a href="http://www.w3.org/TR/XML/#NT-Char">Char</a>*) "?&gt;"</code></td></tr></tbody></table><p>Documents <strong>may</strong> specify the following <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attributes</a> on <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a>, unless otherwise stated:</p><dl><dt class="label"><a name="PA-href" id="PA-href"></a><code>href</code></dt><dd><p>Specifies the location of the referenced schema. Documents <strong>must</strong> specify this <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a>. Documents <strong>must</strong> set the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a> to a string that matches the grammar for &lt;IRI-reference&gt; given in RFC 3987 <a href="#rfc3987">[RFC3987]</a>.</p></dd><dt class="label"><a name="PA-type" id="PA-type"></a><code>type</code></dt><dd><p>Specifies the content type of the referenced schema. If unspecified, the <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> should return a <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> that would be identical to that when the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a> is given as <code>application/xml</code>. The <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a> of this <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> is advisory in that it is intended to be used by an application only when no other source of media type information becomes available during retrieval of the <span>stylesheet</span><span>schema</span> itself.</p></dd><dt class="label"><a name="PA-schematypens" id="PA-schematypens"></a><code>schematypens</code></dt><dd><p>Specifies the namespace name of the schema language in which the referenced schema is written. The <a title="application" href="#dt-application">application</a> can use this value when determining whether it can make use of the referenced schema.</p></dd><dt class="label"><a name="PA-encoding" id="PA-encoding"></a><code>charset</code></dt><dd><p>Specifies the character encoding for the referenced schema. If specified, documents <strong>must</strong> set the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a> to a valid character encoding name, which <strong>must</strong> be the name or alias labeled as "preferred MIME name" in the IANA Character Sets registry, if there is one, or the encoding's name, if none of the aliases are so labeled <a href="#ianacharset">[IANACHARSET]</a>.</p></dd><dt class="label"><a name="PA-title" id="PA-title"></a><code>title</code></dt><dd><p>Gives the title (or other human readable description) of the referenced schema. If specified, documents <strong>may</strong> use any string as the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a>.</p></dd><dt class="label"><a name="PA-group" id="PA-group"></a><code>group</code></dt><dd><p>If, for any <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instruction</a>, its <a title="" href="#PA-group"><span><code>group</code></span></a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> has a non-empty <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a>, special rules for associating schemas apply as follows:</p><ol class="enumar"><li><p>By default only schemas which do not have a <a title="" href="#PA-group"><span><code>group</code></span></a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> specified or schemas which have an empty value in the <a title="" href="#PA-group"><span><code>group</code></span></a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> on the corresponding <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instruction</a> are treated as being associated with XML document.</p></li><li><p>An <a title="application" href="#dt-application">application</a> may provide an interface for specifying a group name. If the group name is specified, only schemas which have the same value specified in the <a title="" href="#PA-group"><span><code>group</code></span></a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> on the corresponding <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instruction</a> are considered to be associated with the XML document.</p></li></ol></dd><dt class="label"><a name="PA-phase" id="PA-phase"></a><code>phase</code></dt><dd><p>Gives the phase name of the validation function for use with a Schematron schema. If specified, documents <strong>may</strong> use any string as the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a>. If specified, the <a title="xml-model processor" href="#dt-xml-model-processor">xml-model processor</a> <strong>should</strong> include this information in the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> (regardless of the language of the associated schema).</p><p>If the associated schema is a Schematron schema, and the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-parsing-result">parsing result</a> includes the <a title="" href="#PA-phase"><span><code>phase</code></span></a> <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a>, then the <a title="application" href="#dt-application">application</a> is expected to use the <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-value">value</a> of this <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attribute</a> as the phase name of the validation function (see ISO/IEC 19757-3, Section 6.1 <a href="#iso-iec_19757-3_6.1">[ISO/IEC 19757-3]</a>).</p></dd></dl><p>To allow for extensibility, documents <strong>may</strong> specify other <a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/#dt-pseudo-attribute">pseudo-attributes</a> on <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a>.</p><p>This specification provides a way to associate multiple schemas with a given XML document. Furthermore, there exist other ways certain schemas can be associated with a given XML document. Regardless of the association method, this specification does not prescribe the processing order when multiple schemas are associated with a given XML document.</p><p>In particular, this specification does not define the interaction of <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a> with <code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code> attributes which provide hints for locating schema in W3C XML Schema. Applications supporting both <a title="xml-model processing instruction" href="#dt-xml-model">xml-model processing instructions</a> and <code>xsi:schemaLocation/xsi:noNamespaceSchemaLocation</code> attributes <strong>may</strong> provide means for specifying which information takes precedence.</p></div></div><div class="back"><div class="div1">
<h2><a name="references" id="references"></a>A Normative References</h2><dl><dt class="label"><a name="assocss" id="assocss"></a>ASSOCSS</dt><dd><a href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/"><cite>Associating Style Sheets with XML documents 1.0 (Second Edition)</cite></a>. W3C, <span>28 October 2010</span>.  (See http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/.)</dd><dt class="label"><a name="ianacharset" id="ianacharset"></a>IANACHARSET</dt><dd><a href="http://www.iana.org/assignments/character-sets"><cite>Character Sets</cite></a>. IANA, May 2007.  (See http://www.iana.org/assignments/character-sets.)</dd><dt class="label"><a name="infoset" id="infoset"></a>INFOSET</dt><dd><a href="http://www.w3.org/TR/xml-infoset/"><cite>XML Information Set</cite></a>, J. Cowan, R. Tobin. W3C, February 2004.  (See http://www.w3.org/TR/xml-infoset/.)</dd><dt class="label"><a name="iso-iec_19757-3_6.1" id="iso-iec_19757-3_6.1"></a>ISO/IEC 19757-3</dt><dd><cite>ISO/IEC 19757-3:2006. Information technology &mdash; Document Schema Definition Languages (DSDL) &mdash; Part 3: Rule-based validation &mdash; Schematron</cite>, International Organization for Standardization and International Electrotechnical Commission. 2006.</dd><dt class="label"><a name="rfc2119" id="rfc2119"></a>RFC2119</dt><dd><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>, S. Bradner. IETF, March 1997.  (See http://www.ietf.org/rfc/rfc2119.txt.)</dd><dt class="label"><a name="rfc3987" id="rfc3987"></a>RFC3987</dt><dd><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs)</cite></a>, M. D&uuml;rst, M. Suignard. IETF, January 2005.  (See http://www.ietf.org/rfc/rfc3987.txt.)</dd><dt class="label"><a name="xml" id="xml"></a>XML</dt><dd><a href="http://www.w3.org/TR/xml/"><cite>Extensible Markup Language</cite></a>, T. Bray, J. Paoli, C. Sperberg-McQueen, E. Maler, F. Yergeau. W3C, November 2008.  (See http://www.w3.org/TR/xml/.)</dd></dl></div><div class="div1">
<h2><a name="d0e666" id="d0e666"></a>B Examples (Non-Normative)</h2><div class="exampleOuter">
<div class="exampleHeader"><a name="d0e669" id="d0e669"></a>Example: Multiple schemas associated</div><div class="exampleInner"><pre>&lt;?xml version="1.0"?&gt;
&lt;?xml-model href="http://www.docbook.org/xml/5.0/rng/docbook.rng"?&gt;
&lt;?xml-model href="http://www.docbook.org/xml/5.0/xsd/docbook.xsd"?&gt;
&lt;book xmlns="http://docbook.org/ns/docbook"&gt;
 &hellip;
&lt;/book&gt;</pre></div></div><div class="exampleOuter">
<div class="exampleHeader"><a name="d0e674" id="d0e674"></a>Example: Alternative schema groups</div><div class="exampleInner"><pre>&lt;?xml-model href="xhtml-transitional.xsd"?&gt;
&lt;?xml-model href="xhtml-strict.xsd" 
   group="Strict"
   title="Check against strict document type"?&gt;
&lt;?xml-model href="xhtml-strict-additional-constraints.sch" 
   group="Strict"
   title="Check against strict document type complex constraints"?&gt;</pre></div></div></div><div class="div1">
<h2><a name="d0e679" id="d0e679"></a>C Suggested use of <code>schematypens</code> for determining schema language (Non-Normative)</h2><p>Use of a combination of <a title="" href="#PA-schematypens">schematypens</a> and <a title="" href="#PA-type">type</a> allows for the identification of many widely used schema languages as shown in the following table.</p><table border="1" cellpadding="2" cellspacing="1"><colgroup span="1"><col span="1"><col span="1"><col span="1"></colgroup><thead><tr><th>Schema language</th><th>type</th><th>schematypens</th></tr></thead><tbody><tr><td>DTD</td><td><code>application/xml-dtd</code></td><td>unspecified*</td></tr><tr><td>W3C XML Schema</td><td>unspecified* or <code>application/xml</code></td><td><code>http://www.w3.org/2001/XMLSchema</code></td></tr><tr><td>RELAX NG</td><td>unspecified* or <code>application/xml</code></td><td><code>http://relaxng.org/ns/structure/1.0</code></td></tr><tr><td>RELAX NG &ndash; compact syntax</td><td><code>application/relax-ng-compact-syntax</code></td><td>unspecified*</td></tr><tr><td>Schematron</td><td>unspecified* or <code>application/xml</code></td><td><code>http://purl.oclc.org/dsdl/schematron</code></td></tr><tr><td>NVDL</td><td>unspecified* or <code>application/xml</code></td><td><code>http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0</code></td></tr><tr><td colspan="3"><span>* A value of &ldquo;unspecified&rdquo; above indicates that the corresponding pseudo-attribute is not specified on the xml-model processing instruction.</span></td></tr></tbody></table><div class="exampleOuter">
<div class="exampleHeader"><a name="d0e774" id="d0e774"></a>Example: Multiple schemas associated</div><div class="exampleInner"><pre>&lt;?xml version="1.0"?&gt;
&lt;?xml-model href="http://www.docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?&gt;
&lt;?xml-model href="http://www.docbook.org/xml/5.0/xsd/docbook.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?&gt;
&lt;book xmlns="http://docbook.org/ns/docbook"&gt;
 &hellip;
&lt;/book&gt;
</pre></div></div></div></div></body></html>