Another abandoned server code base... this is kind of an ancestor of taskrambler.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20634 lines
1.9 MiB

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures</title>
<style type="text/css" xml:space="preserve">
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; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
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}
div.odiff-nsq-add { background-color: #DFDFDF; }
div.odiff-nsq-del { display: none; background-color: #FFDFDF }
div.idiff-nsq-del { display: none; text-decoration: line-through }
div.odiff-nsq-chg { background-color: #DFDFDF }
div.diff-nsq-off { }
span.odiff-nsq-add { background-color: #DFDFDF; }
span.diff-nsq-add { background-color: #DFDFDF; }
span.odiff-nsq-del { display: none; background-color: #FFDFDF }
span.idiff-nsq-del { display: none; text-decoration: line-through }
span.diff-nsq-del { display: none; background-color: #FFDFDF ; text-decoration: line-through }
span.odiff-nsq-chg { background-color: #DFDFDF }
span.diff-nsq-chg { background-color: #DFFFDF }
span.diff-nsq-off { }
td.odiff-nsq-add { background-color: #DFDFDF; }
td.odiff-nsq-del { display: none; background-color: #FFDFDF }
td.odiff-nsq-chg { background-color: #DFDFDF }
td.diff-nsq-off { }
table { width: 100%; }
img { color: white; border: none }
span.rfc2119 { font-variant: small-caps }
span.nav { float: right}
span.arrow { font-style: normal; font-weight: bold }
span.enumval { font-style: italic; font-weight: bold }
code { font-family: monospace; font-size: 100%}
span.propdef { font-weight: bold; font-family: monospace }
span.termdef {color: #850021}
div.termdef {color: #850021}
a.termref:visited, a.termref:link {font-family: sans-serif;
font-style: normal;
color: black;
text-decoration: none }
a.eltref:visited, a.eltref:link { font-family: sans-serif;
color: black;
text-decoration: none }
a.propref:visited, a.xpropref:visited, a.propref:link, a.xpropref:link { color: black; text-decoration: none;
font-family: sans-serif }
div.component {border: 2px solid black; margin-top: 1ex}
span.propdef { font-weight: bold; font-family: monospace }
div.ownDesc {margin-top: -2ex; margin-bottom: -2ex}
a.compref {font-family: sans-serif;
font-style: normal;
color: black;
text-decoration: none}
dl.props, dl.psvi {margin-bottom: .5em; margin-top: 0em}
div.toc1 {margin-left: 5ex}
div.toc2 {margin-left: 2ex}
div.tocLine{margin: 0em; text-indent: -6ex}
h3.withToc {margin-bottom: 0em}
div.constraintnote { margin-top: 1em }
div.constraint {
margin-left: 1em; }
div.constraintlist {
margin-left: 1em; margin-bottom: 0em
}
div.clnumber {
text-indent: -1em;
margin-top: 0em; margin-bottom: 0em }
div.schemaComp { border: 4px double gray;
margin: 0em 1em; padding: 0em }
div.scHead { border: 4px double gray;
border-bottom: 0px;
text-align: center;
margin-left: 1em; padding: .5em }
div.compHeader { margin: 4px;
font-weight: bold }
span.schemaComp { color: #A52A2A }
div.compBody {
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
padding: 4px ; margin: 0em}
div.psviDef { border: 4px double gray;
margin: 1em 1em; padding: 0em }
div.psviHeader { margin: 4px;
font-weight: bold }
span.psviDef { color: #A52A2A }
div.psviBody { border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
padding: 4px ; margin: 0em}
div.reprdef { border: 4px double gray;
margin: 0em 1em; padding: 0em }
div.reprHeader { margin: 4px;
font-weight: bold }
span.reprdef { color: #A52A2A }
div.reprBody, div.reprcompmulti, div.reprdep {
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
padding: 4px ; margin: 0em}
div.reprcomp {padding: 4px ; margin: 0em}
div.reprHead { text-align: center; }
div.mapSep { font-size: 50% ; clear: both}
div.mapProp {clear: left; float: left; width: 5em;
max-width: 12em; min-width: 5em }
div.mapRepr { margin-left: 6.5em }
p.element-syntax-1 { font-family: monospace;
margin-top: 0em; margin-bottom: .5em }
p.element-syntax { font-family: monospace;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #d3d3d3;
padding: 4px ; margin: 0em}
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em;
margin-bottom: 0.6em;
padding: 0em}
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}
table.restricts { margin-top: 1em; margin-bottom: 1em; margin-left: -2em}
table.restricts th { margin-left: 0em }
table.ubc td, table.ubc th { font-size: smaller }
table.dtdemo th { text-align: center;
background-color: #d5dee3}
table.dtdemo pre { margin-left: 0em; margin-bottom: 0em}
table.dtdemo td {background-color: #bedce6}
table.scrap {margin: .5em; background-color: #f5dcb3}
table.defset {background-color: #ffeedd }
table.defset thead, table.diffed-defset thead { color: red; font-weight: bold }
img { color: white; border: none }
span.nav { float: right}
span.arrow { font-style: normal; font-weight: bold }
.shrink {font-size: 80% ; }
.defset ul { margin-top: 0 ;
margin-bottom: 0 ; }
div.defset { margin: 4px ;
border-width: 4px ;
border-style: double ;
border-color: gray ; }
div.aux { background-color: #eeeeee ;
color: #333333 ; }
div.defset-head { font-weight: bold ;
padding: 0.6em ;
border-bottom-width: 4px ;
border-bottom-style: double ;
border-color: #cfcfcf ; }
div.deftop {background-color: #d5dee3 ;
margin-top: 1.5em;
padding-bottom: 0.3em }
div.defindent { margin-left: 1em ;
margin-top: 0em ;
margin-bottom: 0em ; }
div.defargs { margin-left: 3em ; }
div.prod { margin: 1em ;
margin-left: 5em ; }
.lhs { margin-left: -4em ; }
table table, .defset table { margin: 0 ;
border: 0 ;
padding: 0 ; }
.note { margin-left: 2em ;
margin-top: 1em ;
margin-bottom: 1em ; }
div.issue { background-color: #d5bbbb}
.giLabel, .pdName { margin-bottom: 0 ; font-weight: bold }
.giDef, .pdDef { margin-left: 2.5em ; margin-top: 0}
div.pvlist { border: 4px double gray;
margin-bottom: .5em; margin-left: 1em; padding: .5em;
padding-right: 1em; padding-bottom: 1em }
div.pvVal div.pvlist {
border: 4px double gray;
margin-top: 1.2em;
margin-bottom: .5em;
/* margin-left: -5em; */
margin-left: -1.3em;
padding: .5em;
padding-right: 1em;
padding-bottom: 1em;
}
div.clnumber div.pvlist { border: 4px double gray;
margin-bottom: .5em; margin-left: 1em; padding-top: .5em;
text-indent: 0;
padding-right: 1em; padding-bottom: 1em }
div.mapRepr div.pvlist { border: 4px double gray; margin-top: .5em;
margin-bottom: .5em; padding: .5em;
padding-right: 1em; padding-bottom: 1em }
div.pvSep { font-size: 50% ; clear: both}
div.pvProp {clear: left; float: left; width: 7em;
max-width: 12em; min-width: 7em }
div.pvVal { margin-left: 8em }
div.pvpair {
clear: both;
padding: 0.3em;
padding-right: 0;
}
div.sfsScrap { border: 4px double gray;
margin: 0em 1em; padding: 0em }
div.sfsHead { margin: 4px;
font-weight: bold }
div.sfsBody {
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
padding: 4px ; margin: 0em}
div.ednote {
display: block;
margin: 1.33em 0;
}
a.scrapref {
font-family: serif, sans-serif;
}
/* Added 2008-01-30. Value may be tweaked, but whatever it is,
* make it the same for these three different ways of saying
* 'paragraph'.
*/
p, div.p, div.block { margin: 1em 0; }
p.image-caption {
margin-left: 2em;
margin-right: 2em;
margin-bottom: 3em;
font-style: italic;
}
var {
/* color: green; */
color: navy; /* or perhaps try MediumBlue */
font-style: italic;
font-weight: bold;
}
table.blocknames,
table.blocknames td,
table.blocknames th {
border-style: solid;
border-width: thin;
empty-cells: show;
}
table.blocknames td,
table.blocknames th {
padding: 0.2em;
}
</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-CR.css" /></head>
<body>
<div class="head"><p><a href="http://www.w3.org/" shape="rect"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72" /></a></p>
<h1><a name="title" id="title" shape="rect"></a>W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures</h1>
<h2><a name="w3c-doctype" id="w3c-doctype" shape="rect"></a>W3C Candidate Recommendation 21 July 2011</h2><dl><dt>This version:</dt><dd>
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/</a>
</dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xmlschema11-1/" shape="rect">http://www.w3.org/TR/xmlschema11-1/</a></dd><dt>Previous version:</dt><dd>
<a href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/" shape="rect">http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/</a>
</dd><dt>Editors (Version 1.1):</dt><dd>Shudi (Sandy) Gao &#39640;&#27530;&#38237;, IBM <a href="mailto:sandygao@ca.ibm.com" shape="rect">&lt;sandygao@ca.ibm.com&gt;</a></dd><dd>C. M. Sperberg-McQueen, Black Mesa Technologies LLC <a href="mailto:cmsmcq@blackmesatech.com" shape="rect">&lt;cmsmcq@blackmesatech.com&gt;</a></dd><dd>Henry S. Thompson, University of Edinburgh <a href="mailto:ht@inf.ed.ac.uk" shape="rect">&lt;ht@inf.ed.ac.uk&gt;</a></dd><dt>Editors (Version 1.0):</dt><dd>Henry S. Thompson, University of Edinburgh <a href="mailto:ht@inf.ed.ac.uk" shape="rect">&lt;ht@inf.ed.ac.uk&gt;</a></dd><dd>Noah Mendelsohn, IBM <a href="mailto:noah_mendelsohn@us.ibm.com" shape="rect">&lt;noah_mendelsohn@us.ibm.com&gt;</a></dd><dd>David Beech, Oracle Corporation (retired) <a href="mailto:davidbeech@earthlink.net" shape="rect">&lt;davidbeech@earthlink.net&gt;</a></dd><dd>Murray Maloney, Muzmo Communications <a href="mailto:murray@muzmo.com" shape="rect">&lt;murray@muzmo.com&gt;</a></dd></dl><p>This document is also available in these non-normative formats: <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.xml" shape="rect">XML</a>, <a href="structures.diff-1.0.html" shape="rect">XHTML with changes since version 1.0 marked</a>, <a href="structures.diff-wd.html" shape="rect">XHTML with changes since previous Working Draft marked</a>, <a href="./XMLSchema.xsd" shape="rect">Independent copy of the schema for schema documents</a>, <a href="./XMLSchema.dtd" shape="rect">Independent copy of the DTD for schema documents</a>, <a href="compDefs.xml" shape="rect">Independent tabulation of components and microcomponents</a>, and&#160;<a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema" shape="rect">List of translations</a>.</p><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" shape="rect">Copyright</a>&#160;&#169;&#160;2011&#160;<a href="http://www.w3.org/" shape="rect"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&#174;</sup> (<a href="http://www.csail.mit.edu/" shape="rect"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/" shape="rect"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/" shape="rect">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer" shape="rect">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks" shape="rect">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents" shape="rect">document use</a> rules apply.</p></div><hr /><div>
<h2><a name="abstract" id="abstract" shape="rect"></a>Abstract</h2><p>This
document specifies the XML Schema Definition Language,
which offers facilities for describing the structure and constraining the contents
of XML documents, including those which
exploit the XML Namespace facility. The schema language, which is itself
represented in
an XML vocabulary and uses
namespaces, substantially reconstructs and considerably
extends the capabilities found in XML
document type definitions (DTDs). This specification depends on
<em>XML Schema Definition Language 1.1 Part 2: Datatypes</em>.
</p></div><div class="sotd">
<h2><a name="status" id="status" shape="rect"></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/" shape="rect">W3C technical reports index</a> at
http://www.w3.org/TR/.</em></p><p>This
W3C Candidate Recommendation
specifies
the W3C XML Schema Definition Language (XSD) 1.1.
It
is here made
available for review by W3C members
and the public.
XSD 1.1 retains all
the essential features of XSD 1.0, but adds several new
features to support functionality requested by users,
fixes many errors in XSD 1.0,
and clarifies wording.
</p><div class="block">
This draft was published
on 21 July 2011.
The major revisions since the previous
public working draft
include
the following:
<ul><li><div class="p">Enumerations, value constraints, and identity constraints now
accept <em>either</em> equal <em>or</em> identical
values as the same. This change resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9196" shape="rect">9196
Enumeration and NaN</a>
</div></li><li><div class="p">The rules for restriction of complex types containing local
elements with conditional types have been simplified; this
resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12185" shape="rect">12185
Conditional Type Assignment and substitutability</a>.</div></li><li><div class="p">Changes have been made in section <a href="#sec-src-simple-type" shape="rect">Constraints on XML Representations of Simple Type Definitions (&#167;3.16.3)</a> and section <a href="#sec-src-ct" shape="rect">Constraints on XML Representations of Complex Type Definitions (&#167;3.4.3)</a> to make explicit that XML representations of
extension facets (facets in namespaces other than the Schema
namespace) are allowed to appear more than once in restrictions
of simple types. This resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11222" shape="rect">11222
src-simple-type.1 should allow duplicate elements from
"##other" namespaces</a>.</div></li><li><div class="p">The definition of
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>
has been changed to remove the rule that an element
with an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> cannot be locally valid against
any type definition other than the one specified in
the instance.
This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11764" shape="rect">11764
Unresolved xsi:type should not affect validity against a type</a>.</div></li><li><div class="p">The text concerning <code>xsi:type</code> attributes
and their effect has been clarified in
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>. In particular, the
revisions attempt to make clearer just what happens
in cases where the <code>xsi:type</code>
attribute in the document instance cannot be used
(because the type named is unknown, or otherwise
not usable). This resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11219" shape="rect">11219 Editorial revision of Element Locally Valid (Element)</a>.
</div></li><li><div class="p">The text has been revised to make clearer that
declarations enclosed in an <code>xs:override</code> element
are handled using the <code>elementFormDefault</code> and
other schema-document-level defaults from the schema document
being overridden, not the schema documnt containing the
<code>xs:override</code> element. This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10652" shape="rect">10652
xs:override and document-level defaults</a>.
</div></li><li><div class="p">The constraints forbidding the use of special types as
members of unions and item types for lists have been reformulated
as part of the definition of the simple type definition component.
This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11103" shape="rect">11103
Note in section 2.4.1 (Special datatypes as members of a union)</a>.
</div></li><li><div class="p">The treatment of elements in the Schema namespace occurring
within <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements has been clarified:
<ul><li><div class="p">Such elements do not participate in the mapping
from XML representations to components as defined in this
specification (<a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
Components (&#167;3.1.3)</a>, <a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>).</div></li><li><div class="p">Such elements are not required to be valid or to
satisfy the XML Representation rules as a condition of
conformance for a schema document (<a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>, <a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>).</div></li><li><div class="p">If such elements are invalid, the effect on
schema component construction is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
(<a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>,
<a href="#impl-def-list" shape="rect">Checklist of implementation-defined features (&#167;E.1)</a>).</div></li></ul>
This change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10125" shape="rect">10125
Validation of the content of xs:annotation</a>.
</div></li><li><div class="p">The treatment of type tables in
<a href="#sec-cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> has been
made more specific; this resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11076" shape="rect">11076
Element Declarations Consistent: comparing type tables</a>.
</div></li><li><div class="p">A note has been added to the discussion of
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements to make it easier to
see how processors are expected to handle cycles in
references from one schema document to another.
This change resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12184" shape="rect">12184 Circularity in xs:override</a>.
</div></li><li><div class="p">Some errors in the XSLT stylesheet of appendix
<a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a> have been corrected
(resolving issues <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8573" shape="rect">8573 F.1 Stylesheet for chameleons invalid</a> and
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8574" shape="rect">8574 F.1 Stylesheet for chameleons incomplete</a>).
</div></li><li><div class="p">In the DTD for schema documents
(<a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a>),
an error has been corrected in the declaration
of the <code>inheritable</code> attribute of
the <code>xs:attribute</code> element
(resolving issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11070" shape="rect">11070
DTD for schema documents: inheritable declared as %URIref</a>).
</div></li><li><div class="p">In the schema for schema documents, an error in the declaration of
<code>xs:group</code> within the named model group <code>xs:allModel</code>
has been corrected to make the type of <code>xs:all</code> a legal
restriction of its base type and make the schema for schema documents
conformant to this specification. This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11092" shape="rect">11092
Error in S4SD: complexType name="all" is not a valid restriction</a>.</div></li><li><div class="p">The XPath subset for selectors and fields in section
<a href="#sec-c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a>
and
<a href="#sec-c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a>
has been revised
to align its tokenization rules
better with <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>; this resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8454" shape="rect">8454
Tokens in XPath subset for selectors/fields</a>.
</div></li><li><div class="p">The text has been revised
to correct the terminology used to describe correct XPath
expressions and to specify that it is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
when type errors in XPath expressions are detected and
whether they are treated as static or dynamic errors.
This change
resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11073" shape="rect">11073
Type errors during XPath evaluation</a>.
</div></li><li><div class="p">The description of assertions has been revised to make it
explicit that the data model instance constructed for testing
assertions has a parentless element node as its root, and not
an element node with a document node as its parent. This
change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12127" shape="rect">12127
"Root element" in assertion testing</a>.</div></li><li><div class="p">The text has been revised to ensure that the special validation
rules for <code>xs:ID</code>, <code>xs:IDREF</code>, <code>xs:IDREFS</code>,
<code>xs:ENTITY</code>, and <code>xs:ENTITIES</code> apply not only
to the built-in types themselves but also to types derived from them
by restriction, list construction, union, and extension.
This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10662" shape="rect">10662
Should IDREFS and ENTITIES be magic types?</a>.
</div></li><li><div class="p">The sections on the XML representation of components have been
revised to say explicitly that the constraints and mapping rules
defined there apply after, not before, pre-processing.
This change resolves issues
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11179" shape="rect">11179
minor editorial improvement : parent schema components of a named model group</a>
and
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11354" shape="rect">11354
Mentions of "override" outside of the override section</a>
</div></li><li><div class="p">Some passages have been recast for clarity.</div></li><li><div class="p">Several minor errors, typographic and otherwise,
have been corrected.</div></li></ul>
</div><p>For those primarily interested in the changes since version 1.0,
the appendix
<a href="#changes" shape="rect">Changes since version 1.0 (non-normative) (&#167;G)</a> is the recommended starting
point. It summarizes both changes made
since XSD 1.0 and some changes which were expected (and predicted
in earlier drafts of this specification) but have not been made
after all.
Accompanying versions of this document display in color
all changes to normative text since version 1.0 and since the
previous Working Draft.</p><p>
The review period for this Candidate Recommendation document
extends until 23 August 2011.
Comments on this document should be made in
W3C's public installation of Bugzilla,
specifying "XML Schema" as the product.
Instructions can be found at
<a href="http://www.w3.org/XML/2006/01/public-bugzilla" shape="rect">http://www.w3.org/XML/2006/01/public-bugzilla</a>.
If access to Bugzilla is not feasible,
please send your comments to the W3C XML Schema comments mailing list,
<a href="mailto:www-xml-schema-comments@w3.org" shape="rect">www-xml-schema-comments@w3.org</a>
(<a href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/" shape="rect">archive</a>)
Each Bugzilla entry and email message should contain only one comment.</p><p>Although feedback based on any
aspect of this specification is welcome, there are certain aspects of
the design presented herein for which the Working Group is
particularly interested in feedback. These are designated
"priority feedback" aspects of the design, and
identified as such in editorial notes at appropriate points in this
draft.
<em>Any feature
mentioned in a
priority feedback note is a "feature
at risk":</em> the feature may be retained as
is or
dropped, depending on the feedback received from readers,
schema authors, schema users, and implementors.
</p><p>Publication as a
Candidate Recommendation
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><div class="block">The
<a href="http://www.w3.org/XML/Schema" shape="rect">W3C XML Schema Working Group</a>
intends to request advancement of this specification
and publication as a
<a href="http://www.w3.org/2005/10/Process-20051014/tr#cfr" shape="rect">Proposed Recommendation</a>
as soon after 21 August 2011 as the following
conditions are met.
<ul><li><div class="p">Each feature of the specification has been implemented successfully
by at least two independent implementations.</div></li><li><div class="p">The test suite which tests each feature of XSD new in XSD 1.1 has
been used to demonstrate the two implementations of each feature.
(The <a href="http://www.w3.org/XML/2004/xml-schema-test-suite/index.html" shape="rect">XML Schema Test Suite overview page</a> describes the current
state of the test suite and provides instructions for downloading
the test suite.)
</div></li><li><div class="p">The Working Group has responded formally to all issues raised
against this document during the Candidate Recommendation period.</div></li></ul>
The expected Proposed Recommendation
may include editorial changes and may possibly remove features
identified in this draft as being at risk.
At the time this Candidate Recommendation
was published, no interoperability
or implementation report had yet been prepared.
</div><p>
This document has been produced by the
<a href="http://www.w3.org/XML/Schema" shape="rect">W3C XML Schema Working Group</a>
as part of the W3C <a href="http://www.w3.org/XML/Activity" shape="rect">XML
Activity</a>. The goals of
XSD 1.1 are
discussed in the document
<a href="http://www.w3.org/TR/2003/WD-xmlschema-11-req-20030121/" shape="rect">Requirements
for XML Schema 1.1</a>.
The authors of this document are
the members of the XML Schema Working Group. Different parts of this
specification have different editors.
</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/" shape="rect">5 February
2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/19482/status" shape="rect">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" shape="rect">Essential
Claim(s)</a> must disclose the information in accordance with
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure" shape="rect">section
6 of the W3C Patent Policy</a>. </p><p>The English version of this specification is the only normative
version. Information about translations of this document is available
at <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema" shape="rect">http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema</a>.</p></div><div class="toc">
<h2><a name="contents" id="contents" shape="rect"></a>Table of Contents</h2><div class="toc">1 <a href="#intro" shape="rect">Introduction</a><br clear="none" />
&#160;&#160;&#160;&#160;1.1 <a href="#intro1.1" shape="rect">Introduction to Version 1.1</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.2 <a href="#intro-purpose" shape="rect">Purpose</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.3 <a href="#nss_langids" shape="rect">Namespaces and Language Identifiers</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#xsd-nss" shape="rect">XSD Namespaces</a> &#183; <a href="#sec-nss-special" shape="rect">Namespaces with Special Status</a> &#183; <a href="#ns-bindings" shape="rect">Conventional Namespace Bindings</a> &#183; <a href="#langids" shape="rect">Schema Language Identifiers</a></div>
&#160;&#160;&#160;&#160;1.4 <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.5 <a href="#intro-terminology" shape="rect">Documentation Conventions and Terminology</a>
<br clear="none" />
2 <a href="#concepts" shape="rect">Conceptual Framework</a><br clear="none" />
&#160;&#160;&#160;&#160;2.1 <a href="#xsover" shape="rect">Overview of XSD</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.2 <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#Type_Definition_Summary" shape="rect">Type Definition Components</a> &#183; <a href="#Declarations_Summary" shape="rect">Declaration Components</a> &#183; <a href="#Model_Group_Summary" shape="rect">Model Group Components</a> &#183; <a href="#Constraint_Summary" shape="rect">Constraint Components</a> &#183; <a href="#Group_Definitions" shape="rect">Group Definition Components</a> &#183; <a href="#Annotation" shape="rect">Annotation Components</a></div>
&#160;&#160;&#160;&#160;2.3 <a href="#concepts-schemaConstraints" shape="rect">Constraints and Validation Rules</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.4 <a href="#concepts-conformance" shape="rect">Conformance</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.5 <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.6 <a href="#concepts-nameSymbolSpaces" shape="rect">Names and Symbol Spaces</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.7 <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#xsi_type" shape="rect">xsi:type</a> &#183; <a href="#xsi_nil" shape="rect">xsi:nil</a> &#183; <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation</a></div>
&#160;&#160;&#160;&#160;2.8 <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web</a>
<br clear="none" />
3 <a href="#components" shape="rect">Schema Component Details</a><br clear="none" />
&#160;&#160;&#160;&#160;3.1 <a href="#scIntro" shape="rect">Introduction</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.2 <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.3 <a href="#cElement_Declarations" shape="rect">Element Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.4 <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.5 <a href="#cAttributeUse" shape="rect">Attribute Uses</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.6 <a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.7 <a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.8 <a href="#Model_Groups" shape="rect">Model Groups</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.9 <a href="#cParticles" shape="rect">Particles</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.10 <a href="#Wildcards" shape="rect">Wildcards</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.11 <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.12 <a href="#cTypeAlternative" shape="rect">Type Alternatives</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.13 <a href="#cAssertions" shape="rect">Assertions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.14 <a href="#cNotation_Declarations" shape="rect">Notation Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.15 <a href="#cAnnotations" shape="rect">Annotations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.16 <a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.17 <a href="#Schemas" shape="rect">Schemas as a Whole</a>
<br clear="none" />
4 <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition</a><br clear="none" />
&#160;&#160;&#160;&#160;4.1 <a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core</a>
<br clear="none" />
&#160;&#160;&#160;&#160;4.2 <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#composition-concepts" shape="rect">Basic concepts of schema construction and composition</a> &#183; <a href="#cip" shape="rect">Conditional inclusion</a> &#183; <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(&lt;include&gt;)</a> &#183; <a href="#modify-schema" shape="rect">Including modified component definitions (&lt;redefine&gt;)</a> &#183; <a href="#override-schema" shape="rect">Overriding component definitions (&lt;override&gt;)</a> &#183; <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (&lt;import&gt;)</a></div>
&#160;&#160;&#160;&#160;4.3 <a href="#composition-instances" shape="rect">Layer 3: Schema Document Access and Web-interoperability</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web</a> &#183; <a href="#schema-loc" shape="rect">How schema definitions are located on the Web</a></div>
5 <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment</a><br clear="none" />
&#160;&#160;&#160;&#160;5.1 <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.2 <a href="#validation_outcome" shape="rect">Assessing Schema-Validity</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.3 <a href="#conformance-missing" shape="rect">Missing Sub-components</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.4 <a href="#conformance-processorResponsibilities" shape="rect">Responsibilities of Schema-aware Processors</a>
<br clear="none" />
</div>
<h3><a name="appendices" id="appendices" shape="rect"></a>Appendices</h3><div class="toc">A <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative)</a><br clear="none" />
B <a href="#outcomes" shape="rect">Outcome Tabulations (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;B.1 <a href="#validation_failures" shape="rect">Validation Rules</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.2 <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.3 <a href="#outcome-src" shape="rect">Schema Representation Constraints</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.4 <a href="#outcome-cos" shape="rect">Schema Component Constraints</a>
<br clear="none" />
C <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;C.1 <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset</a>
<br clear="none" />
&#160;&#160;&#160;&#160;C.2 <a href="#var_schema_con" shape="rect">
Terminology of schema construction
</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#vsc_locations" shape="rect">Identifying locations where components are sought</a> &#183; <a href="#vsc_indirection" shape="rect">Identifying methods of indirection</a> &#183; <a href="#vsc_key" shape="rect">Identifying the key for use in indirection</a> &#183; <a href="#vsc_stopping" shape="rect">Identifying when to stop searching</a> &#183; <a href="#vsc_failure" shape="rect">Identifying how to react to failure</a></div>
&#160;&#160;&#160;&#160;C.3 <a href="#sec-other-idf" shape="rect">Other Implementation-defined Features</a>
<br clear="none" />
D <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative)</a><br clear="none" />
E <a href="#impl-def-dep-list" shape="rect">Checklists of implementation-defined and implementation-dependent features (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;E.1 <a href="#impl-def-list" shape="rect">Checklist of implementation-defined features</a>
<br clear="none" />
&#160;&#160;&#160;&#160;E.2 <a href="#impl-dep-list" shape="rect">Checklist of implementation-dependent features</a>
<br clear="none" />
F <a href="#composition-xslts" shape="rect">Stylesheets for Composing Schema Documents (Normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;F.1 <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion</a>
<br clear="none" />
&#160;&#160;&#160;&#160;F.2 <a href="#override-xslt" shape="rect">Transformation for xs:override</a>
<br clear="none" />
G <a href="#changes" shape="rect">Changes since version 1.0 (non-normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;G.1 <a href="#done" shape="rect">Changes made since version 1.0</a>
<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#ch_specs" shape="rect">Relationship between XSD and other specifications</a> &#183; <a href="#ch_versions" shape="rect">XSD versions</a> &#183; <a href="#ch_models" shape="rect">Changes to content models</a> &#183; <a href="#ch_xpath" shape="rect">Assertions and XPath</a> &#183; <a href="#ch_complex-derivation" shape="rect">Derivation of complex types</a> &#183; <a href="#ch_complex" shape="rect">Changes to complex type definitions</a> &#183; <a href="#ch_id" shape="rect">ID, IDREF, and related types</a> &#183; <a href="#ch_std" shape="rect">Simple type definitions</a> &#183; <a href="#ch_elemdecl" shape="rect">Element declarations</a> &#183; <a href="#ch_attrdecl" shape="rect">Attribute declarations</a> &#183; <a href="#ch_components" shape="rect">Component structure</a> &#183; <a href="#ch_sva" shape="rect">The process of validation</a> &#183; <a href="#ch_psvi" shape="rect">post-schema-validation infoset</a> &#183; <a href="#ch_conformance" shape="rect">Conformance</a> &#183; <a href="#ch_schemacomp" shape="rect">Schema composition</a> &#183; <a href="#ch_misc_sub" shape="rect">Other substantive changes</a> &#183; <a href="#ch_clar" shape="rect">Clarifications and editorial changes</a></div>
&#160;&#160;&#160;&#160;G.2 <a href="#issues" shape="rect">Issues not resolved</a>
<br clear="none" />
H <a href="#normative-glossary" shape="rect">Glossary (non-normative)</a><br clear="none" />
I <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative)</a><br clear="none" />
J <a href="#non-ambig" shape="rect">Analysis of the Unique Particle Attribution Constraint (non-normative)</a><br clear="none" />
K <a href="#nonnormative-language-ids" shape="rect">XSD Language Identifiers (non-normative)</a><br clear="none" />
L <a href="#biblio" shape="rect">References</a><br clear="none" />
&#160;&#160;&#160;&#160;L.1 <a href="#normative-references" shape="rect">Normative</a>
<br clear="none" />
&#160;&#160;&#160;&#160;L.2 <a href="#nonnormative-references" shape="rect">Non-normative</a>
<br clear="none" />
M <a href="#acknowledgments" shape="rect">Acknowledgements (non-normative)</a><br clear="none" />
</div></div><hr /><div class="body"><div class="div1">
<h2><a name="intro" id="intro" shape="rect"></a>1 Introduction</h2><p>This document sets out the structural part of the XML Schema Definition Language.</p><p>Chapter 2 presents a <a href="#concepts" shape="rect">Conceptual Framework (&#167;2)</a> for XSD, including an introduction to the
nature of XSD schemas and an introduction to the XSD
abstract data model, along with other terminology used throughout
this document. </p><p>Chapter 3, <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, specifies the precise
semantics of each component of the abstract model, the
representation of each component in XML, with reference to a DTD
and an XSD schema for
an XSD document type, along with a detailed mapping
between the elements and attribute vocabulary of this
representation and the components and properties of the abstract
model.</p><p>Chapter 4 presents <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a>, including the
connection between documents and schemas, the import, inclusion
and redefinition of declarations and definitions and the
foundations of schema-validity assessment.</p><p>Chapter 5 discusses <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a>, including the
overall approach to schema-validity assessment of documents, and
responsibilities of schema-aware processors. </p><p>The normative appendices include a <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> for the XML representation of
schemas and
<a href="#normative-references" shape="rect">Normative (&#167;L.1)</a>.</p><p>The non-normative appendices include the <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a> and a <a href="#normative-glossary" shape="rect">Glossary (non-normative) (&#167;H)</a>.</p><p>This document is primarily intended as a language definition
reference. As such, although it contains a few examples, it is
<em>not</em> primarily designed to serve as a motivating
introduction to the design and its features, or as a tutorial for
new users. Rather it presents a careful and fully explicit
definition of that design, suitable for guiding implementations.
For those in search of a step-by-step introduction to the design,
the non-normative <a href="#bib-expo" shape="rect">[XML Schema: Primer]</a>
is a much better starting point than this document.</p><div class="div2">
<h3><span class="nav"> <a href="#intro-purpose" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro1.1" id="intro1.1" shape="rect"></a>1.1 Introduction to Version 1.1</h3><p>The Working Group has three main goals for this version of W3C
XML Schema:</p><ul><li><div class="p">Significant improvements in simplicity of design and
clarity of exposition <em>without</em> loss of backward
<em>or</em> forward compatibility;
</div></li><li><div class="p">Provision of support for versioning of XML languages
defined using this
specification, including the XML vocabulary
specified here for use in schema documents.</div></li><li><div class="p">Provision of support for
co-occurrence constraints, that is constraints which make the
presence of an attribute or element, or the values allowable
for it, depend on the value or presence of other attributes or
elements.</div></li></ul><p>These goals are
in tension with one another. The Working Group's strategic guidelines
for changes between versions 1.0 and 1.1 can be summarized as follows:</p><ol class="enumar"><li><div class="p">Support
for versioning (acknowledging that this <em>may</em> be
slightly disruptive to the XML transfer syntax at the
margins)</div></li><li><div class="p">Support for co-occurrence
constraints (which will certainly involve additions to the XML
transfer syntax, which will not be understood by 1.0
processors)</div></li><li><div class="p">Bug fixes (unless in specific
cases we decide that the fix is too disruptive for a point
release)</div></li><li><div class="p">Editorial changes</div></li><li><div class="p">Design cleanup will possibly change behavior in edge
cases</div></li><li><div class="p">Non-disruptive changes to type hierarchy
(to better support current and forthcoming international
standards and W3C recommendations)</div></li><li><div class="p">Design cleanup will possibly change component structure
(changes to functionality restricted to edge cases)</div></li><li><div class="p">No
significant changes in existing functionality</div></li><li><div class="p">No changes
to XML transfer syntax except those required by version control
hooks, co-occurrence
constraints and bug fixes</div></li></ol><p>The aim with regard
to compatibility is that</p><ul><li><div class="p">All schema documents conformant to version 1.0 of this
specification should also conform to version 1.1, and should
have the same <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> behavior across 1.0 and 1.1 implementations
(except possibly in edge cases and in the details of the
resulting PSVI);</div></li><li><div class="p">The vast majority of schema documents conformant to
version 1.1 of this specification should also conform to
version 1.0, leaving aside any incompatibilities arising from
support for versioning or
co-occurrence constraints, and when they are
conformant to version 1.0 (or are made conformant by the
removal of versioning information), should have the same
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> behavior
across 1.0 and 1.1 implementations (again except possibly in
edge cases and in the details of the resulting PSVI);
</div></li></ul></div><div class="div2">
<h3><span class="nav"><a href="#intro1.1" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#nss_langids" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro-purpose" id="intro-purpose" shape="rect"></a>1.2 Purpose</h3><p>The purpose of <em>XML Schema Definition Language: Structures</em> is to define the nature of
XSD schemas and their component parts,
provide an inventory of XML markup constructs with which to
represent schemas, and define the application of schemas to XML
documents. </p><p>The purpose of an XSD schema is to define and describe a
class of XML documents by using schema components to constrain
and document the meaning, usage and relationships of their
constituent parts: datatypes, elements and their content and
attributes and their values. Schemas can also provide for
the specification of additional document information, such as
normalization and defaulting of attribute and element values.
Schemas have facilities for self-documentation. Thus, <em>XML Schema Definition Language: Structures</em> can
be used to define, describe and catalogue XML vocabularies for
classes of XML documents. </p><p>Any application that consumes well-formed XML can use the
formalism defined here to express
syntactic, structural and value constraints applicable to its
document instances. The XSD formalism allows a useful level of
constraint checking to be described and implemented for a wide
spectrum of XML applications. However, the language defined by
this specification does not attempt to provide <em>all</em>
the facilities that might be needed by applications. Some applications
will require constraint capabilities not expressible in this
language, and so will need to perform their own additional
validations.</p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#intro-purpose" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#intro-relatedWork" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="nss_langids" id="nss_langids" shape="rect"></a>1.3 Namespaces and Language Identifiers</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1 <a href="#xsd-nss" shape="rect">XSD Namespaces</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.1 <a href="#xsd-namespace" shape="rect">The Schema Namespace (xs)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.2 <a href="#xsi-namespace" shape="rect">The Schema Instance Namespace (xsi)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.3 <a href="#vc-namespace" shape="rect">The Schema Versioning Namespace (vc)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.2 <a href="#sec-nss-special" shape="rect">Namespaces with Special Status</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.3 <a href="#ns-bindings" shape="rect">Conventional Namespace Bindings</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.4 <a href="#langids" shape="rect">Schema Language Identifiers</a><br clear="none" />
</div><div class="div3">
<h4><a name="xsd-nss" id="xsd-nss" shape="rect"></a>1.3.1 XSD Namespaces</h4><div class="div4">
<h5><a name="xsd-namespace" id="xsd-namespace" shape="rect"></a>1.3.1.1 The Schema Namespace (<code>xs</code>)</h5><p>
The XML representation of schema components uses a vocabulary
identified by the namespace name <code>http://www.w3.org/2001/XMLSchema</code>.
For brevity, the text and examples in this specification use
the prefix <code>xs:</code> to stand for this
namespace; in practice, any prefix can be used.
</p><div class="note"><div class="p"><b>Note:</b>
The namespace for schema documents is unchanged from version
1.0 of this specification, because any schema document valid
under the rules of version 1.0 has essentially the same
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> semantics under this specification as it did under
version 1.0 (Second Edition).
There are a few exceptions to this rule, involving errors in
version 1.0 of this specification which were not reparable by
errata and which have therefore been fixed only in this
version of this specification, not in version 1.0.
</div></div><div class="note"><div class="p"><b>Note:</b>
The data model used by <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> and other
specifications, namely <a href="#bib-xdm" shape="rect">[XDM]</a>, makes use of
type labels in the
XSD namespace (<code>untyped</code>,
<code>untypedAtomic</code>) which are not defined in this
specification; see the <a href="#bib-xdm" shape="rect">[XDM]</a>
specification for details of those types.
</div></div><p>
Users of the namespaces defined here should be aware, as a
matter of namespace policy, that more names
in this namespace may be given
definitions in future versions of this or other
specifications.
</p></div><div class="div4">
<h5><a name="xsi-namespace" id="xsi-namespace" shape="rect"></a>1.3.1.2 The Schema Instance Namespace (<code>xsi</code>)</h5><p>This specification defines
several attributes for direct use in any XML documents, as
described in <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated (&#167;2.7)</a>.
These attributes are in the namespace whose name is <code>http://www.w3.org/2001/XMLSchema-instance</code>.
For brevity, the text and examples in this specification use
the prefix <code>xsi:</code> to stand for this namespace; in
practice, any prefix can be used.
</p><p>
Users of the namespaces defined here should be aware, as a
matter of namespace policy, that more names
in this namespace may be given
definitions in future versions of this or other
specifications.
</p></div><div class="div4">
<h5><a name="vc-namespace" id="vc-namespace" shape="rect"></a>1.3.1.3 The Schema Versioning Namespace (<code>vc</code>)</h5><p>
The pre-processing of schema documents described in
<a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> uses
attributes in the namespace
<code>http://www.w3.org/2007/XMLSchema-versioning</code>.
For brevity, the text and examples in this specification use
the prefix <code>vc:</code> to stand for this
namespace; in practice, any prefix can be used.
</p><p>
Users of the namespaces defined here should be aware, as a
matter of namespace policy, that more names in this namespace
may be given definitions in future versions of this or other
specifications.
</p></div></div><div class="div3">
<h4><a name="sec-nss-special" id="sec-nss-special" shape="rect"></a>1.3.2 Namespaces with Special Status</h4><div class="block">Except as otherwise specified elsewhere in this specification,
if components are <a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a> in a schema, or source
declarations are included in an XSD schema document, for
components in any of the following namespaces, then the
components, or the declarations, <span class="rfc2119">should</span> agree with the
descriptions given in the relevant specifications and with the
declarations given in any applicable XSD schema documents
maintained by the World Wide Web Consortium for these
namespaces. If they do not, the effect is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
and not defined by this specification.
<ul><li><div class="p"><code>http://www.w3.org/XML/1998/namespace</code></div></li><li><div class="p"><code>http://www.w3.org/2001/XMLSchema</code></div></li><li><div class="p"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></li><li><div class="p"><code>http://www.w3.org/2007/XMLSchema-versioning</code></div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> Depending on implementation details, some processors may
be able to process and use (for example) variant forms of the
schema for schema documents devised for specialized purposes;
if so, this specification does not forbid the use of such variant
components. Other processors, however, may find it
impossible to validate and use alternative components for
these namespaces; this specification does not require them
to do so. Users who have an interest in such specialized
processing should be aware of the attending interoperability
problems and should exercise caution.
</div><div class="p">
This flexibility does not extend to the components described in
this specification or in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> as being
included in every schema, such as those for the primitive and
other built-in datatypes. Since those components are by
definition part of evey schema, it is not possible to have
different components with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> present in
the schema without violating constraints defined elsewhere
against multiple components with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>.
</div></div><p>Components and source declarations <span class="rfc2119">must not</span> specify
<code>http://www.w3.org/2000/xmlns/</code> as their
target namespace. If they do, then the schema
and/or schema document is in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.
</p><div class="note"><div class="p"><b>Note:</b> Any confusion in the use, structure, or meaning of this namespace
would have catastrophic effects on the interpretability of
this specification.
</div></div></div><div class="div3">
<h4><a name="ns-bindings" id="ns-bindings" shape="rect"></a>1.3.3 Conventional Namespace Bindings</h4><div class="block">Several namespace prefixes are conventionally used in this
document for notational convenience. The following bindings are
assumed.<ul><li><div class="p"><code>fn</code> bound to
<code>http://www.w3.org/2005/xpath-functions</code> (defined
in <a href="#bib-fno" shape="rect">[Functions and Operators]</a></div></li><li><div class="p"><code>html</code> bound to
<code>http://www.w3.org/1999/xhtml</code></div></li><li><div class="p"><code>my</code> (in examples) bound to the target namespace
of the example schema document</div></li><li><div class="p"><code>rddl</code> bound to
<code>http://www.rddl.org/</code></div></li><li><div class="p"><code>vc</code> bound to
<code>http://www.w3.org/2007/XMLSchema-versioning</code> (defined
in this and related specifications)</div></li><li><div class="p"><code>xhtml</code> bound to
<code>http://www.w3.org/1999/xhtml</code></div></li><li><div class="p"><code>xlink</code> bound to
<code>http://www.w3.org/1999/xlink</code></div></li><li><div class="p"><code>xml</code> bound to
<code>http://www.w3.org/XML/1998/namespace</code> (defined in
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>)</div></li><li><div class="p"><code>xs</code> bound to <code>http://www.w3.org/2001/XMLSchema</code>
(defined in this and related specifications)</div></li><li><div class="p"><code>xsi</code> bound to
<code>http://www.w3.org/2001/XMLSchema-instance</code> (defined in this and
related specifications)</div></li><li><div class="p"><code>xsl</code> bound to
<code>http://www.w3.org/1999/XSL/Transform</code></div></li></ul>
</div><p>In practice, any prefix bound to the appropriate namespace
name <span class="rfc2119">may</span> be used (unless otherwise specified by the definition
of the namespace in question, as for <code>xml</code> and
<code>xmlns</code>).</p></div><div class="div3">
<h4><a name="langids" id="langids" shape="rect"></a>1.3.4 Schema Language Identifiers</h4><p>Sometimes other specifications or Application Programming
Interfaces (APIs) need to refer to the XML Schema Definition Language in
general, sometimes they need to refer to a specific version of
the language. To make such references easy and enable consistent identifiers to be used, we provide the following
URIs to identify these
concepts.</p><div class="glist"><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema</code></div><div class="giDef"><div class="p">
Identifies the XML Schema Definition Language in general, without referring
to a specific version of it.
</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var></code></div><div class="giDef"><div class="p">
Identifies the language described in version <var>X</var>.<var>Y</var> of the XSD specification. URIs of this form refer to
a numbered version
of the language in general. They do not distinguish among different working drafts or
editions of that version. For example,
<code>http://www.w3.org/XML/XMLSchema/v1.0</code> identifies
XSD version 1.0 and <code>http://www.w3.org/XML/XMLSchema/v1.1</code> identifies
XSD version 1.1.
</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var>/<var>N</var>e</code></div><div class="giDef"><div class="p">
Identifies the language described in the <var>N</var>-th edition of version <code><var>X</var>.<var>Y</var></code> of
the XSD specification. For example, <code>http://www.w3.org/XML/XMLSchema/v1.0/2e</code>
identifies the second edition of XSD version 1.0.
</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var>/<var>N</var>e/yyyymmdd</code></div><div class="giDef"><div class="p">
Identifies the language described in the <var>N</var>-th edition of version
<code><var>X</var>.<var>Y</var></code> of
the XSD specification published on the particular date
<code>yyyy-mm-dd</code>. For example,
<code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20001024</code>
identifies the language
defined in the XSD version 1.0 Candidate
Recommendation (CR) published on 24 October 2000, and
<code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20040318</code>
identifies the language
defined in the XSD version 1.0 Second Edition Proposed
Edited Recommendation (PER)
published on 18 March 2004.
</div></div></div></div><p>Please see <a href="#nonnormative-language-ids" shape="rect">XSD Language Identifiers (non-normative) (&#167;K)</a> for a
complete list of XML Schema Definition Language identifiers which exist to date.</p></div></div><div class="div2">
<h3><span class="nav"><a href="#nss_langids" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#intro-terminology" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro-relatedWork" id="intro-relatedWork" shape="rect"></a>1.4 Dependencies on Other Specifications</h3><p>The definition of <em>XML Schema Definition Language: Structures</em> depends on the following
specifications:
<a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>,
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>,
and
<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</p><p>See <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a> for a tabulation of the
information items and properties specified in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> which this
specification requires as a precondition to schema-aware
processing.</p><p><a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> defines some
datatypes which depend on definitions in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>
and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>; those definitions, and therefore
the datatypes based on them, vary between version 1.0 (<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>, <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>) and
version 1.1 (<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>,
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>) of those specifications. In any
given schema-validity-<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
episode, the choice of the 1.0 or the 1.1 definition of those
datatypes is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>
Conforming implementations of this specification <span class="rfc2119">may</span> provide
either the 1.1-based datatypes or the 1.0-based datatypes, or
both. If both are supported, the choice of which datatypes to
use in a particular assessment episode <span class="rfc2119">should</span> be under user
control.
</p><div class="note"><div class="p"><b>Note:</b>
It is a consequence of the
rule just given that implementations
<span class="rfc2119">may</span> provide the heuristic of using the 1.1
datatypes if the input is labeled as XML 1.1, and the 1.0
datatypes if the input is labeled 1.0. It should be noted
however that the XML version number is not required to be
present in the input to an assessment episode, and in any case
the heuristic <span class="rfc2119">should</span> be subject to override by users, to
support cases where users wish to accept XML 1.1 input but
validate it using the 1.0 datatypes, or accept XML 1.0 input and
validate it using the 1.1 datatypes.
</div></div><div class="note"><div class="p"><b>Note:</b>
Some users will perhaps wish to accept only XML 1.1 input, or
only XML 1.0 input. The rules
just given ensure that conforming implementations of this
specification which accept XML input <span class="rfc2119">may</span> accept XML 1.0, XML
1.1, or both and <span class="rfc2119">may</span> provide user control over which versions
of XML to accept.
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#intro-relatedWork" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="intro-terminology" id="intro-terminology" shape="rect"></a>1.5 Documentation Conventions and Terminology</h3><p>The section introduces the highlighting and typography as used
in this document to present technical material.</p><div class="block">Unless otherwise noted, the entire text of
this specification is normative. Exceptions include:
<ul><li><div class="p">notes</div></li><li><div class="p">sections explicitly marked non-normative</div></li><li><div class="p">examples and their commentary</div></li><li><div class="p">informal descriptions of the consequences of rules
formally and normatively stated elsewhere (such informal
descriptions are typically introduced by phrases like
"Informally, ..." or "It is a
consequence of ... that ...")</div></li></ul>
Explicit statements that some material is normative are not
to be taken as implying that material not so described
is non-normative
(other than that mentioned in the list just given).
</div><p>Special terms are defined at their point of introduction in the
text. For example <span class="termdef"><a name="key-sampledef" id="key-sampledef" title="" shape="rect">[Definition:]&#160;&#160;</a>a <b>term</b> is something used with a
special meaning</span>. The definition is labeled as such
and the term it defines is displayed in boldface. The end of the
definition is not specially marked in the displayed or printed
text. Uses of defined terms are links to their definitions, set
off with middle dots, for instance <a href="#key-sampledef" class="termref" shape="rect"><span class="arrow">&#183;</span>term<span class="arrow">&#183;</span></a>.</p><p>Non-normative examples are set off in boxes and accompanied by
a brief explanation:</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;schema targetNamespace="http://www.example.com/XMLSchema/1.0/mySchema"&gt;</pre></div><div class="exampleWrapper">
<div class="p">And an explanation of the example.</div></div></div><p>The definition of each kind of schema component consists of a
list of its properties and their contents, followed by
descriptions of the semantics of the properties:</p><div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ex" id="ex" shape="rect">Example</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ex-example_property" shape="rect" id="ex-example_property"></a><div class="pdName"><span class="propdef">{example property}</span></div>
<div class="pdDef">
A <a href="#c" class="compref" shape="rect">Component</a> component. Required.<div class="ownDesc">
<p>An example property</p></div>
</div>
</div>
</div></div>
</div>
<p>References to properties of schema components are links to the
relevant definition as exemplified above, set off with curly
braces, for instance
<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>.</p><p>For a given component <var>C</var>, an expression
of the form "<var>C</var>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>"
denotes the (value of the) property
<a href="#ex-example_property" class="propref" shape="rect">{example property}</a> for component <var>C</var>.
The leading "<var>C</var>." (or more) is sometimes omitted,
if the identity of the component and any other omitted properties
is understood from the context.
This "dot operator" is left-associative, so
"<var>C</var>.<span class="anonRef">{p1}</span>.<span class="anonRef">{p2}</span>"
means the same as
"(<var>C</var>.<span class="anonRef">{p1}</span>) .
<span class="anonRef">{p2}</span>"
and denotes the value of property <span class="anonRef">{p2}</span>
within the component or <a href="#t-propRec" class="termref" shape="rect"><span class="arrow">&#183;</span>property record<span class="arrow">&#183;</span></a> which itself
is the value of <var>C</var>'s <span class="anonRef">{p1}</span> property.
White space on either side of the dot operator has no significance
and is used (rarely) solely for legibility.
</p><p>For components <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub>, an expression
of the form "<var>C</var><sub>1</sub>&#160;.&#160;<span class="anonRef">{example property 1}</span> = <var>C</var><sub>2</sub>&#160;.&#160;<span class="anonRef">{example property 2}</span>"
means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> have the same value for the
property (or properties) in question. Similarly,
"<var>C</var><sub>1</sub> = <var>C</var><sub>2</sub>" means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> are
identical, and "<var>C</var><sub>1</sub>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>
= <var>C</var><sub>2</sub>" that <var>C</var><sub>2</sub> is the value of
<var>C</var><sub>1</sub>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>.</p><p>The correspondence between an element information item which is
part of the XML representation of a schema and one or more schema
components is presented in a tableau which illustrates the
element information item(s) involved. This is followed by a
tabulation of the correspondence between properties of the
component and properties of the information item. Where context
determines which of several
different components corresponds to the
source declaration, several tabulations, one per
context, are given. The property correspondences are normative,
as are the illustrations of the XML representation element
information items.
</p><p>In the XML representation, bold-face attribute names (e.g.
<b>count</b> below) indicate a required attribute
information item, and the rest are optional. Where an attribute
information item has an enumerated type definition, the values
are shown separated by vertical bars, as for <code>size</code>
below; if there is a default value, it is shown following a
colon. Where an attribute information item has a built-in simple
type definition defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, a hyperlink
to
its definition therein is given.</p><p>The allowed content of the information item is shown as a
grammar fragment, using the Kleene operators <code>?</code>,
<code>*</code> and <code>+</code>. Each element name therein is
a hyperlink to its own illustration.</p><div class="note"><div class="p"><b>Note:</b> The illustrations are derived automatically from the <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>. In the case of apparent
conflict, the <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> takes
precedence, as it, together with the <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation Constraints<span class="arrow">&#183;</span></a>,
provide the normative statement of the form of XML
representations.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>example</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-example" name="element-example" shape="rect">&lt;example</a><br clear="none" />&#160;&#160;<b>count</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#integer" shape="rect">integer</a><br clear="none" />&#160;&#160;size = (<var>large</var> | <var>medium</var> | <var>small</var>)&#160;:&#160;medium&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-any" class="eltref" shape="rect">any</a>*)<br clear="none" />&lt;/example&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#intro-terminology" shape="rect">Example</a> <strong>Schema Component</strong></div></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ex-example_property" class="propref" shape="rect">{example property}</a></div><div class="mapRepr">Description of what
the property corresponds to, e.g. the value of the
<code>size</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
<br clear="none" />&#160;
</div></div></div><p>References to elements in the text are links to the relevant
illustration as exemplified above, set off with angle brackets,
for instance <a href="#element-example" class="eltref" shape="rect">&lt;example&gt;</a>.</p><p>
Unless otherwise specified, references to attribute values
are references to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the attribute information
item in question, not to its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> or to other forms
or varieties of "value" associated with it.
For a given element information item <var>E</var>, expressions of the
form "<var>E</var> has <code>att1</code> = <var>V</var>"
are short-hand for "there is an attribute information
item named <code>att1</code> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of <var>E</var> and
its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
is <var>V</var>."
If the identity of <var>E</var> is clear from context, expressions
of the form "<code>att1</code> = <var>V</var>"
are sometimes used.
The form "<code>att1</code> &#8800; <var>V</var>" is also used
to specify that the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>att1</code> is
<em>not</em> <var>V</var>.
</p><p>References to properties of information items as defined in
<a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> are notated as links to the relevant
section thereof, set off with square brackets, for example
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</p><p>Properties which this specification defines for information
items are introduced as follows:</p><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;example&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="ex-foo" name="ex-foo" shape="rect"><span class="propdef">[new property]</span></a></dt><dd>The value the property
gets.</dd></dl>
</div>
</div>
<p>References to properties of information items defined in this
specification are notated as links to their introduction as
exemplified above, set off with square brackets, for example
<a href="#ex-foo" class="propref" shape="rect">[new property]</a>.</p><p>The "dot operator" described above
for components and their properties is also used for information items
and their properties. For a given information item <var>I</var>, an expression
of the form "<var>I</var>&#160;.&#160;<a href="#ex-foo" class="propref" shape="rect">[new property]</a>"
denotes the (value of the) property
<a href="#ex-foo" class="propref" shape="rect">[new property]</a> for item <var>I</var>.
</p><p>
Lists of normative constraints are typically introduced with
phrase like
"all of the following are true" (or "... apply"),
"one of the following is true",
"at least one of the following is true",
"one or more of the following is true",
"the appropriate case among the following is true",
etc.
The phrase "one of the following is true"
is used in cases where the authors believe the items listed
to be mutually exclusive (so that the distinction between
"exactly one" and "one or more"
does not arise). If the items in such a list are not in fact
mutually exclusive, the phrase "one of the following"
should be interpreted as meaning "one or more of the
following".
The phrase "the appropriate case among the following"
is used only when the cases are thought by the authors to be
mutually exclusive; if the cases in such a list are not in fact
mutually exclusive, the first applicable case should be
taken. Once a case has been encountered with a true condition,
subsequent cases <span class="rfc2119">must</span> not be tested.
</p><p>The following highlighting is used for non-normative commentary
in this document:</p><div class="note"><div class="p"><b>Note:</b> General comments directed to all readers. </div></div><p>Within normative prose in this
specification, the words <span class="rfc2119">may</span>,
<span class="rfc2119">should</span>,
<span class="rfc2119">must</span> and <span class="rfc2119">must not</span> are
defined as follows:</p><div class="glist"><div class="gitem"><div class="giLabel"><span class="rfc2119">may</span></div><div class="giDef"><div class="p">Schemas,
schema documents, and processors are
permitted to but need not behave as described.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">should</span></div><div class="giDef"><div class="p">It is recommended that schemas,
schema documents,
and
processors behave as described, but there
can be valid reasons for them not to; it is important that the
full implications be understood and carefully weighed before
adopting behavior at variance with the recommendation.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">must</span></div><div class="giDef"><div class="p">
<em>(Of schemas and
schema documents:)</em>
Schemas and documents are required to behave as
described; otherwise they are in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div><div class="p"><em>(Of
processors:)</em>
Processors are
required to behave as described.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">must not</span></div><div class="giDef"><div class="p">Schemas,
schema documents, and processors
are forbidden to behave as
described; schemas and documents which nevertheless
do so are in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="dt-error" id="dt-error" shape="rect"></a>error</div><div class="giDef"><div class="p">A failure of a schema
or schema
document to conform to the rules of this
specification.</div><div class="p">Except as otherwise specified,
processors <span class="rfc2119">must</span> distinguish error-free (conforming) schemas
and schema documents used in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> from those with errors;
if a schema used in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
or a schema document used in constructing a schema
is in error,
processors <span class="rfc2119">must</span> report the fact;
if more than one is in error, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
whether more than one is reported as being in error.
If one or more of the constraint codes given
in <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a> is applicable, it is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> how many of them, and which,
are reported.
</div><div class="note"><div class="p"><b>Note:</b> Failure of an XML document to be valid against a particular
schema is not (except for the special case of a schema
document consulted in the course of building a schema) in
itself a failure to conform to this specification and thus,
for purposes of this specification, not an error.
</div></div><div class="note"><div class="p"><b>Note:</b> Notwithstanding the fact that (as just noted) failure to be
schema-valid is not a violation of this specification and
thus not strictly speaking an error as defined here,
the names of the PSVI properties <a href="#a-schema_error_code" class="propref" shape="rect">[schema error code]</a> (for attributes) and <a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> (for elements) are retained for
compatibility with other versions of this specification, and
because in many applications of XSD, non-conforming
documents <em>are</em> "in error" for
purposes of those applications.
</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-deprecated" id="key-deprecated" shape="rect"></a>deprecated</div><div class="giDef"><div class="p">A feature or construct defined in this specification
described as <b>deprecated</b> is retained in this
specification for compatibility with previous versions
of the specification, and but its use is not advisable and
schema authors <span class="rfc2119">should</span> avoid its use if possible.
</div><div class="p">
Deprecation has no effect on the conformance of schemas
or schema documents which use deprecated features.
Since deprecated features are part of the specification,
processors <span class="rfc2119">must</span> support them, although some processors
<span class="rfc2119">may</span>
choose to issue warning messages when deprecated
features are encountered.
</div><div class="p">
Features deprecated in this version of this specification
may be removed entirely in future versions, if any.
</div></div></div></div><p>These definitions describe in terms
specific to this document the meanings assigned to these terms by
<a href="#rfc-2119" shape="rect">[IETF RFC 2119]</a>. The specific wording follows
that of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
</p><p>Where these terms appear without special highlighting,
they are used in their ordinary senses and do not express conformance
requirements. Where these terms appear highlighted within
non-normative material (e.g. notes), they are recapitulating
rules normatively stated elsewhere.
</p><p>This
specification provides a
further description
of error and of conformant
processors' responsibilities with respect to errors in
<a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a>.</p></div></div><div class="div1">
<h2><a name="concepts" id="concepts" shape="rect"></a>2 Conceptual Framework</h2><p>This chapter gives an overview of <em>XML Schema Definition Language: Structures</em> at the level of its
abstract data model. <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> provides details
on this model, including a normative representation in XML for the
components of the model. Readers interested primarily in learning
to write schema documents will find it most
useful first to read <a href="#bib-expo" shape="rect">[XML Schema: Primer]</a> for a
tutorial introduction, and only then to consult the sub-sections of
<a href="#components" shape="rect">Schema Component Details (&#167;3)</a> named
<em>XML Representation of ...</em>
for the details.</p><div class="div2">
<h3><span class="nav"> <a href="#concepts-data-model" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="xsover" id="xsover" shape="rect"></a>2.1 Overview of XSD</h3><p>An XSD schema is
a set of components such as type definitions and
element declarations. These can be used to assess the validity of
well-formed element and attribute information items (as defined
in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>), and furthermore
to
specify additional information about
those items and their descendants. These augmentations
to the information set make explicit information that
was implicitly
present in the original
document (or in the original document
and the governing schema, taken together), such as normalized and/or default values for attributes
and elements and the types of element and attribute information
items. The input information set
is
also augmented with information about the validity of the
item, or about other properties described in this
specification. <span class="termdef"><a name="key-psvi" id="key-psvi" title="" shape="rect">[Definition:]&#160;&#160;</a>We refer to the augmented infoset which
results from conformant processing as defined in this
specification as the <b>post-schema-validation
infoset</b>, or <b>PSVI</b></span>. Conforming processors <span class="rfc2119">may</span> provide
access to some or
all of the PSVI, as described in <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset (&#167;C.1)</a>. The mechanisms by which
processors provide such
access to the PSVI are neither defined nor constrained by this
specification. </p><div class="p"><div class="termdef"><a name="key-s-v-a" id="key-s-v-a" title="" shape="rect">[Definition:]&#160;&#160;</a>As it is used in this specification, the
term <b>schema-validity assessment</b> has three aspects: <div class="constraintlist"><div class="clnumber">1<a id="c-lsv" name="c-lsv" shape="rect"> </a><span class="p">Determining local schema-validity, that is
whether an element or attribute information item satisfies
the constraints embodied in the
relevant components of an
XSD schema
(specifically the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
element or attribute declaration and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
type definition);</span></div>
<div class="clnumber">2 <span class="p">Determining an
overall validation outcome for the item
by combining local schema-validity with
the results of schema-validity assessments of its
descendants, if any; and</span></div>
<div class="clnumber">3 <span class="p">Determining the appropriate
augmentations to the infoset (and, if desired, exposing them
to downstream applications in some way, to record this
outcome).</span></div>
</div></div></div><p>Throughout this specification, <span class="termdef"><a name="key-va" id="key-va" title="" shape="rect">[Definition:]&#160;&#160;</a> the word <b>assessment</b>
is used to refer to the overall process of local validation,
recursive determination of
validation outcome, and infoset augmentation, i.e. as a short form for
"<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a>"</span>.
</p><div class="block"><span class="termdef"><a name="key-vn" id="key-vn" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>Validation</b> is the process of determining
whether an XML document, an element information item, or an
attribute information item obeys the constraints expressed in a
schema; in the context of XSD, this amounts to calculating the
value of the appropriate item's <a href="#e-validity" class="propref" shape="rect">[validity]</a> property. </span>
<div class="note"><div class="p"><b>Note:</b> As just defined, validation produces not a binary result, but a
ternary one: if the information item is <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>,
it will be either valid or invalid, but if no applicable
declaration is found, its validity will be unknown (and its
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property will have the
value <b><i>notKnown</i></b>). Whether in a particular application
<b><i>notKnown</i></b> should be treated in the same way as
<b><i>invalid</i></b> or differently is outside the scope of this
specification; sometimes one choice is appropriate,
sometimes the other.
</div></div>
<div class="note"><div class="p"><b>Note:</b> In phrases such as "<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a>"
and "length valid restriction", the word
<b>valid</b> is used in its ordinary English sense
of "conforming to some set of rules", not
necessarily limited to rules expressed in an XSD schema.
</div></div>
</div><p>In general, a <b>valid document</b>
is a document whose contents obey the constraints expressed in a
particular schema. Since a document may be validated against many
different schemas, it is often clearer to speak of a document
being valid <em>against a particular schema</em>. When this
specification is used, document validity can be defined
operationally in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> properties on the nodes of
the document (in particular [validity]). Several similar but distinct kinds of validity are
usefully distinguished, for which terms are defined below in
<a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.</p><div class="block">Because the [validity] property is part of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, it should be
evident that any full <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an item by definition
entails the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of that item. Conversely, since the
[validity] property is recursive and
depends upon many other pieces of information which are part of
the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> also typically entails at least partial
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. The processes denoted by the two terms thus
overlap and are not always distinguishable; often the same
process can be referred to by either term. In this specification,
the term "<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" is used when it is desired
to stress the calculation of the complete <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, including
properties whose values have no effect on validity.
The term "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>", in contrast, is used
when it is desired to focus primarily on the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>
of the item, treating the other information generated in
the process as merely incidental.
<div class="note"><div class="p"><b>Note:</b> When there is no particular
emphasis one way or the other, the choice of terms is
necessarily arbitrary, or grounded in the history of
this and related specifications. Historical reasons,
rather than connotation, determine the
use of the term "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>" instead of
"<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" in terms like
"<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>",
"<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>", and
"Validation Rules".
</div></div>
</div><div class="block">During <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, some or
all of the element and attribute information items in the input
document are associated with declarations and/or type
definitions; these declarations and type definitions are then
used in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of those items, in a
recursive process. <span class="termdef"><a name="key-governing" id="key-governing" title="" shape="rect">[Definition:]&#160;&#160;</a>The declaration associated with an information
item, if any, and with respect to which its validity is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in a given assessment episode
is said to <b>govern</b> the item, or to be its
<b>governing</b> element or attribute declaration.
Similarly the type definition with respect to which the
type-validity of an item is assessed is its
<b>governing</b> type definition.</span>
<div class="note"><div class="p"><b>Note:</b> See also the definitions of <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> and <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
(for elements) and <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (for
attributes).</div></div>
</div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#xsover" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-schemaConstraints" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-data-model" id="concepts-data-model" shape="rect"></a>2.2 XSD Abstract Data Model</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1 <a href="#Type_Definition_Summary" shape="rect">Type Definition Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.1 <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.2 <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.3 <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2 <a href="#Declarations_Summary" shape="rect">Declaration Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.1 <a href="#Element_Declaration" shape="rect">Element Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.2 <a href="#Element_Equivalence_Class" shape="rect">Element Substitution Group</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.3 <a href="#Attribute_Declaration" shape="rect">Attribute Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.4 <a href="#Notation_Declaration" shape="rect">Notation Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3 <a href="#Model_Group_Summary" shape="rect">Model Group Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.1 <a href="#Model_Group" shape="rect">Model Group</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.2 <a href="#Particle" shape="rect">Particle</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.3 <a href="#Attribute_Use" shape="rect">Attribute Use</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.4 <a href="#Wildcard" shape="rect">Wildcard</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4 <a href="#Constraint_Summary" shape="rect">Constraint Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.1 <a href="#Identity-constraint_Definition" shape="rect">Identity-constraint Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.2 <a href="#TypeAlternative" shape="rect">Type Alternative</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.3 <a href="#Assertion" shape="rect">Assertion</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.4 <a href="#sec-ccoverlap" shape="rect">Overlapping Functionality of Constraint Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5 <a href="#Group_Definitions" shape="rect">Group Definition Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5.1 <a href="#Model_Group_Definition" shape="rect">Model Group Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5.2 <a href="#Attribute_Group_Definition" shape="rect">Attribute Group Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.6 <a href="#Annotation" shape="rect">Annotation Components</a><br clear="none" />
</div><p>This specification builds on <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>. The concepts and definitions used
herein regarding XML are framed at the abstract level of
<a href="http://www.w3.org/TR/xml-infoset/#infoitem" shape="rect">information
items</a> as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>. By
definition, this use of the infoset provides <em>a
priori</em> guarantees of <a href="http://www.w3.org/TR/xml11/#sec-well-formed" shape="rect">well-formedness</a>
(as defined in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>) and <a href="http://www.w3.org/TR/xml-names11/#Conformance" shape="rect">namespace
conformance</a> (as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>)
for all candidates for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> and for all
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>.</p><p>Just as <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> can be described in terms of
information items, XSD schemas can be described in terms of
an abstract data model. In defining schemas in terms of
an abstract data model, this specification rigorously specifies
the information which <span class="rfc2119">must</span> be available to a conforming
XSD processor. The abstract model for schemas is
conceptual only, and does not mandate any particular
implementation or representation of this information. To
facilitate interoperation and sharing of schema information, a
normative XML interchange format for schemas is provided.</p><p><span class="termdef"><a name="c" id="c" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Schema
component</b> is the generic term for the building blocks
that make up the abstract data model
of the schema. </span> <span class="termdef"><a name="key-schema" id="key-schema" title="" shape="rect">[Definition:]&#160;&#160;</a> An <b>XSD schema</b> is a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a></span>. There are
several kinds of schema component, falling
into three groups. The primary schema components, which <span class="rfc2119">may</span> (type
definitions) or <span class="rfc2119">must</span> (element and attribute declarations) have
names, are as follows:</p><ul><li><div class="p">Simple type definitions
</div></li><li><div class="p">Complex type definitions</div></li><li><div class="p">Attribute declarations</div></li><li><div class="p">Element declarations</div></li></ul><p>The secondary schema components, are as
follows:</p><ul><li><div class="p">Attribute group definitions</div></li><li><div class="p">Identity-constraint definitions</div></li><li><div class="p">Type alternatives</div></li><li><div class="p">Assertions</div></li><li><div class="p">Model group definitions</div></li><li><div class="p">Notation declarations</div></li></ul><p>Finally, the "helper" schema components provide small
parts of other schema components; they are dependent on their context:</p><ul><li><div class="p">Annotations</div></li><li><div class="p">Model groups</div></li><li><div class="p">Particles</div></li><li><div class="p">Wildcards</div></li><li><div class="p">Attribute Uses</div></li></ul><p>The
name <span class="termdef"><a name="xc" id="xc" title="Component" shape="rect">[Definition:]&#160;&#160;</a><b>Component</b> covers all the different kinds of
schema component defined in this specification.</span>
</p><p>During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, <span class="termdef"><a name="key-declaration" id="key-declaration" title="" shape="rect">[Definition:]&#160;&#160;</a><b>declaration</b>
components are associated by (qualified) name to information items
being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a></span>.
</p><p>On the other hand, <span class="termdef"><a name="key-definition" id="key-definition" title="" shape="rect">[Definition:]&#160;&#160;</a><b>definition</b> components define internal
schema components that can be used in other schema
components</span>.
</p><p><span class="termdef"><a name="key-compName" id="key-compName" title="" shape="rect">[Definition:]&#160;&#160;</a>Declarations
and definitions <span class="rfc2119">may</span> and in
some cases <span class="rfc2119">must</span> have and be identified by
<b>name</b>s, which are
NCNames as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></span>.</p><p><span class="termdef"><a name="key-targetNS" id="key-targetNS" title="" shape="rect">[Definition:]&#160;&#160;</a>Several
kinds of component have a <b>target namespace</b>, which
is either <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or a
namespace name, also as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></span>. The <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a> serves to identify
the namespace within which the association between the component
and its name exists.
</p><p>An <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>, as defined in
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, is a pair consisting
of a namespace name, which <span class="rfc2119">may</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and a local
name. The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of any component with both a
<a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a> property and a
<a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>component name<span class="arrow">&#183;</span></a> property is the pair
consisting of the values of those two properties.
The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of a declaration is used to help
determine which information items will be
<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governed<span class="arrow">&#183;</span></a> by
the declaration.
</p><div class="note"><div class="p"><b>Note:</b> At the abstract level, there is no requirement that the
components of a schema share a <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a>. Any schema for
use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of documents
containing names from more than one namespace will of necessity
include components with different <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespaces<span class="arrow">&#183;</span></a>. This contrasts
with the situation at the level of the XML representation of
components, in which each schema document contributes
definitions and declarations to a single target namespace.</div></div><p><a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>Validation<span class="arrow">&#183;</span></a>, defined in detail
in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, is a relation between information
items and schema components. For example, an attribute
information item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>
with respect to an attribute declaration, a list of element
information items with respect to a
content model, and so on. The following sections briefly
introduce the kinds of components in the schema abstract data
model, other major features of the abstract model, and how they
contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><div class="div3">
<h4><a name="Type_Definition_Summary" id="Type_Definition_Summary" shape="rect"></a>2.2.1 Type Definition Components</h4><p>The abstract model provides two kinds of type definition
component: simple and complex.</p><p><span class="termdef"><a name="td" id="td" title="" shape="rect">[Definition:]&#160;&#160;</a>This specification
uses the phrase <b>type definition</b> in cases where no
distinction need be made between simple and complex
types</span>.</p><p>Type definitions form a hierarchy with a single root. The
subsections below first describe characteristics of that
hierarchy, then provide an introduction to simple and complex
type definitions themselves.</p><div class="div4">
<h5><a name="Type_Derivation" id="Type_Derivation" shape="rect"></a>2.2.1.1 Type Definition Hierarchy</h5><p><a name="anchor6204" id="anchor6204" shape="rect"></a><span class="termdef"><a name="key-typeDefinitionHierarchy" id="key-typeDefinitionHierarchy" title="" shape="rect">[Definition:]&#160;&#160;</a>Except for <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, every <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> is, by construction,
either a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> or an
<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of some
other type definition. The exception
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of itself.
With the exception of the loop on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, the
graph of these relationships forms
a tree known as the <b>Type Definition
Hierarchy</b> with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as its
root</span>.
</p><p><span class="termdef"><a name="key-baseTypeDefinition" id="key-baseTypeDefinition" title="" shape="rect">[Definition:]&#160;&#160;</a>The type definition used as the basis
for an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> or
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> is
known as the <b>base type definition</b> of that
definition</span>.
<span class="termdef"><a name="key-derived" id="key-derived" title="" shape="rect">[Definition:]&#160;&#160;</a>
If a type definition <var>D</var> can reach a type definition <var>B</var> by following
its base type definition chain, then <var>D</var> is said to be
<b>derived</b> from <var>B</var>.</span>
In most cases, a type definition is
derived from other type definitions. The only exception is
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, which is derived from itself.
</p><p><span class="termdef"><a name="key-typeRestriction" id="key-typeRestriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
type defined with the same constraints as its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>, or with more, is
said to be a <b>restriction</b>. </span> The added constraints might include narrowed
ranges or reduced alternatives. Given two types <var>A</var> and <var>B</var>, if the definition of
<var>A</var> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of the
definition of <var>B</var>, then members of type <var>A</var> are always locally
valid against type <var>B</var> as well.</p><p><span class="termdef"><a name="key-typeExtension" id="key-typeExtension" title="" shape="rect">[Definition:]&#160;&#160;</a>A complex
type definition which allows element or attribute content in
addition to that allowed by another specified type definition
is said to be an <b>extension</b></span>.</p><div class="note"><div class="p"><b>Note:</b> Conceptually, the definitions of
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> and
<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> overlap: given a
type <var>T</var>, a vacuous
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <var>T</var> and a vacuous
<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of <var>T</var> will each
accept the same inputs as valid. The syntax specified
in this version of this specification, however, requires
that each type be defined either as a restriction
or as an extension, not both. Thus even though the
vacuous extension of <var>T</var> accepts the same inputs as
the vacuous restriction, it will not be accepted in
contexts which require restrictions of <var>T</var>.
</div></div><p><span class="termdef"><a name="key-anyType" id="key-anyType" title="" shape="rect">[Definition:]&#160;&#160;</a>A special complex type
definition, (referred to in earlier versions of this
specification as 'the ur-type definition') whose
name is <b><i>anyType</i></b> in the XSD namespace, is
present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The <b>definition of
<b><i>anyType</i></b></b> serves as default
type definition for element declarations whose XML
representation does not specify one</span>.
</p><p>
<span class="termdef"><a name="key-error" id="key-error" title="" shape="rect">[Definition:]&#160;&#160;</a>A special simple type
definition, whose name is <b><i>error</i></b> in the XSD
namespace, is also present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The
<b>XSD <code>error</code> type</b>
has no valid instances. It can be used in any place where
other types are normally used; in particular, it can be used
in conditional type assignment to cause elements which satisfy
certain conditions to be invalid. </span>
</p><p>
For brevity, the text and examples in this specification often
use the qualified names <code>xs:anyType</code> and
<code>xs:error</code> for these type definitions. (In
practice, any appropriately declared prefix can be used, as
described in <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated (&#167;2.7)</a>.)
</p></div><div class="div4">
<h5><a name="Simple_Type_Definition" id="Simple_Type_Definition" shape="rect"></a>2.2.1.2 Simple Type Definition</h5><p>A simple type definition is a set of constraints on strings
and information about the values they encode, applicable to the
<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of an attribute information item or of an element
information item with no element children. Informally, it
applies to the values of attributes and the text-only content
of elements.
</p><p>Each simple type definition, whether built-in (that is,
defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) or user-defined, is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>.
<span class="termdef"><a name="key-anySimpleType" id="key-anySimpleType" title="" shape="rect">[Definition:]&#160;&#160;</a>A
special <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, whose name is
<b><b><i>anySimpleType</i></b></b> in the
XSD namespace, is the root of the <a href="#key-typeDefinitionHierarchy" class="termref" shape="rect"><span class="arrow">&#183;</span>Type Definition Hierarchy<span class="arrow">&#183;</span></a> for all simple type
definitions. <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> has a lexical space containing
all sequences of characters in the Universal Character
Set (UCS) and a value space containing all
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>
and all finite-length lists of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>.</span>
As with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, this
specification sometimes uses the qualified name
<code>xs:anySimpleType</code> to designate this type
definition. The
built-in list datatypes all have <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> as their
<a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
definition<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="key-anyAtomicType" id="key-anyAtomicType" title="" shape="rect">[Definition:]&#160;&#160;</a>There is a further special datatype
called <b><b><i>anyAtomicType</i></b></b>, a
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which is the <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>
of all the primitive
datatypes.</span> This type definition is often referred
to simply as "<code>xs:anyAtomicType</code>".
It too is
considered to have an unconstrained lexical space. Its value
space consists of the union of the value spaces of all the
primitive datatypes.</p><p><span class="termdef"><a name="key-constructed" id="key-constructed" title="" shape="rect">[Definition:]&#160;&#160;</a>
Datatypes can be <b>constructed</b> from other datatypes by
<b><i>restricting</i></b> the value space or lexical space of a
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> using zero or more
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a>s, by specifying the new datatype as a <b><i>list</i></b>
of items of some <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>,
or by defining it as a <b><i>union</i></b> of some specified sequence of
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</span></p><p>The mapping from lexical space to value space is unspecified
for items whose type definition is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>. Accordingly
this specification does not constrain processors'
behavior in areas
where this mapping is implicated, for example checking such
items against enumerations, constructing default attributes or
elements whose declared type definition is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>
or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>,
checking identity constraints involving such items.</p><div class="note"><div class="p"><b>Note:</b> The Working Group expects to return to this area in a future
version of this specification.</div></div><p><a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>
provides mechanisms for defining new simple type definitions
by <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a>
some primitive
or ordinary datatype. It also
provides mechanisms for constructing new simple type
definitions whose members are lists of items
themselves constrained by some other simple type definition, or
whose membership is the union of the memberships of some other
simple type definitions. Such list and union simple type
definitions are also <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restrictions<span class="arrow">&#183;</span></a> of
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</p><p>For detailed information on simple type definitions, see
<a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions (&#167;3.16)</a> and <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>. The
latter also defines an extensive inventory of pre-defined
simple types.</p></div><div class="div4">
<h5><a name="Complex_Type_Definition" id="Complex_Type_Definition" shape="rect"></a>2.2.1.3 Complex Type Definition</h5><p>A complex type definition is a set of attribute declarations
and a content type, applicable to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item respectively. The
content type <span class="rfc2119">may</span> require the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to contain
neither element nor character information items (that is, to be
empty), or to be a
string which belongs to a particular simple type, or to contain a sequence of
element information items which conforms to a particular model
group, with or without character information items as well.</p><div class="block">Each complex type definition other than <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is
either
<ul><li><div class="p">a restriction of a complex <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
definition<span class="arrow">&#183;</span></a></div></li></ul> or
<ul><li><div class="p">an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of
a simple or complex <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
definition<span class="arrow">&#183;</span></a>.</div></li></ul>
</div><div class="block"> A complex type which extends another does so by having
additional content model particles at the end of the other
definition's content model, or by having additional attribute
declarations, or both.
<div class="note"><div class="p"><b>Note:</b> For the most part, this
specification allows only appending, and not other kinds of
extensions. This decision simplifies application processing
required to cast instances from
the derived type to the base type.
One special case allows the
extension of <code>all</code>-groups in ways that do not
guarantee that the new material occurs only at the end of
the content. Another
special case is extension via <a href="#oc" class="compref" shape="rect">Open Content</a>s in <b><i>interleave</i></b>
mode. </div></div></div><p>
For detailed information on complex type definitions, see <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a>.</p></div></div><div class="div3">
<h4><a name="Declarations_Summary" id="Declarations_Summary" shape="rect"></a>2.2.2 Declaration Components</h4><p>There are three kinds of declaration component: element, attribute,
and notation. Each is described in a section below. Also
included is a discussion of element substitution groups, which
is a feature provided in conjunction with element
declarations.</p><div class="div4">
<h5><a name="Element_Declaration" id="Element_Declaration" shape="rect"></a>2.2.2.1 Element Declaration</h5><p>An element declaration is an association of a name with a
type definition, either simple or complex, an (optional)
default value and a (possibly empty) set of identity-constraint
definitions. The association is either global or scoped to a
containing complex type definition. A top-level element
declaration with name 'A' is broadly comparable to a pair of
DTD declarations as follows, where the associated type
definition fills in the ellipses:</p><pre xml:space="preserve">&lt;!ELEMENT A . . .&gt;
&lt;!ATTLIST A . . .&gt;
</pre><p>Element declarations contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of model group
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when their defaults
and type components are checked against an element information
item with a matching name and namespace, and by triggering
identity-constraint definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p>
For detailed information on element declarations, see <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>.
For an overview of identity constraints, see
<a href="#Identity-constraint_Definition" shape="rect">Identity-constraint Definition (&#167;2.2.4.1)</a>.
</p></div><div class="div4">
<h5><a name="Element_Equivalence_Class" id="Element_Equivalence_Class" shape="rect"></a>2.2.2.2 Element Substitution Group</h5><div class="block">When XML vocabularies are defined using
the
DTD syntax defined by <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>,
a reference in a content model to a particular name is satisfied
only by an element in the XML document whose
name and content correspond exactly to those given in the
corresponding <a href="http://www.w3.org/TR/xml11/#elemdecls" shape="rect">element type
declaration</a>.<div class="note"><div class="p"><b>Note:</b> The "element type declaration"
of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>
is not quite the same as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> as defined
in this specification: <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> does not
distinguish between element declarations and
type definitions as
distinct kinds of object in the way that this specification
does. The "element type declaration" of
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> specifies both the kinds of properties
associated in this specification with element declarations
and the kinds of properties associated here with
(complex) type definitions.
</div></div>
</div><p><span class="termdef"><a name="key-equivalenceClass" id="key-equivalenceClass" title="" shape="rect">[Definition:]&#160;&#160;</a>Through the
mechanism of <b>element substitution
groups</b>, XSD provides a more powerful model
than DTDs do
supporting substitution of one named element for
another</span>. Any top-level element declaration can serve
as the defining member, or head, for an element <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>.
Other top-level element declarations, regardless of target
namespace, can be designated as members of the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>
headed by this element. In a suitably enabled content model, a
reference to the head <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
not just the head itself, but elements corresponding to any
other member of the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> as well.
</p><p>All such members <span class="rfc2119">must</span> have type definitions which are
either the same as the head's type definition or derived
from it. Therefore, although the names of elements
can vary widely as new namespaces and members of the
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> are defined, the content of member elements is
constrained by the type
definition of the
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> head.</p><p>Note that element substitution groups are not represented as
separate components. They are specified in the property values
for element declarations (see
<a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>).</p></div><div class="div4">
<h5><a name="Attribute_Declaration" id="Attribute_Declaration" shape="rect"></a>2.2.2.3 Attribute Declaration</h5><p>An attribute declaration is an association between a name and
a simple type definition, together with occurrence information
and (optionally) a default value. The association is either
global, or local to its containing complex type definition.
Attribute declarations contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of complex type
definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when
their occurrence, defaults and type components are checked
against an attribute information item with a matching name and
namespace.</p><p>
For detailed information on attribute declarations, see
<a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>.</p></div><div class="div4">
<h5><a name="Notation_Declaration" id="Notation_Declaration" shape="rect"></a>2.2.2.4 Notation Declaration</h5><p>A notation declaration is an association between a name and
an identifier for a notation. For an attribute or element information item to
be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
<code>NOTATION</code> simple type definition, its value <span class="rfc2119">must</span>
have been declared with a notation declaration.</p><p>
For detailed information on notation declarations, see <a href="#cNotation_Declarations" shape="rect">Notation Declarations (&#167;3.14)</a>.</p></div></div><div class="div3">
<h4><a name="Model_Group_Summary" id="Model_Group_Summary" shape="rect"></a>2.2.3 Model Group Components</h4><p>The model group, particle, and wildcard components
contribute to the portion of a complex type definition that
controls an element information item's content.</p><div class="div4">
<h5><a name="Model_Group" id="Model_Group" shape="rect"></a>2.2.3.1 Model Group</h5><p>A model group is a constraint in the form of a grammar
fragment that applies to lists of element information items. It
consists of a list of particles, i.e. element declarations,
wildcards and model groups. There are three varieties of model
group:</p><ul><li><div class="p">Sequence (the element information items match the
particles in sequential order);</div></li><li><div class="p">Conjunction (the element information items match the
particles, in any order);</div></li><li><div class="p">Disjunction (the element information items match
one or more
of the particles).</div></li></ul><p>Each model group denotes a set of
sequences of element information items. Regarding that set of
sequences as a language, the set of sequences recognized by a
group <var>G</var> may be written <var>L</var>(<var>G</var>). <span class="termdef"><a name="key-accept-g" id="key-accept-g" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group <var>G</var> is said to <b>accept</b>
or <b>recognize</b> the members of <var>L</var>(<var>G</var>).</span>
</p><p>
For detailed information on model groups, see <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>.</p></div><div class="div4">
<h5><a name="Particle" id="Particle" shape="rect"></a>2.2.3.2 Particle</h5><p>A particle is a term in the grammar for element content,
consisting of either an element declaration, a wildcard or a
model group, together with occurrence constraints.
Particles contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of complex type
definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when
they allow anywhere from zero to many element information items
or sequences thereof, depending on their contents and
occurrence constraints.</p><p>The name <span class="termdef"><a name="t" id="t" title="Term" shape="rect">[Definition:]&#160;&#160;</a><b>Term</b> is used to refer to any of the three kinds of
components which can appear in particles.</span> All
<a href="#t" class="termref" shape="rect"><span class="arrow">&#183;</span>Terms<span class="arrow">&#183;</span></a> are themselves <a href="#ac" class="termref" shape="rect"><span class="arrow">&#183;</span>Annotated Components<span class="arrow">&#183;</span></a>. <span class="termdef"><a name="key-basic-term" id="key-basic-term" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>basic term</b> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a> or a
<a href="#w" class="compref" shape="rect">Wildcard</a>.</span> <span class="termdef"><a name="key-basic-particle" id="key-basic-particle" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>basic
particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>.</span></p><div class="block"><span class="termdef"><a name="key-contentModel" id="key-contentModel" title="" shape="rect">[Definition:]&#160;&#160;</a>A
particle can be used in a complex type definition to
constrain the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item; such a
particle is called a <b>content model</b></span>.
<div class="note"><div class="p"><b>Note:</b> XSD <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content models<span class="arrow">&#183;</span></a> are similar
to but more expressive than
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> content models; unlike
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, XSD does not restrict the form of <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content models<span class="arrow">&#183;</span></a> describing
mixed content. </div></div></div><p>Each content model, indeed each
particle and each term,
denotes a set of sequences of element information items. Regarding
that set of sequences as a language, the set of sequences recognized
by a particle <var>P</var> may be written <var>L</var>(<var>P</var>).
<span class="termdef"><a name="key-accept" id="key-accept" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle <var>P</var> is said to
<b>accept</b> or <b>recognize</b> the members of
<var>L</var>(<var>P</var>). Similarly, a term <var>T</var>
<b>accepts</b> or <b>recognizes</b> the members
of <var>L</var>(<var>T</var>).</span>
</p><div class="note"><div class="p"><b>Note:</b> The language accepted by a content model plays a role in determining
whether an element information item is locally valid or not: if the
appropriate content model does not accept the sequence of elements
among its children, then the element information item is not locally
valid. (Some additional constraints must
also be met: not every
sequence in <var>L</var>(<var>P</var>) is locally valid against <var>P</var>. See
<a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.)</div><div class="p">
No assumption is made, in the definition above,
that the items in the sequence are themselves valid; only the
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the items in the sequence are relevant in
determining whether the sequence is accepted by a particle.
Their validity does affect whether their parent is (recursively)
valid as well as locally valid.</div></div><p>If a sequence <var>S</var> is a member of <var>L</var>(<var>P</var>),
then it is necessarily possible to trace a path through the
<a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a>
within <var>P</var>, with each item within <var>S</var> corresponding to a matching particle
within <var>P</var>. The sequence of particles within <var>P</var> corresponding to <var>S</var>
is called the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>.</p><div class="note"><div class="p"><b>Note:</b> This <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> has nothing to do with
XPath expressions.
When there may otherwise be danger of confusion, the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a>
described here may be referred to as the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>match path<span class="arrow">&#183;</span></a> of <var>S</var>
in <var>P</var>.
</div></div><p>For detailed information on particles, see <a href="#cParticles" shape="rect">Particles (&#167;3.9)</a>.</p></div><div class="div4">
<h5><a name="Attribute_Use" id="Attribute_Use" shape="rect"></a>2.2.3.3 Attribute Use</h5><p>An attribute use plays a role similar to that of a
particle, but for attribute declarations: an attribute
declaration
used by a complex type definition is embedded within
an attribute use, which specifies whether the declaration
requires or merely allows its attribute, and whether it has a
default or fixed value.</p></div><div class="div4">
<h5><a name="Wildcard" id="Wildcard" shape="rect"></a>2.2.3.4 Wildcard</h5><p>A wildcard is a special kind of particle which matches element
and attribute information items dependent on their namespace
names and optionally on their local names.</p><p>
For detailed information on wildcards, see <a href="#Wildcards" shape="rect">Wildcards (&#167;3.10)</a>.</p></div></div><div class="div3">
<h4><a name="Constraint_Summary" id="Constraint_Summary" shape="rect"></a>2.2.4 Constraint Components</h4><p>This section describes constructs which
use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions to constrain the
input document; using them, certain rules can be expressed
conveniently which would be inconvenient or impossible to
express otherwise. Identity-constraint definitions are associated with
element declarations; assertions are associated with type
definitions; conditional type assignment using type alternatives
allows the type of an element instance to be chosen based on
properties of the element instance (in particular, based on the
values of its attributes).
</p><div class="div4">
<h5><a name="Identity-constraint_Definition" id="Identity-constraint_Definition" shape="rect"></a>2.2.4.1 Identity-constraint Definition</h5><p>An identity-constraint definition is an association between a name
and one of several varieties of identity-constraint related to
uniqueness and reference. All the varieties use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions to pick out sets of information
items relative to particular target element information items
which are unique, or a key, or a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> reference, within a specified
scope. An element information item is only <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an element
declaration with identity-constraint definitions if those definitions
are all satisfied for all the descendants of that element
information item which they pick out.</p><p>For detailed information on identity-constraint definitions, see
<a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>.</p><div class="note"><div class="p"><b>Note:</b>
In version 1.0 of this specification, identity constraints used
<a href="#bib-xpath1" shape="rect">[XPath 1.0]</a>; they now use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>. </div></div></div><div class="div4">
<h5><a name="TypeAlternative" id="TypeAlternative" shape="rect"></a>2.2.4.2 Type Alternative</h5><p>A
<a href="#tac" class="compref" shape="rect">Type Alternative</a> component
(type alternative for short)
associates a type definition with a predicate.
Type alternatives are used in conditional
type assignment, in which the choice of <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
for elements governed by a particular element declaration
depends on properties of the document instance. An element
declaration may have a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> which contains a
sequence of type alternatives; the predicates on the alternatives
are tested, and when a predicate is satisfied, the type
definition paired with it is chosen as the element instance's
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>.
</p><div class="note"><div class="p"><b>Note:</b> The provisions for conditional type assignment are inspired by,
but not identical to, those of <a href="#bib-schemapath" shape="rect">[SchemaPath]</a>.</div></div><p>For detailed information on Type Alternatives, see
<a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>.</p></div><div class="div4">
<h5><a name="Assertion" id="Assertion" shape="rect"></a>2.2.4.3 Assertion</h5><p>An assertion is a predicate associated with a type, which is
checked for each instance of the type. If an element or attribute information item
fails to satisfy an assertion associated with a given type,
then that information item is not locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to that type.</p><p>For detailed information on Assertions, see <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>.</p></div><div class="div4">
<h5><a name="sec-ccoverlap" id="sec-ccoverlap" shape="rect"></a>2.2.4.4 Overlapping Functionality of Constraint Components</h5><p>Many rules that can be enforced by identity constraints
and conditional type assignment can also be formulated
in terms of assertions. That is, the various constructs have
overlapping functionality.
The three forms of constraint differ from each other in various
ways which may affect the schema author's choice of formulation.
</p><p>Most obviously, the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> will differ somewhat, depending
on which form of constraint is chosen.
</p><p>
Less obviously, identity constraints are associated with
element declarations, while assertions are associated with
type definitions. If it is desired to enforce a particular
property of uniqueness or referential integrity associated
with a particular element declaration <var>E</var>, of type <var>T</var>,
the schema author may often choose either an identity constraint
associated with <var>E</var>, or an assertion associated with <var>T</var>.
One obvious difference is that
elements substitutable for <var>E</var>
are required to have types derived from <var>T</var>, but
are not required to enforce the identity constraints (or
the nillability) of <var>E</var>. If the constraint applicable to <var>E</var>
should be enforced by elements substitutable for <var>E</var>, it
is often most convenient to formulate the constraint as
an assertion on <var>T</var>; conversely, if only some elements of
type <var>T</var> are intended to be subject to the constraint, or if
elements substitutable for <var>E</var> need not enforce the constraint, then it
will be more convenient to formulate the rule as an
identity constraint on <var>E</var>.
</p><p>Similar considerations sometimes apply to the choice between
assertions and conditional type assignment.</p><p>
Because identity constraints and conditional type assignment are
simpler and less variable than assertions, it may be easier
for software to exploit or optimize them. Assertions have
greater expressive power, which means they are often
convenient. The "rule of least power" applies here;
it is often preferable to use a less expressive notation in
preference to a more expressive one, when either will suffice.
See <a href="#ref-rolp" shape="rect">[Rule of Least Power]</a>.
</p></div></div><div class="div3">
<h4><a name="Group_Definitions" id="Group_Definitions" shape="rect"></a>2.2.5 Group Definition Components</h4><p>There are two kinds of convenience definitions provided to
enable the re-use of pieces of complex type definitions: model
group definitions and attribute group definitions.</p><div class="div4">
<h5><a name="Model_Group_Definition" id="Model_Group_Definition" shape="rect"></a>2.2.5.1 Model Group Definition</h5><p>A model group definition is an association between a name and
a model group, enabling re-use of the same model group in
several complex type definitions.</p><p>
For detailed information on model group definitions, see
<a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions (&#167;3.7)</a>.</p></div><div class="div4">
<h5><a name="Attribute_Group_Definition" id="Attribute_Group_Definition" shape="rect"></a>2.2.5.2 Attribute Group Definition</h5><p>An attribute group definition is an association between a
name and a set of attribute declarations, enabling re-use of
the same set in several complex type definitions.</p><p>
For detailed information on attribute group definitions, see
<a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions (&#167;3.6)</a>.</p></div></div><div class="div3">
<h4><a name="Annotation" id="Annotation" shape="rect"></a>2.2.6 Annotation Components</h4><p>An annotation is information for human and/or mechanical
consumers. The interpretation of such information is not defined
in this specification.</p><p>For detailed information on annotations, see <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a>.</p></div></div><div class="div2">
<h3><span class="nav"><a href="#concepts-data-model" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-conformance" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-schemaConstraints" id="concepts-schemaConstraints" shape="rect"></a>2.3 Constraints and Validation Rules</h3><p>The <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> specification describes two kinds
of constraints on XML documents: <em>well-formedness</em> and
<em>validity</em> constraints. Informally, the
well-formedness constraints are those imposed by the definition
of XML itself (such as the rules for the use of the &lt; and &gt;
characters and the rules for proper nesting of elements), while
validity constraints are the further constraints on document
structure provided by a particular DTD. </p><p>The preceding section focused on <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, that is the constraints on
information items which schema components supply. In fact
however this specification provides four different kinds of
normative statements about schema components, their
representations in XML and their contribution to the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of information items:</p><div class="glist"><div class="gitem"><div class="giLabel">Schema Component Constraint</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-cos" id="gloss-cos" title="" shape="rect">[Definition:]&#160;&#160;</a>Constraints on the schema components themselves,
i.e. conditions components <span class="rfc2119">must</span> satisfy to be components at
all. They are located
in the sixth sub-section of the per-component
sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in
<a href="#outcome-cos" shape="rect">Schema Component Constraints (&#167;B.4)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Schema Representation Constraint</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-src" id="gloss-src" title="" shape="rect">[Definition:]&#160;&#160;</a>Constraints on the representation of schema
components in XML beyond those which are expressed in
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
They are located
in the
third sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Validation Rules</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-cvc" id="gloss-cvc" title="" shape="rect">[Definition:]&#160;&#160;</a>Contributions to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> associated with schema
components. They are located
in the fourth sub-section of the
per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
tabulated in <a href="#validation_failures" shape="rect">Validation Rules (&#167;B.1)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Schema Information Set Contribution</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-sic" id="gloss-sic" title="" shape="rect">[Definition:]&#160;&#160;</a>Augmentations to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>s expressed by schema
components, which follow as a consequence of
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
They are located
in the fifth
sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset (&#167;B.2)</a></span>.</div></div></div></div><p>The last of these, schema information set contributions, are
not as new as they might at first seem. XML validation augments the XML information set in similar
ways, for example by providing values for attributes not present
in instances, and by implicitly exploiting type information for
normalization or access. (As an example of the latter case,
consider the effect of <code>NMTOKENS</code> on attribute white
space, and the semantics of <code>ID</code> and
<code>IDREF</code>.) By including schema information set
contributions, this specification makes explicit some features
that XML leaves implicit.</p></div><div class="div2">
<h3><span class="nav"><a href="#concepts-schemaConstraints" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-schema-validity-and-docs" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-conformance" id="concepts-conformance" shape="rect"></a>2.4 Conformance</h3><div class="note"><div class="p"><b>Note:</b> </div></div><p>Within the context of this
specification, conformance can be claimed for schema
documents, for schemas,
and for
processors.
</p><div class="block">A <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>
conforms to this specification if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="sd-valid" name="sd-valid" shape="rect"> </a><span class="p">It is valid with respect to the
top-level element declaration for <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> in
the schema specified
in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
That is,
when <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> using
<a href="#c-res" class="termref" shape="rect"><span class="arrow">&#183;</span>element-driven validation<span class="arrow">&#183;</span></a>
and stipulating the declaration for <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
in its <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
has a <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a>
property with value <b><i>full</i></b> or <b><i>partial</i></b> and a
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property
with value <b><i>valid</i></b>.</span></div>
<div class="clnumber">2<a id="sd-supervalid" name="sd-supervalid" shape="rect"> </a><span class="p">No element in the schema document violates any of the
Schema Representation Constraints set out in
<a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a>,
unless that element has an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>
element as an ancestor.</span><div class="note"><div class="p"><b>Note:</b> Because elements within <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> do
not map to components, they are not required to
obey the Schema Representation Constraints.</div></div></div>
</div>
</div><p>If the schema document is invalid only
in consequence of invalid descendants of <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements, processors <span class="rfc2119">may</span> treat the schema
document as valid. It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect, if any,
invalid <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements have on the
construction of schema components.
</p><div class="note"><div class="p"><b>Note:</b> While conformance of schema documents is (with the exception just noted) a
precondition for the mapping from schema documents to schema
components described in this specification, conformance of the
schema documents does not guarantee that the result of that
mapping will be a schema that conforms to this specification.
Some constraints (e.g. the rule that there must be at most one
top-level element declaration with a particular <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>)
can only be checked in the context of the schema as a whole.
Because component correctness
depends in part upon the other components present, the XML
mapping rules defined in this specification do not always map
conforming schema documents into components that satisfy all
constraints. In some cases, the mapping will produce components
which violate constraints imposed at the component level; in
others, no component at all will be produced.
</div></div><div class="note"><div class="p"><b>Note:</b>
In this version of this specification, Schema Representation
Constraints concern only properties of the schema document which
can be checked in isolation. In version 1.0 of this
specification, some Schema Representation Constraints could not
be checked against the schema document in isolation, and so it
was not always possible to say, for a given schema document,
whether it satisfied the constraints or not.
</div></div><p>A schema conforms to this specification
if and only if it consists of components which individually and
collectively satisfy all the relevant constraints specified in
this document, including but not limited to all the <a href="#gloss-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Component Constraints<span class="arrow">&#183;</span></a>.
</p><div class="note"><div class="p"><b>Note:</b> This specification defines no API or other interface
for interacting with schemas, so a conformance claim for
a schema is not normally testable in any standardized way.
However, if an interface is provided which enables a user
to interrogate various properties of the schema and check
their values, conformance can usefully be claimed for the
schema.</div></div><p>This specification distinguishes several
classes of conforming processors, which are defined in terms
of the following concepts.
</p><p>
<span class="termdef"><a name="key-validator" id="key-validator" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>validator</b> (or <b>instance validator</b>) is a
processor which <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> an XML instance document against a
conforming schema and distinguishes between valid documents
and others, for one or more of the definitions of validity
(<a href="#key-root-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity<span class="arrow">&#183;</span></a>,
<a href="#key-deep-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>deep validity<span class="arrow">&#183;</span></a>,
or
<a href="#key-uniformly-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>uniform validity<span class="arrow">&#183;</span></a>)
defined below in section
<a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
Conforming validators <span class="rfc2119">may</span> additionally support other
definitions of validity defined in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
</span>
</p><p>
<span class="termdef"><a name="key-assessor" id="key-assessor" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>schema-validity
assessor</b> (or just <b>assessor</b>)
is a processor which performs full or partial
<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a> of an XML instance document,
element information item, or attribute information item,
with
reference to a conforming schema, and provides access to the
entirety of the resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
The means by which an <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> provides
access to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. </span>
</p><p><span class="termdef"><a name="key-general-purpose" id="key-general-purpose" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>general-purpose</b> processor
is a <a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>validator<span class="arrow">&#183;</span></a> or <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> which accepts schemas represented in the
form of XML documents as described in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>.
</span>
</p><div class="note"><div class="p"><b>Note:</b> The <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation
Constraints<span class="arrow">&#183;</span></a> are to be enforced after, not
before, the
<a href="#key-vc-preprocessing" class="termref" shape="rect"><span class="arrow">&#183;</span>conditional-inclusion pre-processing<span class="arrow">&#183;</span></a>
described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> and the
<a href="#key-chameleon-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>chameleon pre-processing<span class="arrow">&#183;</span></a>
described in <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
</div></div><p><span class="termdef"><a name="key-special-purpose" id="key-special-purpose" title="" shape="rect">[Definition:]&#160;&#160;</a>A
schema processor which is not a <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>
processor is a <b>special-purpose</b>
processor.</span></p><div class="note"><div class="p"><b>Note:</b> By separating the conformance requirements relating to the
concrete syntax of <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, this specification
admits processors which use schemas stored in optimized binary
representations, dynamically created schemas represented as
programming language data structures, or implementations in
which particular schemas are compiled into executable code such
as C or Java. Such processors can be said
to conform to this
specification as <a href="#key-special-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>special-purpose<span class="arrow">&#183;</span></a>
but not as <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>
processors.</div></div><p><span class="termdef"><a name="key-fullyConforming" id="key-fullyConforming" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Web-aware</b> processors are
network-enabled processors which are not only
<a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> but
which additionally <span class="rfc2119">must</span> be capable of accessing schema
documents from the World Wide Web as described in <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web (&#167;2.8)</a> and <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>.
</span>.
</p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification the class of <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> processors
was termed
"conformant
to the XML Representation of Schemas". Similarly, the
class of <a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a> processors was
called "fully conforming".</div></div><p>Several important classes of processor
can be defined in terms of the concepts just given:</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-gpval" id="key-gpval" shape="rect"></a>general-purpose validators</div><div class="giDef"><div class="p"><a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>Validators<span class="arrow">&#183;</span></a>
which accept arbitrary schemas expressed
in the form of sets of schema documents (i.e.,
are <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>); some
general-purpose validators may additionally be
<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="key-gp-assessor" id="key-gp-assessor" shape="rect"></a>general-purpose schema-validity assessors</div><div class="giDef"><div class="p"><a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>Assessors<span class="arrow">&#183;</span></a>
which accept arbitrary schemas expressed
in the form of sets of schema documents (i.e.,
are <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>); some
general-purpose assessors may additionally be
<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="key-spval" id="key-spval" shape="rect"></a>special-purpose validators</div><div class="giDef"><div class="p"><a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>Validators<span class="arrow">&#183;</span></a>
which do not accept arbitrary schemas expressed
in the form of sets of schema documents</div><div class="note"><div class="p"><b>Note:</b> Typically a special-purpose validator will either have a
built-in (hard-coded) schema, or else will accept arbitrary
schemas in some form other than schema documents.
</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-othertools" id="key-othertools" shape="rect"></a>other special-purpose tools</div><div class="giDef"><div class="p">Processors (other than those otherwise defined) which
perform some task, service, or activity which depends at
least in part on the contents of some schema, and which
do so in ways which are consistent with the provisions of
this specification.</div><div class="note"><div class="p"><b>Note:</b> The class of <a href="#key-othertools" class="termref" shape="rect"><span class="arrow">&#183;</span>other
special-purpose tools<span class="arrow">&#183;</span></a> is not,
as defined here, a particularly informative description
of a piece of software. It is expected that other
specifications may wish to define processes depending
in part upon schemas, and to require that implementations
of those processes conform to this specification;
this conformance class provides a reference point for
such requirements, and for such claims of conformance.
</div></div></div></div></div><div class="note"><div class="p"><b>Note:</b> Although this specification provides just these standard levels of
conformance, it is anticipated that other conventions can be
established in the future. There is no
need to modify or republish this specification to define such
additional levels of conformance.
</div></div><p>See <a href="#impl-def-list" shape="rect">Checklist of implementation-defined features (&#167;E.1)</a> and <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative) (&#167;C)</a>
for terminology and concepts which may be helpful in
defining the behavior of conforming processors and/or
claiming conformance to this specification.
</p></div><div class="div2">
<h3><span class="nav"><a href="#concepts-conformance" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-nameSymbolSpaces" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-schema-validity-and-docs" id="sec-schema-validity-and-docs" shape="rect"></a>2.5 Schema-validity and documents</h3><p>As noted above, in general a document is <b>valid against
a particular schema</b> if it obeys the constraints imposed
by that schema. Depending on the nature of the application
and on the specific invariants to be enforced, different
forms of validity may be appropriately required by an
application, a specification, or other users of XSD.
This section defines terminology for use in describing the
requirements of applications or other technologies which use
XSD schema to describe constraints on XML documents.
</p><div class="note"><div class="p"><b>Note:</b> Conformance to this specification cannot be claimed for XML
documents other than schema documents; this specification
imposes no requirements on documents, validity-related or
otherwise, and the terms defined in this section play
no role in conformance
to this specification. They are defined here for the
convenience of users of this specification who do wish to
impose specific requirements on documents.</div><div class="p">The terms defined capture some commonly used requirements, but
the specification of which documents should be regarded as
acceptable for a specific application, or as conforming to a
given specification, is out of scope for this specification.
Applications and specifications which use XSD are free to
specify whatever constraints they see fit on documents; the
provision of terms for the concepts identified here should not
be taken to imply that other rules for document acceptability
are discouraged or inappropriate.
</div></div><p>All the terms defined below require that the document's root
element be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> using either <a href="#c-res" class="termref" shape="rect"><span class="arrow">&#183;</span>element-driven validation<span class="arrow">&#183;</span></a> (when the
intended root element of the schema is clearly specified ) or else
<a href="#key-strict-wc-mode" class="termref" shape="rect"><span class="arrow">&#183;</span>strict wildcard
validation<span class="arrow">&#183;</span></a> (if several different root elements are
acceptable).</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-root-valid-doc" id="key-root-valid-doc" shape="rect"></a>root-valid document</div><div class="giDef"><div class="p">A document is <b>root-valid</b> against a given
XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> the document's root
element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> =
<b><i>valid</i></b> and <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a>
= <b><i>full</i></b> or <b><i>partial</i></b>.
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-deep-valid-doc" id="key-deep-valid-doc" shape="rect"></a>deep-valid document</div><div class="giDef"><div class="p">A document is <b>deep-valid</b> against a given
XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="docdeepvalid-rootvalid" name="docdeepvalid-rootvalid" shape="rect"> </a><span class="p">The document's root element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b>.</span></div>
<div class="clnumber">2 <span class="p">The document's root element has
<a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> = <b><i>full</i></b> or
<b><i>partial</i></b>.
</span></div>
<div class="clnumber">3 <span class="p">No element in the document has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.</span></div>
<div class="clnumber">4 <span class="p">No attribute in the document has <a href="#a-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.</span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> The second and third clauses are necessary to ensure that
invalid descendants of laxly validated elements are caught;
they do not cause their laxly validated ancestor to have
<a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.
</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-uniformly-valid-doc" id="key-uniformly-valid-doc" shape="rect"></a>uniformly valid document</div><div class="giDef"><div class="p">A document is <b>uniformly valid</b> against a given
XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="uniformlyvalid-rootvalid" name="uniformlyvalid-rootvalid" shape="rect"> </a><span class="p">The document's root element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b>.</span></div>
<div class="clnumber">2 <span class="p">The document's root element has
<a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> = <b><i>full</i></b>.
</span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> See <a href="#sec-sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a> for the definition
of the <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property.)
</div><div class="p">It follows from the first and second clauses that every
element and attribute in the document has been
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> and each of them is valid. (This distinguishes
<b>uniform validity</b> from <b>deep validity</b>;
a deep-valid document may include elements and attributes
whose validity is <b><i>notKnown</i></b>, perhaps because they
are laxly <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> and no declarations were found for
them, or because they were <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.)
</div></div></div></div></div><div class="note"><div class="p"><b>Note:</b> The absence of error codes does not suffice to make a document
valid according to any of the definitions just given; the
<a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> property will be empty (or
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) for any root element with <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b>.
Validators which expose only the <a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> property and fail to distinguish in
their behavior between <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b> and <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b> can thus easily
mislead unwary users. A frequent cause of
<a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b> is
the failure of the element information item to <a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> any
declaration in the schema.
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#sec-schema-validity-and-docs" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Instance_Document_Constructions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-nameSymbolSpaces" id="concepts-nameSymbolSpaces" shape="rect"></a>2.6 Names and Symbol Spaces</h3><p>As discussed in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, most
schema components (<span class="rfc2119">may</span>) have <a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>names<span class="arrow">&#183;</span></a>. If all such names were
assigned from the same "pool", then it would be
impossible to have, for example, a simple type definition and an
element declaration both with the name "title" in a
given <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a>.</p><p>Therefore <span class="termdef"><a name="key-symbolSpace" id="key-symbolSpace" title="" shape="rect">[Definition:]&#160;&#160;</a>this specification introduces the term <b>symbol
space</b> to denote a collection of names, each of which is
unique with respect to the others</span>.
Within a given schema there are distinct symbol spaces
for each kind of named definition and declaration component identified
in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, except that
simple type definitions and complex type definitions share a
symbol space. Within a given symbol space, names
<span class="rfc2119">must</span> be unique;
as a consequence, each <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> within a given
symbol space uniquely identifies a single component.
The same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <span class="rfc2119">may</span> however appear in more than one symbol space without
conflict. For example, assuming that the namespace prefix
<code>my</code> is bound to some particular namespace,
both a simple type definition and a top-level element declaration
can bear the name <code>my:abc</code> without conflict or
necessary relation between the two. But it is not possible
for both a simple type definition and a complex type
definition, or two distinct top-level element declarations,
to share the name <code>my:abc</code>.
</p><p>Locally scoped attribute and element declarations are special
with regard to symbol spaces. Their names are not included
in the global symbol spaces for attribute and element names;
each complex type definition defines its own attribute symbol
space, and elements local to a complex type definition are
constrained by <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>,
but not by means of symbol spaces. Their names
are not regarded as being in any particular symbol space.
So, for example, two
complex type definitions having the same target namespace can
contain a local attribute declaration for the unqualified name
"priority", or contain a local element declaration
for the name "address", without conflict or
necessary relation between the two.</p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#concepts-nameSymbolSpaces" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#web-representation" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Instance_Document_Constructions" id="Instance_Document_Constructions" shape="rect"></a>2.7 Schema-Related Markup in Documents Being Validated</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.1 <a href="#xsi_type" shape="rect">xsi:type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.2 <a href="#xsi_nil" shape="rect">xsi:nil</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.3 <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation</a><br clear="none" />
</div><p><em>XML Schema Definition Language: Structures</em> defines
several attributes for direct use in any XML documents. These
attributes are in the schema instance namespace
(<code>http://www.w3.org/2001/XMLSchema-instance</code>) described in <a href="#xsi-namespace" shape="rect">The Schema Instance Namespace (<code>xsi</code>) (&#167;1.3.1.2)</a> above. All schema processors
<span class="rfc2119">must</span>
have appropriate attribute declarations for these attributes
built in, see <a href="#xsi.type" shape="rect">Attribute Declaration for the 'type' attribute (&#167;3.2.7.1)</a>,
<a href="#xsi.nil" shape="rect">Attribute Declaration for the 'nil' attribute (&#167;3.2.7.2)</a>, <a href="#xsi.schemaLocation" shape="rect">Attribute Declaration for the 'schemaLocation' attribute (&#167;3.2.7.3)</a> and
<a href="#xsi.noNamespaceSchemaLocation" shape="rect">Attribute Declaration for the 'noNamespaceSchemaLocation' attribute (&#167;3.2.7.4)</a>.</p><div class="note"><div class="p"><b>Note:</b> As described above (<a href="#ns-bindings" shape="rect">Conventional Namespace Bindings (&#167;1.3.3)</a>), the
attributes described in this section are referred to in this
specification as "<code>xsi:type</code>",
"<code>xsi:nil</code>", etc. This is shorthand for
"an attribute information item whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace
name]</a> is
<code>http://www.w3.org/2001/XMLSchema-instance</code> and whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local
name]</a> is <code>type</code>" (or
<code>nil</code>, etc.).
</div></div><div class="div3">
<h4><a name="xsi_type" id="xsi_type" shape="rect"></a>2.7.1 xsi:type</h4><p>The <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition (&#167;2.2.1.2)</a> or <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition (&#167;2.2.1.3)</a> used in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element is usually
determined by reference to the appropriate schema components. An
element information item in an instance <span class="rfc2119">may</span>, however,
explicitly assert its type using the attribute
<code>xsi:type</code>. The value of this attribute is a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>; see <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a> for the means by which the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is associated with a type
definition.
</p></div><div class="div3">
<h4><a name="xsi_nil" id="xsi_nil" shape="rect"></a>2.7.2 xsi:nil</h4><p><em>XML Schema Definition Language: Structures</em> introduces a mechanism for signaling that an element
<span class="rfc2119">must</span> be accepted as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
when it has no content despite a content type which does not
require or even necessarily allow empty content. An element
can be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
without content if it has the attribute <code>xsi:nil</code>
with the value <code>true</code>. An element so labeled <span class="rfc2119">must</span>
be empty, but can carry attributes if permitted by the
corresponding complex type.</p></div><div class="div3">
<h4><a name="xsi_schemaLocation" id="xsi_schemaLocation" shape="rect"></a>2.7.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation</h4><p>The <code>xsi:schemaLocation</code> and
<code>xsi:noNamespaceSchemaLocation</code> attributes can be
used in a document to provide hints as to the physical location
of schema documents which can be used for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. See <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> for details on the use of these
attributes.</p><div class="note"><div class="p"><b>Note:</b> The <code>xsi:schemaLocation</code> attribute typically appears
in XML document instances being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>; it is distinct from
the <code>schemaLocation</code> attribute defined for some
elements in schema documents (which is not always a hint
but sometimes a firm directive).</div></div></div></div><div class="div2">
<h3><span class="nav"><a href="#Instance_Document_Constructions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="web-representation" id="web-representation" shape="rect"></a>2.8 Representation of Schemas on the World Wide Web</h3><p>On the World Wide Web, schemas are conventionally represented
as XML documents (preferably of MIME type
<code>application/xml</code> or <code>text/xml</code>, but see
clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>),
conforming to the specifications in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>. For
more information on the representation and use of schema
documents on the World Wide Web
see <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web (&#167;4.3.1)</a> and
<a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>. </p></div></div><div class="div1">
<h2><a name="components" id="components" shape="rect"></a>3 Schema Component Details</h2><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#cAttribute_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="scIntro" id="scIntro" shape="rect"></a>3.1 Introduction</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.1 <a href="#sec-components-and-properties" shape="rect">Components and Properties</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.2 <a href="#xroc" shape="rect">XML Representations of Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.3 <a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.4 <a href="#sec-wsnormalization" shape="rect">White Space Normalization during Validation</a><br clear="none" />
</div><div class="block">The following sections provide full details on the composition
of all schema components, together with their XML representations
and their contributions to <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Each section is devoted to a
single component, with separate subsections for
<ol class="enumar"><li><div class="p">properties: their values and significance</div></li><li><div class="p">XML representation and the mapping to properties</div></li><li><div class="p">constraints on representation</div></li><li><div class="p">validation rules</div></li><li><div class="p"><a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contributions</div></li><li><div class="p">constraints on the components themselves</div></li></ol> The sub-sections immediately below introduce conventions
and terminology used throughout the component sections.</div><div class="div3">
<h4><a name="sec-components-and-properties" id="sec-components-and-properties" shape="rect"></a>3.1.1 Components and Properties</h4><p>Components are defined in terms of their properties, and each
property in turn is defined by giving its range, that is the
values it <span class="rfc2119">may</span> have. This can be understood as defining a
schema as a labeled directed graph, where the root is a schema,
every other vertex is a schema component or a literal (string,
boolean, decimal) and every labeled edge is a property.
The graph is <em>not</em> acyclic: multiple copies of
components with the same name in the same <a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a> <span class="rfc2119">must not</span> exist, so in some cases re-entrant
chains of properties will exist. </p><div class="note"><div class="p"><b>Note:</b> A schema and its components as defined in this chapter are an
idealization of the information a schema-aware processor
requires: implementations are not constrained in how they
provide it. In particular, no implications about literal
embedding versus indirection follow from the use below of
language such as "properties . . . having . . .
components as values".</div></div><p>Component properties are simply named
values. Most properties have either other components or
literals (that is, strings or booleans or enumerated keywords)
for values, but in a few cases, where more complex values are
involved, <span class="termdef"><a name="t-propRec" id="t-propRec" title="" shape="rect">[Definition:]&#160;&#160;</a>a property
value may itself be a collection of named values, which we call
a <b>property record</b></span>.</p><p><span class="termdef"><a name="key-null" id="key-null" title="" shape="rect">[Definition:]&#160;&#160;</a>Throughout this
specification, the term <b>absent</b> is used as a
distinguished property value denoting absence</span>. Again this should not be
interpreted as
constraining implementations, as for instance between using a
<b><i>null</i></b> value for such properties or not representing
them at all.
<span class="termdef"><a name="key-nonnull" id="key-nonnull" title="" shape="rect">[Definition:]&#160;&#160;</a>
A property value
which is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is <b>present</b>.</span>
</p><p>Any property not defined as optional is always
present; optional properties which are not present are
taken to have <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> as their
value. Any property identified as a having a set, subset or
list value might have an empty value unless this is explicitly
ruled out: this is <em>not</em> the same as <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. Any property value identified
as a superset or subset of some set
might be equal to that set,
unless a proper superset or subset is explicitly called for. By
'string' in Part 1 of this specification is meant a sequence of
ISO 10646 characters identified as <a href="http://www.w3.org/TR/xml11/#charsets" shape="rect">legal XML
characters</a> in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor uses the
definition of legal character from <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> or
<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>.</div></div></div><div class="div3">
<h4><a name="xroc" id="xroc" shape="rect"></a>3.1.2 XML Representations of Components</h4><p>The principal purpose of <em>XML Schema Definition Language: Structures</em> is to define a set of schema
components that constrain the contents of instances and augment
the information sets thereof. Although no external
representation of schemas is required for this purpose, such
representations will obviously be widely used. To provide for
this in an appropriate and interoperable way, this specification
provides a normative XML representation for schemas which makes
provision for every kind of schema component. <span class="termdef"><a name="key-schemaDoc" id="key-schemaDoc" title="" shape="rect">[Definition:]&#160;&#160;</a>A document in this
form (i.e. a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item)
is a <b>schema document</b></span>. For the schema
document as a whole, and its constituents, the sections below
define correspondences between element information items (with
declarations in
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> and <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a>) and schema components. The key element information items in
the XML representation of a schema are in the XSD namespace, that
is their <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
name]</a> is
<code>http://www.w3.org/2001/XMLSchema</code>. Although a common way of creating
the XML Infosets which are or contain <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> will be
using an XML parser, this is not required: any mechanism which
constructs conformant infosets as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> is a possible starting
point.</p><div class="block">Two aspects of the XML representations of components presented
in the following sections are constant across them all:
<ol class="enumar"><li><div class="p">All of them allow attributes qualified with namespace names
other than the XSD namespace itself: these appear as
annotations in the corresponding schema component;</div></li><li><div class="p">All of them allow an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> as their
first child, for human-readable documentation and/or
machine-targeted information.</div></li></ol>
</div><p>A recurrent pattern in the XML
representation of schemas may also be mentioned here. In many
cases, the same element name (e.g. <code>element</code> or
<code>attribute</code> or <code>attributeGroup</code>), serves
both to define a particular schema component and to incorporate
it by reference. In the first case the <code>name</code>
attribute is required, in the second the <code>ref</code>
attribute is required. These
two usages are mutually exclusive, and sometimes also depend on
context.</p><p>The descriptions of the XML representation
of components, and the <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation
Constraints<span class="arrow">&#183;</span></a>, apply to schema documents <em>after</em>,
not before, the
<a href="#key-vc-preprocessing" class="termref" shape="rect"><span class="arrow">&#183;</span>conditional-inclusion pre-processing<span class="arrow">&#183;</span></a>
described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> and the
<a href="#key-chameleon-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>chameleon pre-processing<span class="arrow">&#183;</span></a>
described in <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
</p></div><div class="div3">
<h4><a name="mapping.xr.c" id="mapping.xr.c" shape="rect"></a>3.1.3 The Mapping between XML Representations and
Components</h4><p>For each kind of schema component there is a corresponding
normative XML representation. The sections below describe the
correspondences between the properties of each kind of schema
component on the one hand and the properties of information
items in that XML representation on the other, together with
constraints on that representation above and beyond those
expressed in the
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
Neither the correspondences
described nor the XML Representation Constraints apply to
elements in the Schema namespace which occur as descendants
of <a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> or <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>.
</p><p>The language used is as if the correspondences were mappings
from XML representation to schema component, but the mapping in
the other direction, and therefore the correspondence in the
abstract, can always be constructed therefrom.</p><p>In discussing the mapping from XML representations to schema
components below, the value of a component property is often
determined by the value of an attribute information item, one of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of an element information item. Since schema
documents are constrained by the
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>, there is always a simple type
definition associated with any such attribute information item.
<span class="termdef"><a name="key-vv" id="key-vv" title="" shape="rect">[Definition:]&#160;&#160;</a>With reference to any
string, interpreted as denoting
an instance of a given datatype, the term
<b>actual value</b> denotes the value to which the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical mapping</a> of that datatype maps the string.
</span>In the case of attributes in
schema documents, the string used as the
lexical representation is normally the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the
attribute. The associated datatype is, unless otherwise specified,
the one identified in the declaration of the attribute, in the
schema for schema documents; in some cases (e.g. the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-e" class="compref" shape="rect">enumeration</a>
facet, or fixed and default values
for elements and attributes) the associated datatype will
be a more specific one,
as specified in the appropriate
XML mapping rules. The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
will often be a string, but can also be an integer, a
boolean, a URI reference, etc. This term is also occasionally
used with respect to element or attribute information items in a
document being <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.</p><p>Many properties are identified below as having other schema
components or sets of components as values. For the purposes of
exposition, the definitions in this section assume that (unless
the property is explicitly identified as optional) all such
values are in fact present. When schema components are
constructed from XML representations involving reference by name
to other components, this assumption will in some
cases be violated if one or more references cannot be
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>. This specification addresses the matter of
missing components in a uniform manner, described in
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>: no mention of handling missing
components will be found in the individual component
descriptions below.</p><p>Forward reference to named definitions and declarations
<em>is</em> allowed, both within and between
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>. By the time the component corresponding to
an XML representation which contains a forward reference is
actually needed for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>,
it is possible that an appropriately-named component
will have become available to discharge the reference: see
<a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a> for details.</p></div><div class="div3">
<h4><a name="sec-wsnormalization" id="sec-wsnormalization" shape="rect"></a>3.1.4 White Space Normalization during Validation</h4><p>Throughout this specification, <span class="termdef"><a name="key-iv" id="key-iv" title="" shape="rect">[Definition:]&#160;&#160;</a>the
<b>initial value</b> of some
attribute information item is the value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> property of that item. Similarly, the <b>initial value</b> of an element information item is the string composed of, in order, the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> of each character information item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that
element information item</span>.</p><p>The above definition means that comments and processing instructions,
even in the midst of text, are ignored for all <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> purposes.</p><div class="p"><div class="termdef"><a name="key-nv" id="key-nv" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>normalized value</b> of an element or attribute
information item is an <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> which has been normalized
according to the value of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and the values of any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with the simple type definition used
in its <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>. The keywords for
whitespace normalization have the following meanings:
<div class="glist"><div class="gitem"><div class="giLabel">preserve</div><div class="giDef"><div class="p">No normalization is done, the
whitespace-normalized value
is the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a></div></div></div><div class="gitem"><div class="giLabel">replace</div><div class="giDef"><div class="p">All occurrences of <code>#x9</code> (tab),
<code>#xA</code> (line feed) and <code>#xD</code> (carriage
return) are replaced with <code>#x20</code>
(space).</div></div></div><div class="gitem"><div class="giLabel">collapse</div><div class="giDef"><div class="p">Subsequent to the replacements specified above under
<b>replace</b>, contiguous sequences of
<code>#x20</code>s are collapsed to a single
<code>#x20</code>, and initial and/or final
<code>#x20</code>s are deleted.</div></div></div></div>
Similarly, the
<b>normalized value</b> of any string with respect to a
given simple type definition is the string resulting from
normalization using the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>
and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with that simple type definition.
</div>
</div><p>When more than one <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facet</a> applies, the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a> is applied first; the order in which <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets
are applied is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>If the simple type definition used in an item's
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>,
then the
<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be determined
as in the <b>preserve</b> case above.</p><p>There are three alternative validation rules which help supply the necessary background for the
above: <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> (clause <a href="#c-sva" shape="rect">3</a>), <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a> (clause <a href="#c-sv1" shape="rect">3.1.3</a>) or <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> (clause <a href="#c-sv2" shape="rect">1.2</a>).</p><p>These three levels of normalization correspond to the processing mandated
in XML for element content, CDATA attribute
content and tokenized
attributed content, respectively. See
<a href="http://www.w3.org/TR/xml11/#AVNormalize" shape="rect">Attribute Value Normalization</a>
in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> for the precedent for <b>replace</b> and
<b>collapse</b> for attributes. Extending this processing to element
content is necessary to ensure
consistent <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>
semantics for simple types, regardless of whether they are applied to attributes
or elements. Performing it twice in the case of attributes whose
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> has already been subject to replacement or collapse on the basis of
information in a DTD is necessary to ensure consistent treatment of attributes
regardless of the extent to which DTD-based information has been made use of
during infoset construction.</p><div class="note"><div class="p"><b>Note:</b> Even when DTD-based information <em>has</em> been appealed
to, and <a href="http://www.w3.org/TR/xml11/#AVNormalize" shape="rect">Attribute Value
Normalization</a> has taken place, it
is possible that
<em>further</em> normalization will
take place, as for instance when character entity references
in attribute values result in white space characters other than spaces
in their <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>s.</div></div><div class="note"><div class="p"><b>Note:</b> The values <b>replace</b> and
<b>collapse</b> may appear to provide a
convenient way to "unwrap" text (i.e. undo the effects of
pretty-printing and word-wrapping). In some cases, especially
highly constrained data consisting of lists of artificial tokens
such as part numbers or other identifiers, this appearance is
correct. For natural-language data, however, the whitespace
processing prescribed for these values is not only unreliable but
will systematically remove the information needed to perform
unwrapping correctly. For Asian scripts, for example, a correct
unwrapping process will replace line boundaries not with blanks but
with zero-width separators or nothing. In consequence, it is
normally unwise to use these values for natural-language data, or
for any data other than lists of highly constrained tokens.</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#scIntro" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cElement_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttribute_Declarations" id="cAttribute_Declarations" shape="rect"></a>3.2 Attribute Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1 <a href="#Attribute_Declaration_details" shape="rect">The Attribute Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2 <a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.1 <a href="#dcl.att.global" shape="rect">Mapping Rules for Global Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.2 <a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.3 <a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.3 <a href="#sec-src-attdecl" shape="rect">Constraints on XML Representations of Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4 <a href="#sec-cvc-attdecl" shape="rect">Attribute Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.1 <a href="#sec-cvc-attribute" shape="rect">Attribute Locally Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.2 <a href="#sec-gov-attribute" shape="rect">Governing Attribute Declaration and Governing Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.3 <a href="#sec-cvs-assess-attr" shape="rect">Schema-Validity Assessment (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5 <a href="#psvi_ad" shape="rect">Attribute Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.1 <a href="#sec-sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.2 <a href="#sec-sic-attr-error-code" shape="rect">Validation Failure (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.3 <a href="#sec-sic-attr-decl" shape="rect">Attribute Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.4 <a href="#sec-sic-attrType" shape="rect">Attribute Validated by Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6 <a href="#coss-attribute" shape="rect">Constraints on Attribute Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.1 <a href="#sec-a-props-correct" shape="rect">Attribute Declaration Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.2 <a href="#sec-cos-valid-simple-default" shape="rect">Simple Default Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.3 <a href="#sec-no-xmlns" shape="rect">xmlns Not Allowed</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.4 <a href="#sec-no-xsi" shape="rect">xsi: Not Allowed</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7 <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.1 <a href="#sec-sc-xsi.type" shape="rect">xsi:type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.2 <a href="#sec-sc-xsi.nil" shape="rect">xsi:nil</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.3 <a href="#sec-sc-xsi.schemaLocation" shape="rect">xsi:schemaLocation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.4 <a href="#sec-sc-xsi.noNamespaceSchemaLocation" shape="rect">xsi:noNamespaceSchemaLocation</a><br clear="none" />
</div><p>Attribute declarations provide for:</p><ul><li><div class="p">Local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of attribute information item values using a simple type definition;</div></li><li><div class="p">Specifying default or fixed values for attribute information items.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:attribute name="age" type="xs:positiveInteger" use="required"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of an attribute declaration.</div></div></div><div class="div3">
<h4><a name="Attribute_Declaration_details" id="Attribute_Declaration_details" shape="rect"></a>3.2.1 The Attribute Declaration Schema Component</h4><p>The attribute declaration schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ad" id="ad" shape="rect">Attribute Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ad-annotations" shape="rect" id="ad-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="ad-name" shape="rect" id="ad-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="ad-target_namespace" shape="rect" id="ad-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="ad-type_definition" shape="rect" id="ad-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component. Required.</div>
</div>
<div class="propDefn"><a name="ad-scope" shape="rect" id="ad-scope"></a><div class="pdName"><span class="propdef">{scope}</span></div>
<div class="pdDef">
A <a href="#sc_a" class="compref" shape="rect">Scope</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="ad-value_constraint" shape="rect" id="ad-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A <a href="#vc_a" class="compref" shape="rect">Value Constraint</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="ad-inheritable" shape="rect" id="ad-inheritable"></a><div class="pdName"><span class="propdef">{inheritable}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="sc_a" id="sc_a" shape="rect">Scope</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="sc_a-variety" shape="rect" id="sc_a-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">global</span>, <span class="enumval">local</span>}. Required.</div>
</div>
<div class="propDefn"><a name="sc_a-parent" shape="rect" id="sc_a-parent"></a><div class="pdName"><span class="propdef">{parent}</span></div>
<div class="pdDef">
Either a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or a <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>. Required if <a href="#sc_a-variety" class="propref" shape="rect">{variety}</a> is <b><i>local</i></b>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_a" id="vc_a" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_a-variety" shape="rect" id="vc_a-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}. Required.</div>
</div>
<div class="propDefn"><a name="vc_a-value" shape="rect" id="vc_a-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>. Required.
</div>
</div>
<div class="propDefn"><a name="vc_a-lexical_form" shape="rect" id="vc_a-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">
A character string. Required.
</div>
</div>
</div></div>
</div>
</div>
<p>The <a href="#ad-name" class="propref" shape="rect">{name}</a> property <span class="rfc2119">must</span> match the
local part of the names of attributes being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>.</p><p>The value of each attribute validated <span class="rfc2119">must</span> conform to the supplied
<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>.</p><p>A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
value of the <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> property provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of namespace-qualified
attribute information items (which <span class="rfc2119">must</span> be explicitly prefixed
in the character-level form of XML documents). <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> values of
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> unqualified (unprefixed)
items.</p><p>
For an attribute declaration <var>A</var>, if <var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-variety" class="propref" shape="rect">{variety}</a>
= <b><i>global</i></b>, then <var>A</var> is available for use throughout the schema.
If <var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-variety" class="propref" shape="rect">{variety}</a>
= <b><i>local</i></b>, then <var>A</var> is available for use only within (the
<a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>)
<var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-parent" class="propref" shape="rect">{parent}</a>.
</p><p>The
<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> property reproduces the functions of
XML default and
<code>#FIXED</code> attribute values. A <a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> of
<b><i>default</i></b> specifies that the attribute is to
appear unconditionally in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, with <a href="#vc_a-value" class="propref" shape="rect">{value}</a> and <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> used whenever the attribute is not
actually present; <b><i>fixed</i></b> indicates that the attribute
value if present <span class="rfc2119">must</span> be equal or identical
to <a href="#vc_a-value" class="propref" shape="rect">{value}</a>, and if absent receives <a href="#vc_a-value" class="propref" shape="rect">{value}</a> and <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> as for <b><i>default</i></b>. Note that
it is <em>values</em> that are checked, not
strings,
and that the test is for either equality or identity.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#ad-annotations" class="propref" shape="rect">{annotations}</a> property.</p><div class="note"><div class="p"><b>Note:</b> A more complete and formal presentation of the semantics of <a href="#ad-name" class="propref" shape="rect">{name}</a>, <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> and <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> is provided in
conjunction with other aspects of complex type <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> (see <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>.)</div></div><p><a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> distinguishes attributes with names such as <code>xmlns</code> or <code>xmlns:xsl</code> from
ordinary attributes, identifying them as <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a>. Accordingly, it is unnecessary and in fact not possible for
schemas to contain attribute declarations corresponding to such
namespace declarations, see <a href="#no-xmlns" shape="rect"><code>xmlns</code> Not Allowed (&#167;3.2.6.3)</a>. No means is provided in
this specification to supply a
default value for a namespace declaration.</p></div><div class="div3">
<h4><a name="declare-attribute" id="declare-attribute" shape="rect"></a>3.2.2 XML Representation of Attribute Declaration Schema Components</h4><p>The XML representation for an attribute declaration schema
component is an
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item. It specifies a
simple type definition for an attribute either by reference or
explicitly, and <span class="rfc2119">may</span> provide default information. The
correspondences between the properties of the information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component are given in this section.</p><p>Attribute declarations can appear at the top level of a schema
document, or within complex type definitions, either as complete
(local) declarations, or by reference to top-level declarations,
or within attribute group definitions. For complete
declarations, top-level or local, the <code>type</code>
attribute is used when the declaration can use a built-in or
pre-declared simple type definition. Otherwise an anonymous
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> is provided inline. When no simple type definition is
referenced or provided, the default is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which
imposes no constraints at all.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attribute</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-attribute" name="element-attribute" shape="rect">&lt;attribute</a><br clear="none" />&#160;&#160;default = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;fixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;form = (<var>qualified</var> | <var>unqualified</var>)<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;use = (<var>optional</var> | <var>prohibited</var> | <var>required</var>)&#160;:&#160;optional<br clear="none" />&#160;&#160;inheritable = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?)<br clear="none" />&lt;/attribute&gt;</p></div></div><p>An
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
maps to an attribute declaration, and
allows the type definition of that declaration to be specified either by
reference or by explicit inclusion.
</p><p>Top-level
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements
(i.e. those which appear
within the schema document as
children of
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
elements) produce
<b><i>global</i></b> attribute declarations;
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>s
within
<a href="#element-attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> produce
either attribute uses which contain <b><i>global</i></b> attribute
declarations (if there's a <code>ref</code> attribute) or local
declarations (otherwise). For complete declarations, top-level or local,
the <code>type</code> attribute is used when the declaration can use a
built-in or user-defined global type definition. Otherwise an anonymous
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> is provided inline.
</p><div class="note"><div class="p"><b>Note:</b>
Children of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are not strictly speaking top-level
declarations, but they will become top-level declarations if they
override corresponding declarations in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of their parent. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
</div></div><p>Attribute information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a top-level
declaration <span class="rfc2119">must</span> be qualified with the
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> of that
declaration. If the
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, the item <span class="rfc2119">must</span> be
unqualified. Control over whether attribute
information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a local declaration <span class="rfc2119">must</span> be
similarly qualified or not is provided by the <code>form</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, whose default is provided by the
<code>attributeFormDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> on the enclosing
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, via its determination of
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</p><p>The names for top-level attribute declarations are in their
own <a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a>. The
names of locally-scoped attribute declarations reside in symbol
spaces local to the type definition which contains them.</p><div class="block">The following sections specify several
sets of XML mapping rules which apply in different
circumstances.
<ul><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item
has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, then it maps to
a
global
<a href="#ad" class="compref" shape="rect">Attribute Declaration</a> as described in
<a href="#dcl.att.global" shape="rect">Mapping Rules for Global Attribute Declarations (&#167;3.2.2.1)</a>.
</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
as an ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
absent, and the <code>use</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not
<code>"prohibited"</code>, then it maps both to
an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> and to an <a href="#au" class="compref" shape="rect">Attribute Use</a>
component, as described in
<a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations (&#167;3.2.2.2)</a>.
</div><div class="p">On <a href="#au" class="compref" shape="rect">Attribute Use</a> components, see
<a href="#cAttributeUse" shape="rect">Attribute Uses (&#167;3.5)</a>.
</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
as an ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
<a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a>, and the <code>use</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not
<code>"prohibited"</code>, then it maps to
an <a href="#au" class="compref" shape="rect">Attribute Use</a>
component, as described in
<a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations (&#167;3.2.2.3)</a>.
</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item
has <code>use='prohibited'</code>, then it does not map to,
or correspond to, any schema component at all.
</div><div class="note"><div class="p"><b>Note:</b> The <code>use</code> attribute is not allowed on
top-level <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements, so
this can only happen with <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements
appearing within a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element.
</div></div></li></ul>
</div><div class="div4">
<h5><a name="dcl.att.global" id="dcl.att.global" shape="rect"></a>3.2.2.1 Mapping Rules for Global Attribute Declarations</h5><p id="xr.att3">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, the corresponding schema
component is as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Declaration_details" shape="rect">Attribute Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the parent
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is none.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">The simple type
definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
element information
item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, otherwise the simple
type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
<a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
then a <a href="#vc_a" class="compref" shape="rect">Value Constraint</a> as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b> or
<b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (with respect
to the
<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (with respect to the
<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>) of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.att.local" id="dcl.att.local" shape="rect"></a>3.2.2.2 Mapping Rules for Local Attribute Declarations</h5><p id="xr.att5">If
the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> as
an ancestor and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent,
it maps both to an attribute
declaration (see <a href="#xr.att.local" shape="rect">below</a>) and
to an attribute use with properties as follows
(unless <code>use='prohibited'</code>, in which case the item
corresponds to nothing at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#AU_details" shape="rect">Attribute Use</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-required" class="propref" shape="rect">{required}</a></div><div class="mapRepr"><b><i>true</i></b> if
the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element has <code>use</code> =
<code>required</code>, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a></div><div class="mapRepr">See the Attribute Declaration mapping
immediately below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
then a <a href="#vc_au" class="compref" shape="rect">Value Constraint</a>
as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b>
or <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)
</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The same annotations as the <a href="#ad-annotations" class="propref" shape="rect">{annotations}</a> of
the Attribute Declaration. See below.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p><a name="xr.att.local" id="xr.att.local" shape="rect"></a>
The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element also
maps to the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>
of the attribute use, as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Declaration_details" shape="rect">Attribute Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
<code>targetNamespace</code> is present
, <b>then </b>
its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<code>targetNamespace</code> is not present and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p"> <code>form</code>
= <code>qualified</code>
</span></div>
<div class="clnumber">2.2 <span class="p"> <code>form</code> is absent and the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has
<code>attributeFormDefault</code> =
<code>qualified</code>
</span></div>
</div>
<b>then </b>
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information
item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there
is none.
</div><div class="clnumber">3 <b>otherwise </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">The simple type
definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
element information
item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, otherwise the simple
type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
<a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>local</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor, the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> corresponding to that item, otherwise (the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>
element information item is within an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element information
item), the <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> corresponding to
that item.</div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="ref.att.local" id="ref.att.local" shape="rect"></a>3.2.2.3 Mapping Rules for References to Top-level Attribute Declarations</h5><p id="xr.att8">
If
the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> as an
ancestor and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present, it
maps to an attribute use with properties as follows
(unless <code>use='prohibited'</code>, in which case the item
corresponds to nothing at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#AU_details" shape="rect">Attribute Use</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-required" class="propref" shape="rect">{required}</a></div><div class="mapRepr"><b><i>true</i></b> if <code>use</code> =
<code>required</code>, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a></div><div class="mapRepr">The (top-level)
attribute declaration <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
then a <a href="#vc_au" class="compref" shape="rect">Value Constraint</a>
as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b>
or <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of
the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div></div><div class="div3">
<h4><a name="sec-src-attdecl" id="sec-src-attdecl" shape="rect"></a>3.2.3 Constraints on XML Representations of Attribute Declarations</h4><div class="constraintnote"><a id="src-attribute" name="src-attribute" shape="rect"></a><b>Schema Representation Constraint: Attribute Declaration Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
information items by the schema for schema documents,
<b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <span class="p"><code>default</code> and <code>fixed</code> <span class="rfc2119">must not</span> both be present.</span></div>
<div class="clnumber">2 <span class="p">If <code>default</code> and <code>use</code> are both present,
<code>use</code> <span class="rfc2119">must</span> have the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>optional</code>.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->If the item's parent is not <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">One of <code>ref</code> or <code>name</code> is present, but not both.</span></div>
<div class="clnumber">3.2 <span class="p">If <code>ref</code> is present, then all of <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>,
<code>form</code> and <code>type</code> are absent.</span></div>
</div>
</div>
<div class="clnumber">4 <span class="p">The
<code>type</code> attribute and a
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> child element
<span class="rfc2119">must not</span> both be present.</span></div>
<div class="clnumber">5 <span class="p">
If <code>fixed</code> and <code>use</code> are both present,
<code>use</code> <span class="rfc2119">must not</span> have the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>prohibited</code>.
</span></div>
<div class="clnumber">6<a id="att-with-ns" name="att-with-ns" shape="rect"> </a><!--* no span class='p' possible here *-->
If the
<code>targetNamespace</code> attribute
is present then
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">6.1 <span class="p">The
<code>name</code> attribute
is present.
</span></div>
<div class="clnumber">6.2 <span class="p">The
<code>form</code> attribute
is absent.
</span></div>
<div class="clnumber">6.3 <!--* no span class='p' possible here *-->
If the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> does not have a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
is different from the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>targetNamespace</code> of
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.3.1 <span class="p">
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor
</span></div>
<div class="clnumber">6.3.2<a id="att-with-ns-must-be-old" name="att-with-ns-must-be-old" shape="rect"> </a><span class="p">
There is a <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> ancestor
between the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and the nearest
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> ancestor, and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> does not
<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
name of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
</span></div>
</div>
</div>
</div>
</div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-attdecl" id="sec-cvc-attdecl" shape="rect"></a>3.2.4 Attribute Declaration Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-attribute" id="sec-cvc-attribute" shape="rect"></a>3.2.4.1 Attribute Locally Valid</h5><p>Informally, an attribute in an XML
instance is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
against an attribute declaration if and only if (a)
the name of the attribute matches
the name of the declaration, (b) after
whitespace normalization its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is locally valid
against the type declared for the attribute, and
(c) the
attribute obeys any relevant value constraint. Additionally,
for <code>xsi:type</code>, it is required that the type named
by the attribute be present in the schema.
A logical prerequisite for checking the local validity of an
attribute against an attribute declaration is that the attribute
declaration itself and the type definition it identifies
both be present in the schema.
</p><p>Local validity of attributes is
tested as part of schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of attributes
(and of the elements on which they occur), and the result
of the test is exposed in the
<a href="#a-validity" class="propref" shape="rect">[validity]</a> property of the
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.</p><p>A more formal statement
is given in the following constraint.</p><div class="constraintnote"><a id="cvc-attribute" name="cvc-attribute" shape="rect"></a><b>Validation Rule: Attribute Locally Valid</b><br clear="none" /><div class="constraint"><div class="p">For an attribute information item <var>A</var>
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to an attribute declaration <var>D</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-a1" name="c-a1" shape="rect"> </a><span class="p"><var>D</var> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
(see <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a> for
how this can fail to be the case)
and <var>D</var> and <var>A</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
<div class="clnumber">2<a id="c-a2" name="c-a2" shape="rect"> </a><span class="p"><var>D</var>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="c-sva" name="c-sva" shape="rect"> </a><span class="p"><var>A</var>'s <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to <var>D</var>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>
as per <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</span></div>
<div class="clnumber">4 <span class="p">If
<var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> is present and
<var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> = <b><i>fixed</i></b>, then <var>A</var>'s <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
is equal or
identical to
<var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
<div class="clnumber">5 <span class="p">
If <var>D</var> is the built-in declaration for <code>xsi:type</code>
(<a href="#xsi.type" shape="rect">Attribute Declaration for the 'type' attribute (&#167;3.2.7.1)</a>), then <var>A</var>'s <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to a type definition.
</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-gov-attribute" id="sec-gov-attribute" shape="rect"></a>3.2.4.2 Governing Attribute Declaration and Governing Type Definition</h5><div class="p">
<div class="termdef"><a name="key-governing-ad" id="key-governing-ad" title="" shape="rect">[Definition:]&#160;&#160;</a>
In a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode,
the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration of an attribute
(its <b>governing attribute declaration</b>)
is the first of
the following which applies:
<div class="constraintlist"><div class="clnumber">1<a id="c-ad" name="c-ad" shape="rect"> </a><span class="p">A declaration which was stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3<a id="c-adbyr" name="c-adbyr" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local
name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace
name]</a>,
provided the attribute
is not
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>
and the processor has not
stipulated a type definition at the start of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
</span></div>
</div>
If none of these applies, the attribute
has no <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
</div>
</div><div class="note"><div class="p"><b>Note:</b> <a name="anchor11764e" id="anchor11764e" shape="rect"></a>
As a consequence, unless <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> or stipulated otherwise, attributes
named <code>xsi:type</code>, <code>xsi:nil</code>,
<code>xsi:schemaLocation</code>, or
<code>xsi:noNamespaceSchemaLocation</code> are always governed by
their corresponding built-in declarations (see
<a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>).
</div></div><div class="p">
<div class="termdef"><a name="key-governing-type-att" id="key-governing-type-att" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>governing type definition</b> of an
attribute, in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is
the first of the following which applies:
<div class="constraintlist"><div class="clnumber">1 <span class="p">A type definition stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">The <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of the
<a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>.</span></div>
</div>
If neither of these applies, there is no
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
</div></div></div><div class="div4">
<h5><a name="sec-cvs-assess-attr" id="sec-cvs-assess-attr" shape="rect"></a>3.2.4.3 Schema-Validity Assessment (Attribute)</h5><p>
Schema-validity assessment of an attribute information item
involves identifying its <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and checking its
local validity against the declaration. If the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
is not present in the schema, then assessment is necessarily
incomplete.
</p><div class="constraintnote"><a id="cvc-assess-attr" name="cvc-assess-attr" shape="rect"></a><b>Validation Rule: Schema-Validity Assessment (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">The schema-validity assessment of an attribute information item depends
on its local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> alone.</div><div class="p">For an attribute information item's schema-validity to have been assessed
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-caa-ad" name="c-caa-ad" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
attribute declaration
is known for it, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration.
</span></div>
<div class="clnumber">2 <span class="p">Its local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with respect to that
declaration
has
been evaluated as per <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>.</span></div>
<div class="clnumber">3 <span class="p">Both clause <a href="#c-a1" shape="rect">1</a> and clause <a href="#c-a2" shape="rect">2</a> of <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> are satisfied.</span></div>
</div>
</div></div></div><p><span class="termdef"><a name="key-svaa" id="key-svaa" title="" shape="rect">[Definition:]&#160;&#160;</a>For
attribute information items,
there is no difference between assessment and strict
assessment, so
the attribute information item has
been <b>strictly assessed</b></span>
if and only if its schema-validity has been assessed.</p></div></div><div class="div3">
<h4><a name="psvi_ad" id="psvi_ad" shape="rect"></a>3.2.5 Attribute Declaration Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-a-outcome" id="sec-sic-a-outcome" shape="rect"></a>3.2.5.1 Assessment Outcome (Attribute)</h5><div class="constraintnote"><a id="sic-a-outcome" name="sic-a-outcome" shape="rect"></a><b>Schema Information Set Contribution: Assessment Outcome (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">If the schema-validity of an attribute information item has been assessed
as per <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> it
has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-validation_context" name="a-validation_context" shape="rect"><span class="propdef">[validation context]</span></a></dt><dd>The nearest ancestor element
information item with a <a href="#e-schema_information" class="propref" shape="rect">[schema information]</a>
property.</dd><dt><a id="a-validity" name="a-validity" shape="rect"><span class="propdef">[validity]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-svaa" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>it was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
as defined by <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>, <b>then </b><b><i>valid</i></b>;</div><div class="clnumber">1.2 <b>otherwise </b><b><i>invalid</i></b>.</div></div>
</div><div class="clnumber">2 <b>otherwise </b><b><i>notKnown</i></b>.</div></div>
</dd><dt><a id="a-validation_attempted" name="a-validation_attempted" shape="rect"><span class="propdef">[validation attempted]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-svaa" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b><b><i>full</i></b>;</div><div class="clnumber">2 <b>otherwise </b><b><i>none</i></b>.</div></div></dd><dt><a id="a-schema_specified" name="a-schema_specified" shape="rect"><span class="propdef">[schema specified]</span></a></dt><dd><b><i>infoset</i></b>. See <a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a> for the other possible value.</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attr-error-code" id="sec-sic-attr-error-code" shape="rect"></a>3.2.5.2 Validation Failure (Attribute)</h5><div class="constraintnote"><a id="sic-attr-error-code" name="sic-attr-error-code" shape="rect"></a><b>Schema Information Set Contribution: Validation Failure (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>, as defined
by <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>
above, of an attribute information item has been assessed,
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item
has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-schema_error_code" name="a-schema_error_code" shape="rect"><span class="propdef">[schema error code]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, <b>then </b>a list. Applications wishing to provide
information as to the reason(s) for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure are encouraged to record one or more
error codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) herein.</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attr-decl" id="sec-sic-attr-decl" shape="rect"></a>3.2.5.3 Attribute Declaration</h5><div class="constraintnote"><a id="sic-attr-decl" name="sic-attr-decl" shape="rect"></a><b>Schema Information Set Contribution: Attribute Declaration</b><br clear="none" /><div class="constraint"><div class="p">If and only if a <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration is known for an attribute information
item
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the attribute information item
has a
property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-declaration" name="a-declaration" shape="rect"><span class="propdef">[attribute declaration]</span></a></dt><dd>
An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration component itself.
</dd><dt><a id="a-schema_default" name="a-schema_default" shape="rect"><span class="propdef">[schema default]</span></a></dt><dd>
If the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#au" class="compref" shape="rect">Attribute Use</a> then the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>
of the <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>,
otherwise the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> of the
declaration's <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.
</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attrType" id="sec-sic-attrType" shape="rect"></a>3.2.5.4 Attribute Validated by Type</h5><div class="constraintnote"><a id="sic-attrType" name="sic-attrType" shape="rect"></a><b>Schema Information Set Contribution: Attribute Validated by Type</b><br clear="none" /><div class="constraint"><div class="p">If and
only if a
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is known for
an attribute information
item,
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the
attribute information item
has the
properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-schema_normalized_value" name="a-schema_normalized_value" shape="rect"><span class="propdef">[schema normalized value]</span></a></dt><dd>
If the
attribute's <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>,
then the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>, otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="a-schema_actual_value" name="a-schema_actual_value" shape="rect"><span class="propdef">[schema actual value]</span></a></dt><dd>
If the
<a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then the corresponding
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>; otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="a-type_definition" name="a-type_definition" shape="rect"><span class="propdef">[type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
component.</dd><dt><a id="a-type_definition_type" name="a-type_definition_type" shape="rect"><span class="propdef">[type definition type]</span></a></dt><dd> <b><i>simple</i></b>.</dd><dt><a id="a-type_definition_namespace" name="a-type_definition_namespace" shape="rect"><span class="propdef">[type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type
definition<span class="arrow">&#183;</span></a>.</dd><dt><a id="a-type_definition_anonymous" name="a-type_definition_anonymous" shape="rect"><span class="propdef">[type definition anonymous]</span></a></dt><dd><b><i>true</i></b>
if the
<a href="#std-name" class="propref" shape="rect">{name}</a>
of the <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type
definition<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <b><i>false</i></b>.</dd><dt><a id="a-type_definition_name" name="a-type_definition_name" shape="rect"><span class="propdef">[type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a>
of the
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a>, if the
<a href="#std-name" class="propref" shape="rect">{name}</a>
is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. If the
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a>'s
<a href="#std-name" class="propref" shape="rect">{name}</a> property is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
schema processors <span class="rfc2119">may</span>, but need
not, provide a value
which uniquely identifies this
type definition among those with the same target namespace.
It is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name
for such a type definition. If a processor does provide a value in this
situation, the choice of what value to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The
<span class="anonRef">[type definition type]</span>,
<span class="anonRef">[type definition namespace]</span>,
<span class="anonRef">[type definition name]</span>, and
<span class="anonRef">[type definition anonymous]</span> properties
are redundant with the
<span class="anonRef">[type definition]</span> property;
they are defined for the convenience of implementations
which wish to expose those specific properties
but not the entire type definition.
</div></div><div class="p"><a name="anchor10662c" id="anchor10662c" shape="rect"></a>If
the attribute's
<a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a> and
the
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
has <a href="#std-variety" class="propref" shape="rect">{variety}</a>
<b><i>union</i></b>, then there are four additional properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-member_type_definition" name="a-member_type_definition" shape="rect"><span class="propdef">[member type definition]</span></a></dt><dd>
an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
</dd><dt><a id="a-member_type_definition_namespace" name="a-member_type_definition_namespace" shape="rect"><span class="propdef">[member type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>.</dd><dt><a id="a-member_type_definition_anonymous" name="a-member_type_definition_anonymous" shape="rect"><span class="propdef">[member type definition anonymous]</span></a></dt><dd><b><i>true</i></b> if the <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <b><i>false</i></b>.</dd><dt><a id="a-member_type_definition_name" name="a-member_type_definition_name" shape="rect"><span class="propdef">[member type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>, if it is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. If it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, schema processors <span class="rfc2119">may</span>, but need
not, provide a value unique to the definition.
It is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name
for such a type definition. If a processor does provide a value in this
situation, the choice of what value to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd></dl>
</div>
</div>
<div class="p">The first (<a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a>)
alternative
above is provided for applications such as query
processors which need access to the full range of details about an
item's <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, for example the
type hierarchy; the second, for lighter-weight processors for whom
representing the significant parts of the type hierarchy as
information items might be a significant burden.</div><div class="p">
If
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
the attribute's <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>;
</span></div>
<div class="clnumber">2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>list</i></b>;
</span></div>
<div class="clnumber">2.2 <span class="p">
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>union</i></b> and the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> has
<a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>;
</span></div>
</div></div>
<div class="clnumber">3 <span class="p">
the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the list type
(from the previous clause) has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>union</i></b>;
</span></div>
</div>
then there is an additional property:
</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-member_type_definitions" name="a-member_type_definitions" shape="rect"><span class="propdef">[member type definitions]</span></a></dt><dd>
a sequence of <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components, with the same length as the
<a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>, each one an
<a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the corresponding
item in the <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
</dd></dl>
</div>
</div>
</div></div><p>See also
<a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>,
<a href="#sic-match-info" shape="rect">Match Information (&#167;3.4.5.2)</a> and <a href="#sic-schema" shape="rect">Schema Information (&#167;3.17.5.1)</a>,
which describe
other information set contributions related to attribute information items.
</p></div></div><div class="div3">
<h4><a name="coss-attribute" id="coss-attribute" shape="rect"></a>3.2.6 Constraints on Attribute Declaration Schema Components</h4><p>All attribute declarations (see <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-a-props-correct" id="sec-a-props-correct" shape="rect"></a>3.2.6.1 Attribute Declaration Properties Correct</h5><div class="constraintnote"><a id="a-props-correct" name="a-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Declaration Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">
<b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute declaration are as described in
the property tableau in <a href="#Attribute_Declaration_details" shape="rect">The Attribute Declaration Schema Component (&#167;3.2.1)</a>, modulo the impact
of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">if there is a <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>, then
it is a valid default with respect
to the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> as
defined in <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.
</span></div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> The use of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> and related
types together with value constraints goes beyond what is possible with
XML DTDs, and <span class="rfc2119">should</span> be avoided if compatibility with DTDs is desired.</div></div></div><div class="div4">
<h5><a name="sec-cos-valid-simple-default" id="sec-cos-valid-simple-default" shape="rect"></a>3.2.6.2 Simple Default Valid</h5><div class="constraintnote"><a id="cos-valid-simple-default" name="cos-valid-simple-default" shape="rect"></a><b>Schema Component Constraint: Simple Default Valid</b><br clear="none" /><div class="constraint"><div class="p">For a
Value Constraint <var>V</var>
to be
a valid default with respect to a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
<var>T</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>V</var>.<a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to <var>T</var>
as defined by
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
Valid</a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">2 <span class="p"><var>V</var>.<a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>
maps to <var>V</var>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>
in the
value space of <var>T</var>.</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-no-xmlns" id="sec-no-xmlns" shape="rect"></a>3.2.6.3 <code>xmlns</code> Not Allowed</h5><div class="constraintnote"><a id="no-xmlns" name="no-xmlns" shape="rect"></a><b>Schema Component Constraint: <code>xmlns</code> Not Allowed</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#ad-name" class="propref" shape="rect">{name}</a> of an attribute declaration <span class="rfc2119">must not</span> match <code>xmlns</code>.</div><div class="note"><div class="p"><b>Note:</b> The <a href="#ad-name" class="propref" shape="rect">{name}</a> of an attribute is an <a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a>, which implicitly
prohibits attribute declarations of the form <code>xmlns:*</code>.</div></div></div></div></div><div class="div4">
<h5><a name="sec-no-xsi" id="sec-no-xsi" shape="rect"></a>3.2.6.4 <code>xsi:</code> Not Allowed</h5><div class="constraintnote"><a id="no-xsi" name="no-xsi" shape="rect"></a><b>Schema Component Constraint: <code>xsi:</code> Not Allowed</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> of an attribute declaration,
whether local or top-level, <span class="rfc2119">must not</span> match <code>http://www.w3.org/2001/XMLSchema-instance</code>
(unless it is one of the four built-in declarations given in the next section).</div><div class="note"><div class="p"><b>Note:</b> This reinforces the special status of these attributes, so that they not
only <em>need</em> not be declared to be allowed in instances, but
in consequence of the rule just given
<span class="rfc2119">must not</span> be declared.
</div></div><div class="note"><div class="p"><b>Note:</b> It is legal for <a href="#au" class="compref" shape="rect">Attribute Use</a>s that
refer to <code>xsi:</code> attributes to specify default or fixed value
constraints (e.g. in a component corresponding to a schema document construct
of the form <code>&lt;xs:attribute ref="xsi:type" default="xs:integer"/&gt;</code>),
but the practice is not recommended; including such attribute uses will tend
to mislead readers of the schema document, because the attribute uses would
have no effect; see <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> and
<a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a> for details.</div></div></div></div></div></div><div class="div3">
<h4><a name="builtin-ads" id="builtin-ads" shape="rect"></a>3.2.7 Built-in Attribute Declarations</h4><p>There are four attribute declarations present in every
schema by definition:</p><div class="div4">
<h5><a name="sec-sc-xsi.type" id="sec-sc-xsi.type" shape="rect"></a>3.2.7.1 <code>xsi:type</code></h5><p>The <code>xsi:type</code> attribute
is used to signal use of a type other than the declared type of
an element. See <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>.
</p><div class="scInstance"><div class="scHead"><a id="xsi.type" name="xsi.type" shape="rect">Attribute Declaration for the 'type' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>type</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
the empty sequence
<span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.nil" id="sec-sc-xsi.nil" shape="rect"></a>3.2.7.2 <code>xsi:nil</code></h5><p>The <code>xsi:nil</code> attribute
is used to signal that an element's content is "nil"
(or "null"). See <a href="#xsi_nil" shape="rect">xsi:nil (&#167;2.7.2)</a>.
</p><div class="scInstance"><div class="scHead"><a id="xsi.nil" name="xsi.nil" shape="rect">Attribute Declaration for the 'nil' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>nil</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
the empty sequence
<span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.schemaLocation" id="sec-sc-xsi.schemaLocation" shape="rect"></a>3.2.7.3 <code>xsi:schemaLocation</code></h5><p>The <code>xsi:schemaLocation</code> attribute
is used to signal possible locations of relevant schema documents.
See <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation (&#167;2.7.3)</a>.
</p><div class="scInstance"><div class="scHead"><a id="xsi.schemaLocation" name="xsi.schemaLocation" shape="rect">Attribute Declaration for the 'schemaLocation' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>schemaLocation</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">An anonymous simple type definition, as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">The built in <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>list</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
the empty sequence
<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
the empty sequence
<span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.noNamespaceSchemaLocation" id="sec-sc-xsi.noNamespaceSchemaLocation" shape="rect"></a>3.2.7.4 <code>xsi:noNamespaceSchemaLocation</code></h5><p>The <code>xsi:noNamespaceSchemaLocation</code> attribute
is used to signal possible locations of relevant schema documents.
See <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation (&#167;2.7.3)</a>.
</p><div class="scInstance"><div class="scHead"><a id="xsi.noNamespaceSchemaLocation" name="xsi.noNamespaceSchemaLocation" shape="rect">Attribute Declaration for the 'noNamespaceSchemaLocation' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>noNamespaceSchemaLocation</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
the empty sequence
<span class="arrow">&#183;</span></a></div></div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttribute_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Complex_Type_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cElement_Declarations" id="cElement_Declarations" shape="rect"></a>3.3 Element Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1 <a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2 <a href="#declare-element" shape="rect">XML Representation of Element Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.1 <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.2 <a href="#dcl.elt.global" shape="rect">Mapping Rules for Top-Level Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.3 <a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.4 <a href="#ref.elt.global" shape="rect">References to Top-Level Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.5 <a href="#dcl.elt.exx" shape="rect">Examples of Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3 <a href="#sec-src-element" shape="rect">Constraints on XML Representations of Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4 <a href="#eldec_vr" shape="rect">Element Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.1 <a href="#sec-sistd" shape="rect">Selected and Instance-specified Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.2 <a href="#sec-type-override" shape="rect">Type Override and Valid Substitutability</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.3 <a href="#sec-cvc-elt" shape="rect">Element Locally Valid (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.4 <a href="#sec-cvc-type" shape="rect">Element Locally Valid (Type)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.5 <a href="#sec-cvc-id" shape="rect">Validation Root Valid (ID/IDREF)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.6 <a href="#sec-cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5 <a href="#edisc" shape="rect">Element Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.1 <a href="#sec-sic-e-outcome" shape="rect">Assessment Outcome (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.2 <a href="#sec-sic-elt-error-code" shape="rect">Validation Failure (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.3 <a href="#sec-sic-elt-decl" shape="rect">Element Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.4 <a href="#sec-sic-eltType" shape="rect">Element Validated by Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.5 <a href="#sec-sic-eltDefault" shape="rect">Element Default Value</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.6 <a href="#Inherited_attributes" shape="rect">Inherited Attributes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6 <a href="#coss-element" shape="rect">Constraints on Element Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.1 <a href="#sec-e-props-correct" shape="rect">Element Declaration Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.2 <a href="#sec-cos-valid-default" shape="rect">Element Default Valid (Immediate)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.3 <a href="#sec-cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.4 <a href="#sec-cos-equiv-class" shape="rect">Substitution Group</a><br clear="none" />
</div><p>Element declarations provide for:</p><ul><li><div class="p">Local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of element information item values using a type definition;</div></li><li><div class="p">Specifying default or fixed values for element information items;</div></li><li><div class="p">Establishing uniquenesses and reference constraint relationships among the values of related elements and
attributes;</div></li><li><div class="p">Controlling the substitutability of elements through the
mechanism of <a href="#key-equivalenceClass" class="termref" shape="rect"><span class="arrow">&#183;</span>element substitution groups<span class="arrow">&#183;</span></a>.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="PurchaseOrder" type="PurchaseOrderType"/&gt;
&lt;xs:element name="gift"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="birthday" type="xs:date"/&gt;
&lt;xs:element ref="PurchaseOrder"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations of several different types of element declaration</div></div></div><div class="div3">
<h4><a name="Element_Declaration_details" id="Element_Declaration_details" shape="rect"></a>3.3.1 The Element Declaration Schema Component</h4><p>The element declaration schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ed" id="ed" shape="rect">Element Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ed-annotations" shape="rect" id="ed-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="ed-name" shape="rect" id="ed-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="ed-target_namespace" shape="rect" id="ed-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="ed-type_definition" shape="rect" id="ed-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A <a href="#td" class="compref" shape="rect">Type Definition</a> component. Required.</div>
</div>
<div class="propDefn"><a name="ed-type_table" shape="rect" id="ed-type_table"></a><div class="pdName"><span class="propdef">{type table}</span></div>
<div class="pdDef">
A <a href="#tt" class="compref" shape="rect">Type Table</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="ed-scope" shape="rect" id="ed-scope"></a><div class="pdName"><span class="propdef">{scope}</span></div>
<div class="pdDef">
A <a href="#sc_e" class="compref" shape="rect">Scope</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="ed-value_constraint" shape="rect" id="ed-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A <a href="#vc_e" class="compref" shape="rect">Value Constraint</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="ed-nillable" shape="rect" id="ed-nillable"></a><div class="pdName"><span class="propdef">{nillable}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
<div class="propDefn"><a name="ed-identity-constraint_definitions" shape="rect" id="ed-identity-constraint_definitions"></a><div class="pdName"><span class="propdef">{identity-constraint definitions}</span></div>
<div class="pdDef">
A set of <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> components. </div>
</div>
<div class="propDefn"><a name="ed-substitution_group_affiliations" shape="rect" id="ed-substitution_group_affiliations"></a><div class="pdName"><span class="propdef">{substitution group affiliations}</span></div>
<div class="pdDef">
A set of <a href="#ed" class="compref" shape="rect">Element Declaration</a> components. </div>
</div>
<div class="propDefn"><a name="ed-substitution_group_exclusions" shape="rect" id="ed-substitution_group_exclusions"></a><div class="pdName"><span class="propdef">{substitution group exclusions}</span></div>
<div class="pdDef">
A subset of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}.</div>
</div>
<div class="propDefn"><a name="ed-disallowed_substitutions" shape="rect" id="ed-disallowed_substitutions"></a><div class="pdName"><span class="propdef">{disallowed substitutions}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
A subset of {<em>substitution</em>, <em>extension</em>, <em>restriction</em>}.
</p></div>
</div>
</div>
<div class="propDefn"><a name="ed-abstract" shape="rect" id="ed-abstract"></a><div class="pdName"><span class="propdef">{abstract}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="tt" id="tt" shape="rect">Type Table</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="tt-alternatives" shape="rect" id="tt-alternatives"></a><div class="pdName"><span class="propdef">{alternatives}</span></div>
<div class="pdDef">
A sequence of <a href="#tac" class="compref" shape="rect">Type Alternative</a> components. </div>
</div>
<div class="propDefn"><a name="tt-default_type_definition" shape="rect" id="tt-default_type_definition"></a><div class="pdName"><span class="propdef">{default type definition}</span></div>
<div class="pdDef">
A <a href="#tac" class="compref" shape="rect">Type Alternative</a> component. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="sc_e" id="sc_e" shape="rect">Scope</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="sc_e-variety" shape="rect" id="sc_e-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">global</span>, <span class="enumval">local</span>}. Required.</div>
</div>
<div class="propDefn"><a name="sc_e-parent" shape="rect" id="sc_e-parent"></a><div class="pdName"><span class="propdef">{parent}</span></div>
<div class="pdDef">
Either a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or a <a href="#mgd" class="compref" shape="rect">Model Group Definition</a>. Required if <a href="#sc_e-variety" class="propref" shape="rect">{variety}</a> is <b><i>local</i></b>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_e" id="vc_e" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_e-variety" shape="rect" id="vc_e-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}. Required.</div>
</div>
<div class="propDefn"><a name="vc_e-value" shape="rect" id="vc_e-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>. Required.
</div>
</div>
<div class="propDefn"><a name="vc_e-lexical_form" shape="rect" id="vc_e-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">
A character string. Required.
</div>
</div>
</div></div>
</div>
</div>
<p>The <a href="#ed-name" class="propref" shape="rect">{name}</a> property <span class="rfc2119">must</span> match the
local part of the names of element information items being
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>.</p><p>
For an element declaration <var>E</var>, if <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a>
= <b><i>global</i></b>, then <var>E</var> is available for use throughout the schema.
If <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a>
= <b><i>local</i></b>, then <var>E</var> is available for use only within (the
<a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or <a href="#mgd" class="compref" shape="rect">Model Group Definition</a>)
<var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-parent" class="propref" shape="rect">{parent}</a>.
</p><p>A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
value of the <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> property provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of namespace-qualified
element information items. <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> values of
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> unqualified items.</p><p>An element information item is normally
required to satisfy the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>. For such an
item, schema information set
contributions appropriate to the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> are added to the
corresponding element information
item in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>. The type
definition against which an element information item is
validated (its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>) can be different from the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>. The <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> property of an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, which governs conditional type assignment, and
the <code>xsi:type</code> attribute of an element information item
(see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>) can cause the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> and the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> to be different.
</p><p>If <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> is <b><i>true</i></b>, then
an element with no text or element
content can be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
despite a
<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
which would otherwise require
content, if it carries the
attribute <code>xsi:nil</code> with the value
<code>true</code> (see <a href="#xsi_nil" shape="rect">xsi:nil (&#167;2.7.2)</a>).
Formal details of element <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> are described in
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</p><div class="p">
<div class="termdef"><a name="key-nilled" id="key-nilled" title="" shape="rect">[Definition:]&#160;&#160;</a>An
element information item <var>E</var> is <b>nilled</b>
with respect to some element declaration <var>D</var> if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has
<code>xsi:nil</code> = <b><i>true</i></b>. </span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>. </span></div>
</div>
</div>
If <var>E</var> is said to be <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> without the
identity of <var>D</var> being clear from the context, then <var>D</var> is assumed to
be <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>.
</div><p><a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> establishes a
default or fixed value for an element. If a <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>
with
<a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> =
<b><i>default</i></b> is present, and if the element being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> is
empty, then for
purposes of calculating the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>
and other contributions to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the element is
treated as if
<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>
was
used as the content of the element. If <b><i>fixed</i></b>
is specified, then the element's content <span class="rfc2119">must</span> either be empty,
in which case <b><i>fixed</i></b> behaves as <b><i>default</i></b>, or its
value <span class="rfc2119">must</span> be equal or identical to
<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-value" class="propref" shape="rect">{value}</a>.</p><div class="note"><div class="p"><b>Note:</b> When a default value is supplied and used, as described in
the second sentence of the preceding paragraph, the default
value is used to calculate the
<a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>, etc.,
but the actual content of the element is not changed: the
element contained no character information items in the input
information set, and it contains none in the PSVI.</div></div><div class="note"><div class="p"><b>Note:</b> The provision of defaults for elements goes beyond what is
possible in XML DTDs,
and does not exactly correspond to defaults for attributes. In
particular, an element with a non-empty <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> whose simple type definition includes the empty
string in its lexical space will nonetheless never receive that
value, because the <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> will override it.</div></div><p><a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a> express
constraints establishing uniquenesses and reference
relationships among the values of related elements and
attributes. See <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>.</p><p>The
<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> property of an element declaration indicates
which <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a>, if any, it can potentially be a member of.
Potential membership is transitive but not
symmetric; an element declaration is a potential member of any
group named in its <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>, and
also of any group of which any entry
in its <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> is a potential member. Actual
membership <span class="rfc2119">may</span> be blocked by the effects of <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a> or <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>, see below.</p><p>An empty <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a> allows a declaration to be named in the <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> of other
element declarations having the same declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> or
some type <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> therefrom.
The explicit values of <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a>,
<b><i>extension</i></b> or <b><i>restriction</i></b>,
rule out element declarations having
types whose
derivation from <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> involves any
<b><i>extension</i></b> steps, or <b><i>restriction</i></b> steps,
respectively.
</p><p>The supplied values for <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> determine whether an element declaration
appearing in a <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content
model<span class="arrow">&#183;</span></a> will be prevented from additionally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a> elements (a) with an
<a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> that identifies an <b><i>extension</i></b>
or <b><i>restriction</i></b> of the type of the declared element,
and/or (b) from <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a>
elements which are in the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> headed by the declared
element. If <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>
is empty, then
all <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> types and <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> members are allowed.</p><p>Element declarations for which <a href="#ed-abstract" class="propref" shape="rect">{abstract}</a> is <b><i>true</i></b> can appear in content models
only when substitution is allowed; such declarations <span class="rfc2119">must not</span> themselves ever be used to
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> element content.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role
of the
<a href="#ed-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-element" id="declare-element" shape="rect"></a>3.3.2 XML Representation of Element Declaration Schema Components</h4><p>The XML representation for an element declaration schema
component is an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
item. It specifies a type definition for an element either by
reference or explicitly, and <span class="rfc2119">may</span> provide occurrence and
default information. The correspondences between the properties
of the information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component(s) it
corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>element</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-element" name="element-element" shape="rect">&lt;element</a><br clear="none" />&#160;&#160;abstract = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;block =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>substitution</var>))
<br clear="none" />&#160;&#160;default = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;final =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
<br clear="none" />&#160;&#160;fixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;form = (<var>qualified</var> | <var>unqualified</var>)<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;nillable = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;substitutionGroup = List of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a>)?, <a href="#element-alternative" class="eltref" shape="rect">alternative</a>*, (<a href="#element-unique" class="eltref" shape="rect">unique</a> | <a href="#element-key" class="eltref" shape="rect">key</a> | <a href="#element-keyref" class="eltref" shape="rect">keyref</a>)*))<br clear="none" />&lt;/element&gt;</p></div></div><p>An
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
information item in a schema document
maps to an
element declaration and allows the
type definition of that declaration to be specified either by
reference or by explicit inclusion.</p><p>Top-level <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
elements
(i.e. those which appear within
the schema document as children of
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
elements)
produce
<b><i>global</i></b> element declarations; <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>s within <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> produce either particles which contain <b><i>global</i></b> element declarations (if there's a <code>ref</code> attribute) or local declarations (otherwise). For complete declarations, top-level or local, the <code>type</code> attribute is used when the declaration can use a
built-in or
user-defined global type definition. Otherwise an
anonymous <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> is provided inline.</p><div class="note"><div class="p"><b>Note:</b>
Children of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are not strictly speaking top-level
declarations, but they will become top-level declarations if they
override corresponding declarations in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of their parent. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
</div></div><p>Element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a top-level
declaration <span class="rfc2119">must</span> be qualified with the
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> of that
declaration.
If the
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
the item <span class="rfc2119">must</span> be unqualified.
Control over whether element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a local declaration <span class="rfc2119">must</span> be similarly qualified or not
is provided by the <code>form</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, whose default is provided
by the <code>elementFormDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> on the enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, via its determination of <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a>.</p><p>
The names for top-level element declarations are in a separate
<a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a> from the symbol spaces for
the names of type definitions, so there can (but need
not be) a simple or complex type definition with the same name as a
top-level element. The names of locally-scoped
element declarations need not be unique and thus
reside in no symbol space at all (but the element declarations are
constrained by <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>).</p><p>Note that the above allows for two levels of defaulting for unspecified
type definitions. An <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> with no referenced or included type definition will
correspond to an element declaration which has
the
same type definition as the first
substitution-group head named in the
<code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,
otherwise <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
This has the important consequence that the minimum valid element declaration,
that is, one with only a <code>name</code> attribute and no contents,
is also (nearly) the most general, validating any combination of text and
element content and allowing any attributes, and providing for recursive
validation where possible.</p><p>See
<a href="#declare-key" shape="rect">XML Representation of Identity-constraint Definition Schema Components (&#167;3.11.2)</a> for <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> and <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>.</p><div class="block">The following sections specify several
sets of XML mapping rules which apply in different circumstances.
<ul><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, it maps to
an <a href="#ed" class="compref" shape="rect">Element Declaration</a> using the mappings described in
<a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a> and
<a href="#dcl.elt.global" shape="rect">Mapping Rules for Top-Level Element Declarations (&#167;3.3.2.2)</a>.
</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an ancestor,
and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent,
and it does not have <code>minOccurs=maxOccurs=0</code>,
then it maps both to a <a href="#p" class="compref" shape="rect">Particle</a>, as described
in <a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations (&#167;3.3.2.3)</a>, and also to an
<a href="#ed" class="compref" shape="rect">Element Declaration</a>, using the mappings described in
<a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a> and
<a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations (&#167;3.3.2.3)</a>.
</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present,
and it does not have <code>minOccurs=maxOccurs=0</code>,
then it maps to a <a href="#p" class="compref" shape="rect">Particle</a>
as described in <a href="#ref.elt.global" shape="rect">References to Top-Level Element Declarations (&#167;3.3.2.4)</a>.</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
<code>minOccurs=maxOccurs=0</code>,
then it maps to no component at all.</div><div class="note"><div class="p"><b>Note:</b> The <code>minOccurs</code> and <code>maxOccurs</code>
attributes are not allowed on top-level
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> elements, so in valid schema
documents this will happen only when the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
ancestor.
</div></div></li></ul>
</div><div class="div4">
<h5><a name="dcl.elt.common" id="dcl.elt.common" shape="rect"></a>3.3.2.1 Common Mapping Rules for Element Declarations</h5><p>The following mapping rules apply
in all cases where an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
maps to an <a href="#ed" class="compref" shape="rect">Element Declaration</a> component.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">
The first of the following
that applies:
<div class="constraintlist"><div class="clnumber">1 <span class="p">The type definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if either is present.
</span></div>
<div class="clnumber">2 <span class="p">
The type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if it is present.
</span></div>
<div class="clnumber">3 <span class="p">The declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
of the <a href="#ed" class="compref" shape="rect">Element Declaration</a>
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the first
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> in the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present.
</span></div>
<div class="clnumber">4 <span class="p">
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
</span></div>
</div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-type_table" class="propref" shape="rect">{type table}</a></div><div class="mapRepr">A
<a href="#tt" class="compref" shape="rect">Type Table</a> corresponding to the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element
information
items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, as follows, otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a></div><div class="pvVal">
A sequence of <a href="#tac" class="compref" shape="rect">Type Alternative</a>s, each corresponding, in
order, to one of
the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> elements which have a
<code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div></div><div class="pvpair"><div class="pvProp"><a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a></div><div class="pvVal">
Depends upon the final <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>. If it has no <code>test</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, the final <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> maps to
the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>;
if it does have a <code>test</code> attribute, it is covered by
the rule for <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and
the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>
is taken from the declared type of the <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
So the value of the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>
is given by
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> has no <code>test</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b>a <a href="#tac" class="compref" shape="rect">Type Alternative</a> corresponding to the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>.</div><div class="clnumber">2 <b>otherwise </b>(the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> has a
<code>test</code>) a <a href="#tac" class="compref" shape="rect">Type Alternative</a> with the following properties: <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#tac-test" class="propref" shape="rect">{test}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div><div class="pvpair"><div class="pvProp"><a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> property of
the parent <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</div></div><div class="pvpair"><div class="pvProp"><a href="#tac-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">the empty sequence.</div></div></div></div></div>
</div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-nillable" class="propref" shape="rect">{nillable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>nillable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
then a <a href="#vc_e" class="compref" shape="rect">Value Constraint</a> as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. <span class="termdef"><a name="l-std" id="l-std" title="" shape="rect">[Definition:]&#160;&#160;</a>Use the name <b>effective simple type
definition</b> for the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, if it is a
simple type definition,
or, if <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>,
for <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>,
or else for the built-in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a> simple
type definition).</span>
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b> or
<b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (with respect
to the <a href="#l-std" class="termref" shape="rect"><span class="arrow">&#183;</span>effective simple type definition<span class="arrow">&#183;</span></a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (with respect to the <a href="#l-std" class="termref" shape="rect"><span class="arrow">&#183;</span>effective simple type definition<span class="arrow">&#183;</span></a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity- constraint definitions}</a></div><div class="mapRepr">A set
consisting of the identity-constraint-definitions corresponding to
all the <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>,
<a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> and <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> element
information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, otherwise the
empty set.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a></div><div class="mapRepr">A set of the element declarations
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the items in the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,
otherwise the empty set.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a></div><div class="mapRepr">A set
depending on the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>block</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise on the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, if present,
otherwise on the empty string. Call this the
<b>EBV</b> (for effective block value). Then the
value of this property is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <b>EBV</b> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b>the <b>EBV</b> is <code>#all</code>, <b>then </b><code>{</code><b><i>extension</i></b>,
<b><i>restriction</i></b>,
<b><i>substitution</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>a set with members drawn from the set
above, each being present or absent depending on whether
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (which is a list) contains an equivalently
named item.
<div class="note"><div class="p"><b>Note:</b> Although the <code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <span class="rfc2119">may</span> include values other than
<b><i>extension</i></b>, <b><i>restriction</i></b> or
<b><i>substitution</i></b>, those values are ignored in the
determination of <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> for element
declarations (they <em>are</em> used elsewhere).</div></div>
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a></div><div class="mapRepr">As for
<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> above,
but using the <code>final</code> and <code>finalDefault</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> in place of the <code>block</code> and
<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and with the relevant
set being <code>{</code><b><i>extension</i></b>,
<b><i>restriction</i></b><code>}</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-abstract" class="propref" shape="rect">{abstract}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>abstract</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
and any of its <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a>, <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a> and
<a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> with a <code>ref</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div></div><div class="div4">
<h5><a name="dcl.elt.global" id="dcl.elt.global" shape="rect"></a>3.3.2.2 Mapping Rules for Top-Level Element Declarations</h5><p id="xr.elt4">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent,
it
maps to a
global <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
using the mapping given
in <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a>,
supplemented by the following.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the parent
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is none.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
<a href="#sc_e" class="compref" shape="rect">Scope</a> as follows
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="dcl.elt.local" id="dcl.elt.local" shape="rect"></a>3.3.2.3 Mapping Rules for Local Element Declarations</h5><p id="xr.elt6">
If
the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as
an ancestor,
and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent,
and it does not have
<code>minOccurs=maxOccurs=0</code>,
then it maps both to a
<a href="#p" class="compref" shape="rect">Particle</a> and to a local
<a href="#ed" class="compref" shape="rect">Element Declaration</a> which is the <a href="#p-term" class="propref" shape="rect">{term}</a>
of that <a href="#p" class="compref" shape="rect">Particle</a>. The <a href="#p" class="compref" shape="rect">Particle</a>
is as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A (local) element declaration as
given below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The same annotations as the <a href="#ed-annotations" class="propref" shape="rect">{annotations}</a> of the
<a href="#p-term" class="propref" shape="rect">{term}</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p id="xr.elt8">
The <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
element also maps to an
element declaration using the
mapping rules given in
<a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a>, supplemented by those
below:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
<code>targetNamespace</code> is present
, <b>then </b>
its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<code>targetNamespace</code> is not present and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
<code>form</code>
= <code>qualified</code>
</span></div>
<div class="clnumber">2.2 <span class="p">
<code>form</code> is absent and the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
ancestor
has <code>elementFormDefault</code> =
<code>qualified</code>
</span></div>
</div>
<b>then </b>
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
of the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
information item,
or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is
none.
</div><div class="clnumber">3 <b>otherwise </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">
A
<a href="#sc_e" class="compref" shape="rect">Scope</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>local</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor, the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> corresponding to that item, otherwise (the
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
element information item is within a named <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information
item), the <a href="#mgd" class="compref" shape="rect">Model Group Definition</a> corresponding to
that item.</div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="ref.elt.global" id="ref.elt.global" shape="rect"></a>3.3.2.4 References to Top-Level Element Declarations</h5><p id="xr.elt10">
If the
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
item has
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
ancestor,
and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present,
and it does not have
<code>minOccurs=maxOccurs=0</code>,
then it maps to
a <a href="#p" class="compref" shape="rect">Particle</a> as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">The (top-level) element
declaration <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of
the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.elt.exx" id="dcl.elt.exx" shape="rect"></a>3.3.2.5 Examples of Element Declarations</h5><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="unconstrained"/&gt;
&lt;xs:element name="emptyElt"&gt;
&lt;xs:complexType&gt;
&lt;xs:attribute ...&gt;. . .&lt;/xs:attribute&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="contextOne"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="myLocalElement" type="myFirstType"/&gt;
&lt;xs:element ref="globalElement"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="contextTwo"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="myLocalElement" type="mySecondType"/&gt;
&lt;xs:element ref="globalElement"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">The first example above declares an element whose type, by default, is
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
The second uses an embedded anonymous complex
type definition.</div></div><div class="exampleWrapper">
<div class="p">The last two examples illustrate the use of local element declarations. Instances of <code>myLocalElement</code> within
<code>contextOne</code> will be constrained by <code>myFirstType</code>,
while those within <code>contextTwo</code> will be constrained by
<code>mySecondType</code>. </div></div></div><div class="note"><div class="p"><b>Note:</b> The possibility that differing attribute declarations and/or content models
would apply to elements with the same name in different contexts is an
extension beyond the expressive power of a DTD in XML.</div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve"> &lt;xs:complexType name="facet"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="value" use="required"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="facet" type="xs:facet" abstract="true"/&gt;
&lt;xs:element name="encoding" substitutionGroup="xs:facet"&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:facet"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="value" type="xs:encodings"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="period" substitutionGroup="xs:facet"&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:facet"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="value" type="xs:duration"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="datatype"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="facet" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="optional"/&gt;
. . .
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">An example from a previous version of the schema for datatypes. The
<code>facet</code> type is defined
and the <code>facet</code> element is declared to use it. The <code>facet</code> element is abstract -- it's
<em>only</em> defined to stand as the head for a <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>. Two further
elements are declared, each a member of the <code>facet</code> <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>. Finally a type is defined which refers to <code>facet</code>, thereby
allowing <em>either</em> <code>period</code> or <code>encoding</code> (or
any other member of the group).</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">The following example illustrates conditional type assignment
to an element, based on the value of one of the element's attributes.
Each instance of the <code>message</code> element will be
assigned either to type <code>messageType</code> or to a more
specific type derived from it.
</div></div><div class="exampleWrapper">
<div class="p">The type <code>messageType</code> accepts any well-formed XML
or character sequence as content, and carries a <code>kind</code>
attribute which can be used to describe the kind or format of
the message. The value of <code>kind</code> is either one of a
few well known keywords or, failing that, any string.</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="messageType" mixed="true"&gt;
&lt;xs:sequence&gt;
&lt;xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="kind"&gt;
&lt;xs:simpleType&gt;
&lt;xs:union&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:string"&gt;
&lt;xs:enumeration value="string"/&gt;
&lt;xs:enumeration value="base64"/&gt;
&lt;xs:enumeration value="binary"/&gt;
&lt;xs:enumeration value="xml"/&gt;
&lt;xs:enumeration value="XML"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:string"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:anyAttribute processContents="skip"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">Three restrictions of <code>messageType</code> are defined, each
corresponding to one of the three well-known formats:
<code>messageTypeString</code> for <code>kind="string"</code>,
<code>messageTypeBase64</code> for <code>kind="base64"</code>
and <code>kind="binary"</code>, and
<code>messageTypeXML</code> for <code>kind="xml"</code> or
<code>kind="XML"</code>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xs:complexType name="messageTypeString"&gt;
&lt;xs:simpleContent&gt;
&lt;xs:restriction base="messageType"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:string"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="messageTypeBase64"&gt;
&lt;xs:simpleContent&gt;
&lt;xs:restriction base="messageType"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:base64Binary"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="messageTypeXML"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="messageType"&gt;
&lt;xs:sequence&gt;
&lt;xs:any processContents="strict"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p"><a name="anchor6013" id="anchor6013" shape="rect"></a>
The <code>message</code> element itself uses
<code>messageType</code> both as its declared type and
as its default type, and uses <code>test</code> attributes on its
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to assign the appropriate
specialized message type to messages with the well known
values for the <code>kind</code> attribute.
Because the declared type and the default type are the same, the last
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> (without the <code>test</code> attribute)
can be omitted.</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xs:element name="message" type="messageType"&gt;
&lt;xs:alternative test="@kind='string'" type="messageTypeString"/&gt;
&lt;xs:alternative test="@kind='base64'" type="messageTypeBase64"/&gt;
&lt;xs:alternative test="@kind='binary'" type="messageTypeBase64"/&gt;
&lt;xs:alternative test="@kind='xml'" type="messageTypeXML"/&gt;
&lt;xs:alternative test="@kind='XML'" type="messageTypeXML"/&gt;
&lt;xs:alternative type="messageType"/&gt;
&lt;/xs:element&gt;
</pre></div></div></div></div><div class="div3">
<h4><a name="sec-src-element" id="sec-src-element" shape="rect"></a>3.3.3 Constraints on XML Representations of Element Declarations</h4><div class="constraintnote"><a id="src-element" name="src-element" shape="rect"></a><b>Schema Representation Constraint: Element Declaration Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
information items by the schema for schema documents:
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><code>default</code> and <code>fixed</code>
are not
both present.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->If the item's parent is not <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">One of <code>ref</code> or <code>name</code> is present, but not both.</span></div>
<div class="clnumber">2.2 <span class="p"><a name="anchor8458" id="anchor8458" shape="rect"></a>If <code>ref</code> is present, then
no unqualified attributes are
present other than <code>minOccurs</code>, <code>maxOccurs</code>,
and <code>id</code>,
and no children in the Schema namespace (<code>xs</code>) other than
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>.</span></div>
</div>
</div>
<div class="clnumber">3 <span class="p">The <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element does not have both a
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> child and a
<code>type</code> attribute.</span></div>
<div class="clnumber">4<a id="ed-with-ns" name="ed-with-ns" shape="rect"> </a><!--* no span class='p' possible here *-->
If <code>targetNamespace</code> is present then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.1 <span class="p">
<code>name</code> is present.
</span></div>
<div class="clnumber">4.2 <span class="p">
<code>form</code> is not present.
</span></div>
<div class="clnumber">4.3 <!--* no span class='p' possible here *-->
If the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> does not have a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
is different from the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>targetNamespace</code> of
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.3.1 <span class="p">
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor
</span></div>
<div class="clnumber">4.3.2<a id="ed-with-ns-must-be-old" name="ed-with-ns-must-be-old" shape="rect"> </a><span class="p">
There is a <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> ancestor
between the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> and the nearest
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> ancestor, and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> does not
<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
name of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
</span></div>
</div>
</div>
</div>
</div>
<div class="clnumber">5 <span class="p">Every <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element but
the last has a <code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>; the last
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element <span class="rfc2119">may</span> have such an <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="eldec_vr" id="eldec_vr" shape="rect"></a>3.3.4 Element Declaration Validation Rules</h4><p>When an element is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>, it is
first checked against its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, if any; this in turn
entails checking it against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>. The
second step is recursive: the element's <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> are
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in turn with respect to the declarations assigned to
them by their parent's <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>.</p><div class="div4">
<h5><a name="sec-sistd" id="sec-sistd" shape="rect"></a>3.3.4.1 Selected and Instance-specified Type Definitions</h5><p>The <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of an element
is normally the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> associated with the
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, but this may be <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overridden<span class="arrow">&#183;</span></a> using conditional type assignment in the <a href="#ed" class="compref" shape="rect">Element Declaration</a> or using an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>, or both.
When the element is declared with
conditional type assignment, the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> is used as the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> unless <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overridden<span class="arrow">&#183;</span></a> by an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>.</p><div class="p"><div class="termdef"><a name="key-selected-type" id="key-selected-type" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>selected type
definition</b> <var>S</var> of an element information item <var>E</var> is a
type definition associated with <var>E</var> in the following way. Let
<var>D</var> be the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> of <var>E</var>. Then: <div class="constraintlist"><div class="clnumber">1<a id="hack-will-it-work-haha-yes" name="hack-will-it-work-haha-yes" shape="rect"> </a><span class="p"> If <var>D</var> has a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <var>S</var> is the type <a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selected<span class="arrow">&#183;</span></a> for
<var>E</var> by <var>D</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>. </span></div>
<div class="clnumber">2 <span class="p">If
<var>D</var> has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <var>S</var> is <var>D</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div>
If <var>E</var> has no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, then <var>E</var> has no selected
type definition.</div>
<div class="note"><div class="p"><b>Note:</b> It is a consequence of <a href="#e-props-correct" shape="rect">Element Declaration Properties Correct (&#167;3.3.6.1)</a>
that if <var>D</var> is valid, then
<var>S</var> will be <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>D</var>'s
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, or else that <var>S</var> will be
<a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a>.</div></div>
</div><div class="p"><div class="termdef"><a name="key-cta-select" id="key-cta-select" title="" shape="rect">[Definition:]&#160;&#160;</a> Given a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T</var> and an element
information item <var>E</var>, <var>T</var> <b>conditionally selects</b> a
type <var>S</var> for <var>E</var> in
the following way. The <a href="#tac-test" class="propref" shape="rect">{test}</a>
expressions in <var>T</var>'s <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> are evaluated, in order,
until one of the <a href="#tac" class="compref" shape="rect">Type Alternative</a>s <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, or until
all have been tried without success. If any
<a href="#tac" class="compref" shape="rect">Type Alternative</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition, none of the following
<a href="#tac" class="compref" shape="rect">Type Alternative</a>s are tried. Then the type <var>S</var> <b>conditionally
selected</b> for <var>E</var> by <var>T</var> is
as described in
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="hack-to-force-template-match-2" name="hack-to-force-template-match-2" shape="rect"> </a><span class="p">
If at least one <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>
<a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, then <var>S</var>
is the type definition selected by the first such <a href="#tac" class="compref" shape="rect">Type Alternative</a>.
</span></div><div class="clnumber">2 <span class="p">
If no <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a>
a type definition, then <var>S</var> is
<var>T</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>.
</span></div></div>
</div></div><div class="p">
<div class="termdef"><a name="key-itd" id="key-itd" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>instance-specified type definition</b>
is a type definition associated with an element information
item in the following way: <div class="constraintlist"><div class="clnumber">1<a id="xsi-type-att" name="xsi-type-att" shape="rect"> </a><span class="p">Among the element's attribute information items is one
named <code>xsi:type</code>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of that attribute information item is a
qualified name <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to the built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, as
defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>. </span></div>
<div class="clnumber">3 <span class="p">The
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>)
<a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a>
to a type definition.
It is this type definition which is the
<b>instance-specified type definition</b>.</span></div>
</div> </div></div></div><div class="div4">
<h5><a name="sec-type-override" id="sec-type-override" shape="rect"></a>3.3.4.2 Type Override and Valid Substitutability</h5><div class="p"><div class="termdef"><a name="key-overrides" id="key-overrides" title="" shape="rect">[Definition:]&#160;&#160;</a>An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> <var>S</var> is said to
<b>override</b> another type definition <var>T</var> if and only
if all of the following are true: <div class="constraintlist"><div class="clnumber">1 <span class="p"><var>S</var> is the
<a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> on some element information item
<var>E</var>. A <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> may or may not be known for <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p"><var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the blocking keywords of
the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> of
<var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, if any, or <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>validly
substitutable without limitation<span class="arrow">&#183;</span></a> for
<var>T</var> (if no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is known).</span></div>
</div> <div class="note"><div class="p"><b>Note:</b> Typically, <var>T</var>
would be the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> for <var>E</var> if it were not
overridden. (This will be the case if <var>T</var> was stipulated by
the processor, as described in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>, or <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> and
<var>T</var> is its declared type, or <var>T</var> is the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>E</var>.) </div></div> </div></div><div class="note"><div class="p"><b>Note:</b> The use of the term "<a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a>"
to denote the relation between an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>
<var>S</var> and another type <var>T</var> has nothing to do with the
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element; the two mechanisms are
distinct and unrelated.</div></div><div class="p"><div class="termdef"><a name="key-val-sub-type" id="key-val-sub-type" title="" shape="rect">[Definition:]&#160;&#160;</a>A type definition <var>S</var> is
<b>validly substitutable</b> for another type <var>T</var>,
subject to a
set of blocking keywords <var>K</var> (typically drawn from the set
{<b><i>substitution</i></b>, <b><i>extension</i></b>,
<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} used in
the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> and
<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> of
element declarations and type definitions), if and
only if either <ul><li><div class="p"><var>S</var> and <var>T</var> are both complex
type definitions and <var>S</var> is validly derived from <var>T</var>
subject to the
blocking keywords in the union of <var>K</var> and <var>T</var>.
<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>,
as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
<ul><li><div class="p"><var>S</var> is a complex type definition, <var>T</var> is a
simple type definition, and <var>S</var> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<var>T</var> subject to the
blocking keywords in <var>K</var>, as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
<ul><li><div class="p"><var>S</var> is a simple type definition and <var>S</var> is
validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <var>T</var> subject to the blocking keywords in
<var>K</var>, as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></li></ul></div></div><p><span class="termdef"><a name="key-val-sub-type-absolute" id="key-val-sub-type-absolute" title="" shape="rect">[Definition:]&#160;&#160;</a>If the set of keywords controlling whether
a type <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> is the
empty set, then <var>S</var> is said to be <b>validly
substitutable</b> for <var>T</var> <b>without limitation</b>
or <b>absolutely</b>. The phrase <b>validly
substitutable</b>, without mention of any set of blocking
keywords, means "validly substitutable without
limitation".</span>
</p><p>Sometimes one type <var>S</var> is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> only if <var>S</var> is derived
from <var>T</var> by a chain of restrictions, or if <var>T</var> is a union type
and <var>S</var> a member type of the union. The concept of <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>valid substitutability<span class="arrow">&#183;</span></a> is
appealed to often enough in such contexts that it is convenient
to define a term to cover this specific case. <span class="termdef"><a name="key-val-sub-type-restricts" id="key-val-sub-type-restricts" title="" shape="rect">[Definition:]&#160;&#160;</a>A type definition <var>S</var> is <b>validly
substitutable as a restriction</b> for another type <var>T</var> if
and only if <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the
blocking keywords {<b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b>}.</span>
</p></div><div class="div4">
<h5><a name="sec-cvc-elt" id="sec-cvc-elt" shape="rect"></a>3.3.4.3 Element Locally Valid (Element)</h5><p>The concept of local validity of an
element information item against an element declaration is
an important part of the schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
of elements. (The other important part is the recursive
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of attributes and descendant elements.)
Local validity partially determines the element information item's
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property,
and fully determines the
<a href="#e-local_elem_validity" class="propref" shape="rect">[local element validity]</a>
property, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
</p><div class="block">Informally, an element is locally valid
against an element declaration when:
<ol class="enumar"><li><div class="p">The declaration is present in the schema
and the name of the element matches the name of the declaration.</div></li><li><div class="p">The element is declared concrete (i.e. not abstract).</div></li><li><div class="p">Any <code>xsi:nil</code> attribute on the element obeys the
rules. The element is allowed to have an <code>xsi:nil</code>
attribute only if the element is declared nillable, and
<code>xsi:nil = 'true'</code> is allowed only if the element
itself is empty. If the element declaration specifies a
fixed value for the element, <code>xsi:nil='true'</code>
will make the element invalid.
</div></li><li><div class="p">Any <code>xsi:type</code> attribute present names a
type which is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the element's
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</div></li><li><div class="p">
The element's content satisfies the appropriate constraints:
If the element is empty and the declaration specifies a
default value, the default is checked against the
appropriate type definitions.
Otherwise, the content of the element is checked against
the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>; additionally, if the element
declaration specifies a fixed value, the content is
checked against that value.</div></li><li><div class="p">
The element satisfies all the identity constraints specified
on the element declaration.</div></li><li><div class="p">
Additionally, on the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, document-level
ID and IDREF constraints are checked.
</div></li></ol>
</div><p>The following validation rule gives
the normative formal definition of local validity of an element
against an element declaration.</p><div class="constraintnote"><a id="cvc-elt" name="cvc-elt" shape="rect"></a><b>Validation Rule: Element Locally Valid (Element)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var> to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an element
declaration <var>D</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-ea" name="c-ea" shape="rect"> </a><span class="p"><var>D</var>
is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
and <var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-abstract" class="propref" shape="rect">{abstract}</a>
=
<b><i>false</i></b>.</span></div>
<div class="clnumber">3 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a>
=
<b><i>false</i></b>,
and <var>E</var> has no
<code>xsi:nil</code> attribute.</span></div>
<div class="clnumber">3.2<a id="c-nl" name="c-nl" shape="rect"> </a><!--* no span class='p' possible here *--><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a>
=
<b><i>true</i></b>
and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">3.2.1 <span class="p">
<var>E</var> has no <code>xsi:nil</code>
attribute information item.</span></div>
<div class="clnumber">3.2.2 <span class="p"><var>E</var> has <code>xsi:nil</code> = <code>false</code>.</span></div>
<div class="clnumber">3.2.3<a id="c-nl-11" name="c-nl-11" shape="rect"> </a><!--* no span class='p' possible here *--><var>E</var> has <code>xsi:nil</code>
= <code>true</code>
(that is, <var>E</var> is <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>), and
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.3.1 <span class="p"><var>E</var> has no character or element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">3.2.3.2 <span class="p"><var>D</var>
has no <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> with
<a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> =
<b><i>fixed</i></b>.</span></div>
</div></div>
</div>
</div>
</div></div>
<div class="clnumber">4<a id="c-itd" name="c-itd" shape="rect"> </a><span class="p">
<a name="anchor11764a" id="anchor11764a" shape="rect"></a>
If <var>E</var> has an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> <var>T</var>, then <var>T</var>
<a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.
</span></div>
<div class="clnumber">5<a id="c-evagtd" name="c-evagtd" shape="rect"> </a>The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">5.1<a id="c-evc" name="c-evc" shape="rect"> </a><b>If </b>
<var>D</var> has a <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, and
<var>E</var> has neither
element nor character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and
<var>E</var> is not
<a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>
, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.1.1 <span class="p">If
<var>E</var>'s
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
is
an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>,
then
<var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>
is a valid default for the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
as defined in <a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate) (&#167;3.3.6.2)</a>.
</span></div>
<div class="clnumber">5.1.2 <span class="p">The element information item with
<var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>
used as its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> as defined
by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div>
</div><div class="clnumber">5.2 <b>If </b><var>D</var> has no <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, or <var>E</var> has either element or
character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, or <var>E</var> is
<a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>, <b>then </b><b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p"><var>E</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> as defined
by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
<div class="clnumber">5.2.2 <!--* no span class='p' possible here *-->If <var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> = <b><i>fixed</i></b> and
<var>E</var>
is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>, then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.2.2.1 <span class="p"><var>E</var> has no element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">5.2.2.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">5.2.2.2.1 <b>If </b><var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
with <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b>
, <b>then </b>the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial
value<span class="arrow">&#183;</span></a> of <var>E</var>
matches <var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div><div class="clnumber">5.2.2.2.2 <b>If </b><var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
is a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
or a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> with
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>, <b>then </b>the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <var>E</var> is equal or identical to
<var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-value" class="propref" shape="rect">{value}</a>.
</div></div></div>
</div>
</div>
</div></div></div></div>
<div class="clnumber">6 <span class="p"><var>E</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to each of the
<a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a> as per <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>.</span></div>
<div class="clnumber">7 <span class="p">If <var>E</var> is the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>,
then it is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> per <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a>.</span></div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b>
If an element has an <code>xsi:type</code> attribute, the
type definition indicated by that attribute normally takes
precedence over the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> which would otherwise
govern the element.
<a name="anchor11764b" id="anchor11764b" shape="rect"></a>
If an <code>xsi:type</code> attribute is present
and <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a>
to a known type definition, but
fails to <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a> the
<a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>, then <var>E</var> is not
locally valid against <var>D</var>,
since <var>E</var> has failed to satisfy
clause <a href="#c-itd" shape="rect">4</a>.
In this case
(or if <code>xsi:type</code> fails to
<a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>), the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of the
element is the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of its
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, and the element is
validated against that type as described in
clause <a href="#c-evagtd" shape="rect">5</a>.
The local validity of the element
with respect to the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is recorded in the
<a href="#e-local_type_validity" class="propref" shape="rect">[local type validity]</a>
property.
The use of the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> when the
<a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> cannot be used
allows useful validation to proceed in some cases (not all) even
when the schema is incomplete. It also
helps ensure consistent typing for sub-elements
with the same name.
</div></div></div><div class="div4">
<h5><a name="sec-cvc-type" id="sec-cvc-type" shape="rect"></a>3.3.4.4 Element Locally Valid (Type)</h5><p>The following validation rule specifies
formally what it means for an element to be locally valid
against a type definition. This concept is appealed to in the
course of checking an element's local validity against its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>. It
is also part of schema-validity
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an element when the element is
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>, by checking its local validity
against <code>xs:anyType</code>.</p><p>
Informally, local validity against a type requires first
that the type definition be present in the schema and not declared abstract.
For a simple type definition, the element must lack attributes
(except for namespace declarations and the special attributes
in the <code>xsi</code> namespace) and child elements, and must
be type-valid against that simple type definition.
For a complex type definition, the element must
be locally valid against that complex type definition.
</p><div class="constraintnote"><a id="cvc-type" name="cvc-type" shape="rect"></a><b>Validation Rule: Element Locally Valid (Type)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
a type definition <var>T</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-ct" name="c-ct" shape="rect"> </a><span class="p"><var>T</var> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p">
If <var>T</var> is a complex type definition, then
<var>T</var>.<a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a> = <b><i>false</i></b>.</span></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>T</var> is a simple type
definition, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1.1 <span class="p"><var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
is empty, except for attributes named <code>xsi:type</code>,
<code>xsi:nil</code>,
<code>xsi:schemaLocation</code>, or
<code>xsi:noNamespaceSchemaLocation</code>.</span></div>
<div class="clnumber">3.1.2 <span class="p"><var>E</var> has no element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">3.1.3<a id="c-sv1" name="c-sv1" shape="rect"> </a><span class="p">If <var>E</var> is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>, then the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to <var>T</var> as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</span></div>
</div>
</div><div class="clnumber">3.2 <b>If </b><var>T</var> is a complex type
definition, <b>then </b><var>E</var> is
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>T</var>
as per <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>;</div></div></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cvc-id" id="sec-cvc-id" shape="rect"></a>3.3.4.5 Validation Root Valid (ID/IDREF)</h5><p>The following validation rule
specifies document-level ID/IDREF constraints checked on the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> if it is an element; this rule is not checked on other
elements. Informally, the requirement is that each ID
identifies a single element within the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>,
and that each IDREF value matches one ID.
</p><div class="constraintnote"><a id="cvc-id" name="cvc-id" shape="rect"></a><b>Validation Rule: Validation Root Valid (ID/IDREF)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
which is the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">There is no <b>ID/IDREF binding</b> in
<var>E</var>.<a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a> whose <a href="#iib-binding" class="propref" shape="rect">[binding]</a> is the empty set.</span></div>
<div class="clnumber">2<a id="c-uba" name="c-uba" shape="rect"> </a><span class="p">There is no <b>ID/IDREF binding</b> in
<var>E</var>.<a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a> whose
<a href="#iib-binding" class="propref" shape="rect">[binding]</a> has more than one
member.</span></div>
</div>
</div><div class="p">See <a href="#sic-id" shape="rect">ID/IDREF Table (&#167;3.17.5.2)</a> for the definition of
<b>ID/IDREF binding</b>.</div></div></div><div class="note"><div class="p"><b>Note:</b> The first clause above is
violated when there is a reference to an undefined
ID.
The second is violated when there is
a multiply-defined ID. The
cases are separated out to ensure that distinct error
codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) are associated with these
two cases.</div></div><div class="note"><div class="p"><b>Note:</b> Since an element governed by type <code>xs:ID</code> provides
a unique identifier for the element's parent element, it is not useful
to have an element governed by <code>xs:ID</code> when the element
has no parent element or when the parent element lies outside the
scope of validation.</div><div class="p">In the following examples, <code>DOC</code>
and <code>Y</code> are governed by type <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>,
the element <code>X</code> and the attribute <code>xml:id</code> are
governed by <code>xs:ID</code>, and the element
<code>Z</code> is governed by a complex type with simple content
derived from <code>xs:ID</code>.</div><ul><li><div class="p">In the document <code>&lt;DOC&gt;&lt;X&gt;abcd&lt;/X&gt;&lt;/DOC&gt;</code>,
the ID value '<code>abcd</code>' will normally be bound to
the <code>DOC</code> element. But if the <code>X</code>
element is the validation root, then '<code>abcd</code>'
will have no element binding, because <code>DOC</code>
is outside the scope of the validation episode.
So the first clause is violated and the document is invalid.</div></li><li><div class="p">The superficially similar case
<code>&lt;DOC&gt;&lt;Y xml:id="abcd"/&gt;&lt;/DOC&gt;</code>
will, in contrast, be valid whether the <code>DOC</code> element
or the <code>Y</code> element is the validation root. The
ID/IDREF table will have one entry in either case, binding
'<code>abcd</code>' to the <code>Y</code> element.
</div></li><li><div class="p">For the document <code>&lt;DOC&gt;&lt;Z
xml:id="abcd"&gt;abcd&lt;/Z&gt;&lt;/DOC&gt;</code>,
if <code>Z</code>
is the validation root, then the ID/IDREF table for the document
will have a single entry for '<code>abcd</code>'
and will be valid. The single binding comes from the
<code>xml:id</code> attribute; the content of
<code>Z</code> produces no binding, just as the content of
<code>X</code> above produces no binding.</div><div class="p">But if <code>DOC</code> is the
validation root, then the ID/IDREF table for the document will
have two entries for '<code>abcd</code>' (one, from the
<code>xml:id</code> attribute, binding '<code>abcd</code>' to
the <code>Z</code> element, one from the content of <code>Z</code>
binding '<code>abcd</code>' to the <code>DOC</code> element) and
will be invalid.
</div></li></ul></div><div class="note"><div class="p"><b>Note:</b> Although this rule applies at the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, in
practice processors, particularly streaming processors,
will perhaps wish to detect and signal the
clause <a href="#c-uba" shape="rect">2</a> case as it arises.</div></div><div class="note"><div class="p"><b>Note:</b> This reconstruction of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>'s
<code>ID/IDREF</code> functionality is imperfect in that if
the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> is not the document element of an XML
document, the results will not necessarily be the same as
those a validating parser would give were the document to have
a DTD with equivalent declarations.</div></div></div><div class="div4">
<h5><a name="sec-cvc-assess-elt" id="sec-cvc-assess-elt" shape="rect"></a>3.3.4.6 Schema-Validity Assessment (Element)</h5><div class="block">This section gives the top-level rule
for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an element information item. Informally:
<ol class="enumar"><li><div class="p">Assessment begins with the identification of a
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> for the element and then checks that the
element is locally valid against the declaration; if no
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is available, a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> can be
used instead.</div></li><li><div class="p">The element's attributes are to be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> recursively,
unless they match a <b><i>skip</i></b> wildcard and are thus
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.
</div></li><li><div class="p">The element's children are to be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> recursively,
unless they match a <b><i>skip</i></b>
wildcard and are thus <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>. For each child element,
the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is the one identified in the course
of checking the local validity of the parent, unless that
declaration is not available. If the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is not
available, the element may still be <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>
if a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> can be identified (e.g. via the
<code>xsi:type</code> attribute), otherwise the element
will be <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>.
</div></li></ol>
</div><div class="p">
<div class="termdef"><a name="key-governing-ed" id="key-governing-ed" title="" shape="rect">[Definition:]&#160;&#160;</a> The <b>governing element declaration</b> of
an element information item <var>E</var>,
in a given schema-validity
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following
which applies:
<div class="constraintlist"><div class="clnumber">1<a id="elem-stipulated" name="elem-stipulated" shape="rect"> </a><span class="p">A
declaration stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="elem-cdd" name="elem-cdd" shape="rect"> </a><span class="p"><var>E</var>'s
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
declaration<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="elem-wc-split" name="elem-wc-split" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>
to by <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>
and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
name]</a>, provided that <var>E</var>
is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> either to a <b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
or to a <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">4<a id="elem-wc" name="elem-wc" shape="rect"> </a><!--* no span class='p' possible here *-->A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by
<var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local
name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
name]</a>, provided that
<b>none</b> of the following is true:
<div class="constraintlist"><div class="clnumber">4.1<a id="no-id-if-skipped" name="no-id-if-skipped" shape="rect"> </a><span class="p"><var>E</var> is
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> </span></div>
<div class="clnumber">4.2 <span class="p">the
processor has stipulated a type definition for
<var>E</var> </span></div>
<div class="clnumber">4.3 <span class="p">a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> exists for
<var>E</var></span></div>
</div>
</div>
</div>
If none of these
applies,
<var>E</var> has
no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> (or, in equivalent words,
<var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </div>
</div><div class="p">
<div class="termdef"><a name="key-governing-type-elem" id="key-governing-type-elem" title="" shape="rect">[Definition:]&#160;&#160;</a> The <b>governing type definition</b> of an
element information item <var>E</var>,
in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following which
applies: <div class="constraintlist"><div class="clnumber">1<a id="stipulated-plus-xsitype" name="stipulated-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> a type
definition stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="stipulated" name="stipulated" shape="rect"> </a><span class="p">A type definition stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">3<a id="governing-plus-xsitype" name="governing-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">4<a id="gov-no-xsitype" name="gov-no-xsitype" shape="rect"> </a><span class="p">The <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">5 <span class="p">The value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
if <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">6 <span class="p"> An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">7 <span class="p">The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">8 <span class="p">An
<a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>.</span></div>
</div>
If none of these
applies,
there is no
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </div>
</div><div class="constraintnote"><a id="cvc-assess-elt" name="cvc-assess-elt" shape="rect"></a><b>Validation Rule: Schema-Validity Assessment (Element)</b><br clear="none" /><div class="constraint"><div class="p">The schema-validity assessment of an element information item
<var>E</var> is performed as follows:<div class="constraintlist"><div class="clnumber">1 <span class="p">If <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>,
then <var>E</var> <span class="rfc2119">must</span> be <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>,
then <var>E</var> <span class="rfc2119">must not</span> be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3 <span class="p">Otherwise, <var>E</var> <span class="rfc2119">must</span> be <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>.</span></div>
</div>
</div></div></div><div class="p">
<div class="termdef"><a name="key-sva" id="key-sva" title="" shape="rect">[Definition:]&#160;&#160;</a>An element
information item <var>E</var> is said to be <b>strictly assessed</b>
if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="c-xd" name="c-xd" shape="rect"> </a><!--* no span class='p' possible here *-->
<b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-ed" name="c-ed" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1<a id="dummy-id-to-force-special-list-processing-for-parent" name="dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> element declaration
is known for <var>E</var>, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration.
</span></div>
<div class="clnumber">1.1.2 <span class="p"><var>E</var>'s local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with
respect to that declaration has been evaluated as per
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</span></div>
<div class="clnumber">1.1.3 <span class="p">If that evaluation involved the evaluation of
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, clause <a href="#c-ct" shape="rect">1</a> thereof is satisfied.</span></div>
</div></div>
<div class="clnumber">1.2<a id="c-td" name="c-td" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.2.1 <span class="p">
<var>E</var> does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">1.2.2 <span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
type definition is known for <var>E</var>, namely its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
</span></div>
<div class="clnumber">1.2.3<a id="another-dummy-id-to-force-special-list-processing-for-parent" name="another-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">The local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of <var>E</var> with respect to its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has been evaluated as
per <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
</div>
</div>
<div class="clnumber">2<a id="c-deepa" name="c-deepa" shape="rect"> </a><!--* no span class='p' possible here *-->
For each of the attribute information items among
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
the attribute has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>
, <b>then </b>
its schema-validity is assessed with respect to that
declaration, as defined in <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>.
</div><div class="clnumber">2.2 <b>otherwise </b>
its schema-validity is not assessed.
</div></div>
</div>
<div class="clnumber">3<a id="c-deepe" name="c-deepe" shape="rect"> </a><!--* no span class='p' possible here *-->
For each of the element information items among its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>
the child has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
, <b>then </b>
its schema-validity is assessed with respect to that
declaration or type definition, as defined in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.
</div><div class="clnumber">3.2 <b>If </b>
the child is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b>
<a href="#w" class="compref" shape="rect">Wildcard</a>
, <b>then </b>
its schema-validity is not assessed.
</div><div class="clnumber">3.3 <b>otherwise </b>
its schema-validity is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> with
respect to <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
</div></div>
</div>
</div>
</div>
</div><div class="p"><div class="termdef"><a name="key-lva" id="key-lva" title="" shape="rect">[Definition:]&#160;&#160;</a>The schema validity of an element information item <var>E</var> is
said to be <b>laxly assessed</b> if and only if
<b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has neither a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>
nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var> is locally
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as defined in
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, and the schema-validity of
<var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
is assessed as described in clause <a href="#c-deepa" shape="rect">2</a> and clause <a href="#c-deepe" shape="rect">3</a>
of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.</span></div>
</div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> It follows from the definitions given that no element
information item can be both <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>
and <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> in the same schema-validity
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</div></div></div></div><div class="div3">
<h4><a name="edisc" id="edisc" shape="rect"></a>3.3.5 Element Declaration Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-e-outcome" id="sec-sic-e-outcome" shape="rect"></a>3.3.5.1 Assessment Outcome (Element)</h5><div class="constraintnote"><a id="sic-e-outcome" name="sic-e-outcome" shape="rect"></a><b>Schema Information Set Contribution: Assessment Outcome (Element)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the schema-validity of an element information item
has been assessed as per <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>, then
in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> it has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-validation_context" name="e-validation_context" shape="rect"><span class="propdef">[validation context]</span></a></dt><dd>The nearest ancestor element
information item with a <a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> property (or this element item
itself if it has such a property).</dd><dt><a id="e-validity" name="e-validity" shape="rect"><span class="propdef">[validity]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1.1.1 <span class="p">clause <a href="#c-ed" shape="rect">1.1</a> of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> applied and the item was
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>;</span></div>
<div class="clnumber">1.1.1.2 <span class="p">clause <a href="#c-td" shape="rect">1.2</a> of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> applied and the item was
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
<div class="clnumber">1.1.2 <span class="p">Neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
contains an information item (element or attribute
respectively) whose <span class="anonRef">[validity]</span> is
<b><i>invalid</i></b>.</span></div>
<div class="clnumber">1.1.3 <span class="p">Neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
contains an information item (element or attribute
respectively) which is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a
<b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and whose
<span class="anonRef">[validity]</span> is
<b><i>notKnown</i></b>.</span></div>
</div>
<b>then </b><b><i>valid</i></b>;</div><div class="clnumber">1.2 <b>otherwise </b><b><i>invalid</i></b>.</div></div>
</div><div class="clnumber">2 <b>otherwise </b><b><i>notKnown</i></b>.</div></div>
</dd><dt><a id="e-validation_attempted" name="e-validation_attempted" shape="rect"><span class="propdef">[validation attempted]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> and neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an information item (element or
attribute respectively) whose <span class="anonRef">[validation attempted]</span> is not
<b><i>full</i></b>, <b>then </b><b><i>full</i></b>;</div><div class="clnumber">2 <b>If </b>it was not <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> and neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an information item (element or
attribute respectively) whose <span class="anonRef">[validation attempted]</span> is not
<b><i>none</i></b>, <b>then </b><b><i>none</i></b>;</div><div class="clnumber">3 <b>otherwise </b><b><i>partial</i></b>.</div></div></dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-elt-error-code" id="sec-sic-elt-error-code" shape="rect"></a>3.3.5.2 Validation Failure (Element)</h5><div class="constraintnote"><a id="sic-elt-error-code" name="sic-elt-error-code" shape="rect"></a><b>Schema Information Set Contribution: Validation Failure (Element)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>,
as defined by
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above and/or <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a> below,
of an element information item has been assessed, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item
has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_error_code" name="e-schema_error_code" shape="rect"><span class="propdef">[schema error code]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, <b>then </b>a list. Applications wishing to provide
information as to the reason(s) for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure are encouraged
to record one or more error codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) herein.</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
</dd><dt><a id="e-subsequence_valid" name="e-subsequence_valid" shape="rect"><span class="propdef">[subsequence-valid]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is locally
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, because unexpected
attributes or elements were found among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <b>and</b>
clause <a href="#c-cvct" shape="rect">1</a> of
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> would be
satisfied, if those unexpected attributes and
children (those with <a href="#e-match_info" class="propref" shape="rect">[match information]</a> = <b><i>none</i></b>) were removed, <b>then </b><b><i>true</i></b>
</div><div class="clnumber">2 <b>otherwise </b> <b><i>false</i></b></div></div>
</dd><dt><a id="e-idcs" name="e-idcs" shape="rect"><span class="propdef">[failed identity constraints]</span></a></dt><dd>
A list of <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a>s that are
not satisfied
by the element information item, as defined by <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>. <div class="note"><div class="p"><b>Note:</b>
In
principle, the value of this property includes all of the
<a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a>s which are not satisfied for this element item;
in practice, some processors will expose a subset of the
items in this value, rather than the full value.
For example, a processor could choose not to check
further identity constraints after detecting the first
failure.
</div></div>
</dd><dt><a id="e-assertions" name="e-assertions" shape="rect"><span class="propdef">[failed assertions]</span></a></dt><dd>
A list of <a href="#as" class="compref" shape="rect">Assertion</a>s that are not
satisfied by the element information item, as defined by <a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a>. <div class="note"><div class="p"><b>Note:</b>
In
principle, the value of this property includes all of the
<a href="#as" class="compref" shape="rect">Assertion</a>s which are not satsfied by this element item;
in practice, some processors will expose a subset of the items in this
value, rather than the full value. For example, a processor
could choose not to check further assertions after detecting the first
failure.
</div></div>
</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-elt-decl" id="sec-sic-elt-decl" shape="rect"></a>3.3.5.3 Element Declaration</h5><div class="constraintnote"><a id="sic-elt-decl" name="sic-elt-decl" shape="rect"></a><b>Schema Information Set Contribution: Element Declaration</b><br clear="none" /><div class="constraint"><div class="p">If and only if a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is known
for an element information item, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the element
information item has the properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-declaration" name="e-declaration" shape="rect"><span class="propdef">[element declaration]</span></a></dt><dd>
an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration
component itself</dd><dt><a id="e-nil" name="e-nil" shape="rect"><span class="propdef">[nil]</span></a></dt><dd><b><i>true</i></b> if clause <a href="#c-nl-11" shape="rect">3.2.3</a>
of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above is satisfied,
otherwise <b><i>false</i></b>
</dd><dt><a id="e-expected-ed" name="e-expected-ed" shape="rect"><span class="propdef">[expected element declaration]</span></a></dt><dd>if the element information item is
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the <a href="#p-term" class="propref" shape="rect">{term}</a> of that <a href="#p" class="compref" shape="rect">Particle</a>, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
<div class="note"><div class="p"><b>Note:</b>
The <a href="#e-declaration" class="propref" shape="rect">[element declaration]</a> either is the
same as or is in the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> of the <a href="#e-expected-ed" class="propref" shape="rect">[expected element declaration]</a>.
</div></div>
</dd><dt><a id="e-declared_type" name="e-declared_type" shape="rect"><span class="propdef">[declared type]</span></a></dt><dd>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a>
to the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>
</dd><dt><a id="e-local_elem_validity" name="e-local_elem_validity" shape="rect"><span class="propdef">[local element validity]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>, <b>then </b><b><i>valid</i></b></div><div class="clnumber">2 <b>otherwise </b>(the item was
locally
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>) <b><i>invalid</i></b>.</div></div>
</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-eltType" id="sec-sic-eltType" shape="rect"></a>3.3.5.4 Element Validated by Type</h5><div class="constraintnote"><a id="sic-eltType" name="sic-eltType" shape="rect"></a><b>Schema Information Set Contribution: Element Validated by Type</b><br clear="none" /><div class="constraint"><div class="p">If and only if a
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is known for an element
information item, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item has
the properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_normalized_value" name="e-schema_normalized_value" shape="rect"><span class="propdef">[schema normalized value]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> and either the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
is a simple type definition or its
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has
<a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>
clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>
above has applied, <b>then </b>
the
<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a> of the
<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>
</div><div class="clnumber">1.2 <b>If </b>
clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above has
<em>not</em> applied and
the
element's <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the simple
type definition as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>, <b>then </b>
the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the item as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>
</div><div class="clnumber">1.3 <b>otherwise </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div></div>
</div><div class="clnumber">2 <b>otherwise </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div></div>
</dd><dt><a id="e-schema_actual_value" name="e-schema_actual_value" shape="rect"><span class="propdef">[schema actual value]</span></a></dt><dd>
If the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
; otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="e-type_definition" name="e-type_definition" shape="rect"><span class="propdef">[type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> component
itself.</dd><dt><a id="e-type_definition_type" name="e-type_definition_type" shape="rect"><span class="propdef">[type definition type]</span></a></dt><dd>
<b><i>simple</i></b> or <b><i>complex</i></b>, depending on the
<a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.</dd><dt><a id="e-type_definition_namespace" name="e-type_definition_namespace" shape="rect"><span class="propdef">[type definition namespace]</span></a></dt><dd>
<a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{target namespace}</span>.</dd><dt><a id="e-type_definition_anonymous" name="e-type_definition_anonymous" shape="rect"><span class="propdef">[type definition anonymous]</span></a></dt><dd><b><i>true</i></b>
if
<a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span>
is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise
<b><i>false</i></b>.</dd><dt><a id="e-type_definition_name" name="e-type_definition_name" shape="rect"><span class="propdef">[type definition name]</span></a></dt><dd>
If <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
<a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span>, otherwise
schema processors <span class="rfc2119">may</span>, but
need not, provide a value unique to the definition. It
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name for
such a type definition. If a processor does
provide a value in this situation, the choice of what value
to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="e-type_fallback" name="e-type_fallback" shape="rect"><span class="propdef">[type fallback]</span></a></dt><dd>A keyword indicating whether the expected type
definition was unavailable and the element had a fallback type
as its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
<ul><li><div class="p">
<b><i>declared</i></b> if the element information item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> which has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,
and also an
<code>xsi:type</code> attribute which fails to <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to
a type definition that <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
</div></li><li><div class="p"> <b><i>selected</i></b> if the
element information item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> with a
<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> and also has an <code>xsi:type</code>
attribute which fails to <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to a type
definition that <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>
</div></li><li><div class="p"><b><i>lax</i></b> if the
element was <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>
using <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
</div></li><li><div class="p"><b><i>none</i></b> otherwise </div></li></ul>
</dd><dt><a id="e-type_alternative" name="e-type_alternative" shape="rect"><span class="propdef">[type alternative]</span></a></dt><dd>
If the element's <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> does not
have a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>; otherwise the first <a href="#tac" class="compref" shape="rect">Type Alternative</a> that
<a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selected<span class="arrow">&#183;</span></a> the
element's <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>, if any; otherwise the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.
</dd><dt><a id="e-local_type_validity" name="e-local_type_validity" shape="rect"><span class="propdef">[local type validity]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, <b>then </b><b><i>valid</i></b></div><div class="clnumber">2 <b>otherwise </b>(the item was locally
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>) <b><i>invalid</i></b>.</div></div>
</dd><dt><a id="e-descendent_validity" name="e-descendent_validity" shape="rect"><span class="propdef">[descendent validity]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an
information item <b>I</b> (element or attribute
respectively) where either <b>I</b>'s <a href="#e-validity" class="propref" shape="rect">[validity]</a> is <b><i>invalid</i></b> or
<b>I</b> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a strict <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
and <b>I</b>'s
<a href="#e-validity" class="propref" shape="rect">[validity]</a> is <b><i>notKnown</i></b>
, <b>then </b><b><i>valid</i></b>;</div><div class="clnumber">2 <b>otherwise </b><b><i>invalid</i></b>.</div></div>
</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The <span class="anonRef">[type definition
type]</span>, <span class="anonRef">[type definition
namespace]</span>, <span class="anonRef">[type
definition name]</span>, and <span class="anonRef">[type definition anonymous]</span>
properties are redundant with the <span class="anonRef">[type definition]</span> property; they are
defined for the convenience of implementations which wish to
expose those specific properties but not the entire type
definition.</div></div><div class="note"><div class="p"><b>Note:</b>
When clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above
applies and the default or
fixed value constraint
<a href="#vc_a-value" class="propref" shape="rect">{value}</a> is of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs;
if it does not, the prefix used in the lexical representation
(in <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>) will not
necessarily map to the namespace name of the value (in <a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>). To reduce problems and confusion, users may
prefer to ensure that the required namespace information item
is
present in the input
infoset.
</div></div><div class="p"><a name="anchor10662d" id="anchor10662d" shape="rect"></a>If
the
<a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> and
the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
is
a simple type definition with
<a href="#std-variety" class="propref" shape="rect">{variety}</a> <b><i>union</i></b>,
or its <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
<b><i>simple</i></b> and <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> a simple type definition with <a href="#std-variety" class="propref" shape="rect">{variety}</a> <b><i>union</i></b>, then there
are four additional
properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-member_type_definition" name="e-member_type_definition" shape="rect"><span class="propdef">[member type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item
isomorphic<span class="arrow">&#183;</span></a> to the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
</dd><dt><a id="e-member_type_definition_namespace" name="e-member_type_definition_namespace" shape="rect"><span class="propdef">[member type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>.</dd><dt><a id="e-member_type_definition_anonymous" name="e-member_type_definition_anonymous" shape="rect"><span class="propdef">[member type definition anonymous]</span></a></dt><dd><b><i>true</i></b> if the
<a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise
<b><i>false</i></b>.</dd><dt><a id="e-member_type_definition_name" name="e-member_type_definition_name" shape="rect"><span class="propdef">[member type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>, if it is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. If it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, schema processors <span class="rfc2119">may</span>, but
need not, provide a value unique to the definition. It
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name for
such a type definition. If a processor does
provide a value in this situation, the choice of what value
to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd></dl>
</div>
</div>
<div class="p">The <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>
property is provided for applications such as query
processors which need access to the full range of details about
an item's <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, for
example the type hierarchy; the <a href="#e-type_definition_type" class="propref" shape="rect">[type definition type]</a>,
<a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a>,
<a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a>, and
<a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a> properties are defined
for the convenience of those specifying
lighter-weight interfaces, in which
exposing the entire type hierarchy and full component details
might be a significant
burden.</div><div class="p">
If
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
</span></div>
<div class="clnumber">2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
the simple type definition used to validate the
<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (either the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> or its
<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>) has <a href="#std-variety" class="propref" shape="rect">{variety}</a>
= <b><i>list</i></b>;
</span></div>
<div class="clnumber">2.2 <span class="p">
the simple type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b> and the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> has
<a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>;
</span></div>
</div></div>
<div class="clnumber">3 <span class="p">
the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the list
type (from the previous clause) has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>;
</span></div>
</div> then there is an additional property:
</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-member_type_definitions" name="e-member_type_definitions" shape="rect"><span class="propdef">[member type definitions]</span></a></dt><dd>
a sequence of <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components, with the same length
as the
<a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>, each one an
<a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the corresponding
item in the <a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
</dd></dl>
</div>
</div>
<div class="p">Also, if the declaration has a <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, the item has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_default" name="e-schema_default" shape="rect"><span class="propdef">[schema default]</span></a></dt><dd>
The
<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>
of the declaration's
<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.</dd></dl>
</div>
</div>
<div class="p">Note that if an element is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>, then the <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a> and
<a href="#e-member_type_definition" class="propref" shape="rect">[member type definition]</a> properties, or
their alternatives, are based on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</div></div></div></div><div class="div4">
<h5><a name="sec-sic-eltDefault" id="sec-sic-eltDefault" shape="rect"></a>3.3.5.5 Element Default Value</h5><div class="constraintnote"><a id="sic-eltDefault" name="sic-eltDefault" shape="rect"></a><b>Schema Information Set Contribution: Element Default Value</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>,
as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above, of an element
information item has been assessed, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item
has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_specified" name="e-schema_specified" shape="rect"><span class="propdef">[schema specified]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b> clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above applies, <b>then </b>
<b><i>schema</i></b>. </div><div class="clnumber">2 <b>otherwise </b><b><i>infoset</i></b>.</div></div></dd></dl>
</div>
</div>
</div></div><p>See also <a href="#sic-match-info" shape="rect">Match Information (&#167;3.4.5.2)</a>,
<a href="#sic-key" shape="rect">Identity-constraint Table (&#167;3.11.5)</a>, <a href="#sic-notation-used" shape="rect">Validated with Notation (&#167;3.14.5)</a>,
and
<a href="#sic-schema" shape="rect">Schema Information (&#167;3.17.5.1)</a>, which describe other information set contributions
related to element information items.
</p></div><div class="div4">
<h5><a name="Inherited_attributes" id="Inherited_attributes" shape="rect"></a>3.3.5.6 Inherited Attributes</h5><div class="constraintnote"><a id="sic-inheritedAttrs" name="sic-inheritedAttrs" shape="rect"></a><b>Schema Information Set Contribution: Inherited Attributes</b><br clear="none" /><div class="constraint"><div class="p"><div class="termdef"><a name="key-p-inherited" id="key-p-inherited" title="" shape="rect">[Definition:]&#160;&#160;</a>An attribute
information item <var>A</var>, whether explicitly specified in the input
information set or defaulted as described in
<a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>, is <b>potentially inherited</b> by
an element information item <var>E</var> if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>A</var> is among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of one of <var>E</var>'s ancestors.
</span></div>
<div class="clnumber">2 <span class="p">
<var>A</var> and <var>E</var> have the same
<span class="anonRef">[validation context]</span>.
</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *--><b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
<var>A</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
</span></div>
<div class="clnumber">3.2 <span class="p">
<var>A</var> is <em>not</em> <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> any <a href="#au" class="compref" shape="rect">Attribute Use</a>
but <var>A</var> has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> whose
<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
</span></div>
</div></div>
</div>
</div></div><div class="p">If and only if an element information item <var>P</var> is not
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> (that is, it is either
<a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly<span class="arrow">&#183;</span></a> or
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly<span class="arrow">&#183;</span></a> assessed), in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> each of
<var>P</var>'s element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <var>E</var> which is not
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a>, has a
property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-inherited_attributes" name="e-inherited_attributes" shape="rect"><span class="propdef">[inherited attributes]</span></a></dt><dd>
A list of attribute information items. An attribute information item
<var>A</var> is included if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>A</var> is <a href="#key-p-inherited" class="termref" shape="rect"><span class="arrow">&#183;</span>potentially inherited<span class="arrow">&#183;</span></a> by <var>E</var>.
</span></div>
<div class="clnumber">2 <span class="p">
Let <var>O</var> be <var>A</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a>. <var>A</var> does not have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
as another attribute which is also <a href="#key-p-inherited" class="termref" shape="rect"><span class="arrow">&#183;</span>potentially inherited<span class="arrow">&#183;</span></a> by <var>E</var>
and whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a> is a descendant of <var>O</var>.
</span></div>
</div>
</dd></dl>
</div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="coss-element" id="coss-element" shape="rect"></a>3.3.6 Constraints on Element Declaration Schema Components</h4><p>All element declarations (see <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>) <span class="rfc2119">must</span> satisfy the following
constraint.</p><div class="div4">
<h5><a name="sec-e-props-correct" id="sec-e-props-correct" shape="rect"></a>3.3.6.1 Element Declaration Properties Correct</h5><div class="constraintnote"><a id="e-props-correct" name="e-props-correct" shape="rect"></a><b>Schema Component Constraint: Element Declaration Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">
For
any element declaration <var>E</var>,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of <var>E</var>'s properties
.
are as described in the property tableau in
<a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component (&#167;3.3.1)</a>, modulo the
impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>E</var> has a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>,
then
<var>E</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>
is a valid default with
respect to <var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
as defined in <a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate) (&#167;3.3.6.2)</a>.</span></div>
<div class="clnumber">3 <span class="p">If <var>E</var>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> is
non-empty, then
<var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a>
= <b><i>global</i></b>.</span></div>
<div class="clnumber">4<a id="c-vs-sg" name="c-vs-sg" shape="rect"> </a><span class="p">For each member <var>M</var> of <var>E</var>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>,
<var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>,
subject to the blocking keywords
in <var>M</var>.<a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a>.
</span></div>
<div class="clnumber">5 <span class="p">There are no circular substitution groups.
That is, it is not possible to return to
<var>E</var>
by repeatedly following any member of the
<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> property.</span></div>
<div class="clnumber">6 <span class="p">If <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> exists,
then
for each <a href="#tac" class="compref" shape="rect">Type Alternative</a> in
<var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>,
the <a href="#tac-test" class="propref" shape="rect">{test}</a> property is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">7 <!--* no span class='p' possible here *-->If <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> exists,
then for each <a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> <var>T</var> in
<var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>, and also for
<var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>,
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">7.1 <span class="p"><var>T</var> is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, subject
to the blocking keywords of <var>E</var>.<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>.</span></div>
<div class="clnumber">7.2 <span class="p"><var>T</var> is the type
<a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a>.</span></div>
</div>
</div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-valid-default" id="sec-cos-valid-default" shape="rect"></a>3.3.6.2 Element Default Valid (Immediate)</h5><p>
This and the following sections
define relations appealed to
elsewhere in this specification.</p><div class="constraintnote"><a id="cos-valid-default" name="cos-valid-default" shape="rect"></a><b>Schema Component Constraint: Element Default Valid (Immediate)</b><br clear="none" /><div class="constraint"><div class="p">For a
<a href="#vc_e" class="compref" shape="rect">Value Constraint</a>
<var>V</var>
to be a
valid default with respect to a type definition <var>T</var>
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>T</var> is a simple type
definition or a complex type
definition with
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>
, <b>then </b>
<var>V</var> is a valid default
with respect either
to <var>T</var> (if <var>T</var> is simple) or
(if <var>T</var> is complex) to
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
as defined by <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.
</div><div class="clnumber">2 <b>If </b><var>T</var> is a complex type definition
with <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
&#8800; <b><i>simple</i></b>
, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b>.</span></div>
<div class="clnumber">2.2 <span class="p">The particle <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
is <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a>
as defined by <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div>
</div></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-equiv-derived-ok-rec" id="sec-cos-equiv-derived-ok-rec" shape="rect"></a>3.3.6.3 Substitution Group OK (Transitive)</h5><div class="constraintnote"><a id="cos-equiv-derived-ok-rec" name="cos-equiv-derived-ok-rec" shape="rect"></a><b>Schema Component Constraint: Substitution Group OK (Transitive)</b><br clear="none" /><div class="constraint"><div class="p">For an element declaration (call it <b>M</b>,
for member) to be
substitutable
for another element declaration (call it <b>H</b>,
for head)
at least
<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>M</b> and <b>H</b> are the same element
declaration.</span></div>
<div class="clnumber">2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
<b>H</b>.
<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> does not contain
<b><i>substitution</i></b>.</span></div>
<div class="clnumber">2.2 <span class="p">There is a chain of <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>
properties from
<b>M</b> to <b>H</b>, that is, either
<b>M</b>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> contains <b>H</b>, or
<b>M</b>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> contains a declaration whose <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>
contains <b>H</b>, or . . .</span></div>
<div class="clnumber">2.3 <span class="p">The set of all
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>s involved in
the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> of <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> from
<var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> does not
intersect with the union of
(1)
<var>H</var>.<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>,
(2)
<var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>
(if <b>H</b>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is complex, otherwise
the empty set),
and
(3)
the
<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>
(respectively the empty set) of any intermediate
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s
in the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> of <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> from
<var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-equiv-class" id="sec-cos-equiv-class" shape="rect"></a>3.3.6.4 Substitution Group</h5><p><span class="termdef"><a name="key-validly-sub" id="key-validly-sub" title="" shape="rect">[Definition:]&#160;&#160;</a>One element declaration is <b> substitutable</b>
for another if together they satisfy constraint <a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</span> </p><p><span class="termdef"><a name="key-eq" id="key-eq" title="" shape="rect">[Definition:]&#160;&#160;</a> Every element declaration (call this
<b>HEAD</b>) in the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a> of a schema defines a <b>substitution
group</b>, a subset of those <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>. An element declaration is in
the <b>substitution group</b> of <b>HEAD</b> if
and only if it is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for
<b>HEAD</b>. </span></p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cElement_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAttributeUse" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Complex_Type_Definitions" id="Complex_Type_Definitions" shape="rect"></a>3.4 Complex Type Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.1 <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2 <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.1 <a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.2 <a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.3 <a href="#dcl.ctd.ctcc" shape="rect">Mapping Rules for Complex Types with Complex Content</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.4 <a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.5 <a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.6 <a href="#dcl.ctd.exx" shape="rect">Examples of Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.3 <a href="#sec-src-ct" shape="rect">Constraints on XML Representations of Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4 <a href="#formal-complex-type" shape="rect">Complex Type Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.1 <a href="#sec-cdtt" shape="rect">Locally Declared Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.2 <a href="#sec-cvc-complex-type" shape="rect">Element Locally Valid (Complex Type)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.3 <a href="#sec-cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.4 <a href="#sec-particle-attribution" shape="rect">Attribution
</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5 <a href="#sec-ctdsic" shape="rect">Complex Type Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5.1 <a href="#sec-sic-attrDefault" shape="rect">Attribute Default Value</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5.2 <a href="#sec-sic-match-info" shape="rect">Match Information</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6 <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.1 <a href="#sec-ct-props-correct" shape="rect">Complex Type Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.2 <a href="#sec-cos-ct-extends" shape="rect">Derivation Valid (Extension)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.3 <a href="#sec-derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.4 <a href="#sec-cos-content-act-restrict" shape="rect">Content Type Restricts (Complex Content)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.5 <a href="#sec-cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.7 <a href="#builtin-ctd" shape="rect">Built-in Complex Type Definition</a><br clear="none" />
</div><p>Complex Type Definitions provide for:</p><ul><li><div class="p">Constraining element information items by providing <a href="#Attribute_Declaration" shape="rect">Attribute Declaration (&#167;2.2.2.3)</a>s governing the appearance and content of
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a></div></li><li><div class="p">Constraining element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to be empty,
or to conform to a specified element-only or mixed content model, or else
constraining the character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to conform to a
specified simple type definition.</div></li><li><div class="p">Constraining
elements and attributes to exist,
not to exist, or to have specified values, with <a href="#Assertion" shape="rect">Assertion (&#167;2.2.4.3)</a>s.</div></li><li><div class="p">Using the mechanisms of <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a> to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> a complex type from another simple or complex type.</div></li><li><div class="p">Specifying <a href="#gloss-sic" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset contributions<span class="arrow">&#183;</span></a> for elements. </div></li><li><div class="p">Limiting the ability to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> additional types from a given complex type.</div></li><li><div class="p">Controlling the permission to substitute, in an instance, elements of a <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
type for elements declared in a content model to be of a given complex type.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="PurchaseOrderType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="shipTo" type="USAddress"/&gt;
&lt;xs:element name="billTo" type="USAddress"/&gt;
&lt;xs:element ref="comment" minOccurs="0"/&gt;
&lt;xs:element name="items" type="Items"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="orderDate" type="xs:date"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a complex type definition.</div></div></div><div class="div3">
<h4><a name="Complex_Type_Definition_details" id="Complex_Type_Definition_details" shape="rect"></a>3.4.1 The Complex Type Definition Schema Component</h4><p>A complex type definition schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ctd" id="ctd" shape="rect">Complex Type Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ctd-annotations" shape="rect" id="ctd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="ctd-name" shape="rect" id="ctd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Optional.</div>
</div>
<div class="propDefn"><a name="ctd-target_namespace" shape="rect" id="ctd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="ctd-base_type_definition" shape="rect" id="ctd-base_type_definition"></a><div class="pdName"><span class="propdef">{base type definition}</span></div>
<div class="pdDef">
A <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">type definition</a> component. Required.</div>
</div>
<div class="propDefn"><a name="ctd-final" shape="rect" id="ctd-final"></a><div class="pdName"><span class="propdef">{final}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
A subset of {<em>extension</em>, <em>restriction</em>}.
</p></div>
</div>
</div>
<div class="propDefn"><a name="ctd-context" shape="rect" id="ctd-context"></a><div class="pdName"><span class="propdef">{context}</span></div>
<div class="pdDef">
Required if <a href="#ctd-name" class="propref" shape="rect">{name}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>Either
an <a href="#ed" class="compref" shape="rect">Element Declaration</a>
or a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="ctd-derivation_method" shape="rect" id="ctd-derivation_method"></a><div class="pdName"><span class="propdef">{derivation method}</span></div>
<div class="pdDef">
One of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}. Required.</div>
</div>
<div class="propDefn"><a name="ctd-abstract" shape="rect" id="ctd-abstract"></a><div class="pdName"><span class="propdef">{abstract}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
<div class="propDefn"><a name="ctd-attribute_uses" shape="rect" id="ctd-attribute_uses"></a><div class="pdName"><span class="propdef">{attribute uses}</span></div>
<div class="pdDef">
A set of <a href="#au" class="compref" shape="rect">Attribute Use</a> components. </div>
</div>
<div class="propDefn"><a name="ctd-attribute_wildcard" shape="rect" id="ctd-attribute_wildcard"></a><div class="pdName"><span class="propdef">{attribute wildcard}</span></div>
<div class="pdDef">
A <a href="#w" class="compref" shape="rect">Wildcard</a> component. Optional.</div>
</div>
<div class="propDefn"><a name="ctd-content_type" shape="rect" id="ctd-content_type"></a><div class="pdName"><span class="propdef">{content type}</span></div>
<div class="pdDef">
A <a href="#ct" class="compref" shape="rect">Content Type</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="ctd-prohibited_substitutions" shape="rect" id="ctd-prohibited_substitutions"></a><div class="pdName"><span class="propdef">{prohibited substitutions}</span></div>
<div class="pdDef">
A subset of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}.</div>
</div>
<div class="propDefn"><a name="ctd-assertions" shape="rect" id="ctd-assertions"></a><div class="pdName"><span class="propdef">{assertions}</span></div>
<div class="pdDef">
A sequence of <a href="#as" class="compref" shape="rect">Assertion</a> components. </div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="ct" id="ct" shape="rect">Content Type</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ct-variety" shape="rect" id="ct-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">empty</span>, <span class="enumval">simple</span>, <span class="enumval">element-only</span>, <span class="enumval">mixed</span>}. Required.</div>
</div>
<div class="propDefn"><a name="ct-particle" shape="rect" id="ct-particle"></a><div class="pdName"><span class="propdef">{particle}</span></div>
<div class="pdDef">
A <a href="#p" class="compref" shape="rect">Particle</a> component. Required if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>element-only</i></b> or <b><i>mixed</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="ct-open_content" shape="rect" id="ct-open_content"></a><div class="pdName"><span class="propdef">{open content}</span></div>
<div class="pdDef">
An <a href="#oc" class="compref" shape="rect">Open Content</a> property record. Optional if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>element-only</i></b> or <b><i>mixed</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="ct-simple_type_definition" shape="rect" id="ct-simple_type_definition"></a><div class="pdName"><span class="propdef">{simple type definition}</span></div>
<div class="pdDef">
A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component. Required if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>simple</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="oc" id="oc" shape="rect">Open Content</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="oc-mode" shape="rect" id="oc-mode"></a><div class="pdName"><span class="propdef">{mode}</span></div>
<div class="pdDef">
One of {<span class="enumval">interleave</span>, <span class="enumval">suffix</span>}. Required.</div>
</div>
<div class="propDefn"><a name="oc-wildcard" shape="rect" id="oc-wildcard"></a><div class="pdName"><span class="propdef">{wildcard}</span></div>
<div class="pdDef">
A <a href="#w" class="compref" shape="rect">Wildcard</a> component. Required.</div>
</div>
</div></div>
</div>
</div>
<p>Complex type definitions are identified by their <a href="#ctd-name" class="propref" shape="rect">{name}</a> and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>. Except
for anonymous complex type definitions (those with no <a href="#ctd-name" class="propref" shape="rect">{name}</a>), since
type definitions (i.e. both simple and complex type definitions taken together) <span class="rfc2119">must</span> be uniquely identified within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>, no complex type definition can have the same name as another
simple or complex type definition. Complex type <a href="#ctd-name" class="propref" shape="rect">{name}</a>s and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>s
are provided for reference from
instances (see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>), and for use in the XML
representation of schema components
(specifically in <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>). See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="note"><div class="p"><b>Note:</b> The <a href="#ctd-name" class="propref" shape="rect">{name}</a> of a complex type is not <em>ipso
facto</em> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[(local) name]</a> of the
element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by that definition. The connection between a
name and a type definition is described in <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>. </div></div><p>As described in <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>, each complex type is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> which is itself either a <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition (&#167;2.2.1.2)</a> or a <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition (&#167;2.2.1.3)</a>. <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> specifies the means of <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> as either <b><i>extension</i></b> or <b><i>restriction</i></b> (see <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>).</p><p>A complex type with an empty specification for <a href="#ctd-final" class="propref" shape="rect">{final}</a> can be used as a
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> for other types <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by either of
extension or restriction; the explicit values <b><i>extension</i></b>, and <b><i>restriction</i></b> prevent further
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> by extension and restriction respectively. If all values are specified, then <span class="termdef"><a name="key-ct-final" id="key-ct-final" title="" shape="rect">[Definition:]&#160;&#160;</a>the complex type is said to be
<b>final</b>, because no
further <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> are possible</span>. Finality is <em>not</em>
inherited, that is, a type definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from a type
definition which is final for extension is not itself, in the absence of any
explicit <code>final</code> attribute of its own, final for anything.</p><p>The <a href="#ctd-context" class="propref" shape="rect">{context}</a> property is only relevant for anonymous type
definitions, for which its value is the component in which this type
definition appears as the value of a property, e.g.
<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</p><p>Complex types for which <a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a> is
<b><i>true</i></b> have
no valid instances and thus cannot be used in the normal way as
the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>
of element information items (if for some reason an abstract
type is identified as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of an element
information item, the item will invariably be invalid). It
follows that such
abstract types <span class="rfc2119">must not</span> be referenced from an
<a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> attribute in an instance document. Abstract
complex types can be used as <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>s, or even as
the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s of element declarations, provided in every
case a concrete <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> type definition is used for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, either via <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> or the operation of a <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>.</p><p><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> are a set of attribute uses. See <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>
and <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> for details of attribute <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>s provide a more flexible specification for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
attributes not explicitly included in <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
See <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>, <a href="#Wildcard_details" shape="rect">The Wildcard Schema Component (&#167;3.10.1)</a> and
<a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a> for formal
details of attribute wildcard <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>. </p><div class="block"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> determines the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element information items. Informally:
<ul><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>empty</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements
with no character or element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
elements with character-only <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>using its <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>element-only</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements with <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> that
conform to the <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> supplied by its <a href="#ct-particle" class="propref" shape="rect">{particle}</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>mixed</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements whose element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e. specifically ignoring other <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> such as character information items)
conform to the <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> supplied by its <a href="#ct-particle" class="propref" shape="rect">{particle}</a>.</div></li><li><div class="p">
A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
elements with some <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> conforming to the
<a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a>
and
others conforming to
the <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.
</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b>
Not all combinations of <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> and <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
are compatible with all properties of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>. For example,
it is not allowed to derive a complex type with complex content
from a simple type.
The XML mapping rules specified in the following
section
(in particular clause <a href="#c-ctsc-bad" shape="rect">5</a>
of the rule for
the
<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
in the rule for
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
of complex types with simple content, and
clause <a href="#c-ctr" shape="rect">4.1</a>
and
clause <a href="#c-ctes" shape="rect">4.2.1</a>
of the rule for
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
for complex types with complex content)
do not detect such incompatible combinations of properties;
in such cases the mapping rules will build a complex type
regardless of the fact that the properties specified are
incompatible. But the resulting complex type does
not satisfy component rules outlined in <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>
or <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>.
</div></div><div class="block"><a name="anchor6382" id="anchor6382" shape="rect"></a>
The <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> property of a complex type definition <var>T</var> determines
whether type definitions derived from <var>T</var> are or are not
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>. Examples include (but are not limited
to) the substitution of another type definition:
<ul><li><div class="p">as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of an element instance <var>E</var>,
when <var>T</var> is the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>
(often, the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>E</var>'s
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>); this can occur when <var>E</var> specifies a type
definition using the <code>xsi:type</code> attribute;
see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>;
</div></li><li><div class="p">as the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of an element instance <var>E</var>,
when <var>T</var> is the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>E</var>'s
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>; this can occur when conditional type
assignment is used;
see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>;
</div></li><li><div class="p">as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of element instances
whose <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is included in a model group only
<a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>,
by virtue of being included in the
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> of
some element declaration present <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>
<a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>
in the model group, whose declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is <var>T</var>.
</div></li><li><div class="p">
as the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of an
<a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>E1</var> where <ul><li><div class="p">
<var>E1</var> is contained in a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>D</var>
</div></li><li><div class="p">
<var>D</var> is derived from another <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>B</var>
</div></li><li><div class="p">
<var>B</var> contains an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>E2</var> that has the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>E1</var>
</div></li><li><div class="p">
<var>E2</var> has <var>T</var> as its <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.
</div></li></ul>
</div></li></ul>
If <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> is empty,
then all such substitutions are allowed;
if it contains the keyword <b><i>restriction</i></b>, then no type definition is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var> if its derivation from <var>T</var> involves
any restriction steps;
if <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> contains
the keyword <b><i>extension</i></b>, then no type definition is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var> if its derivation from <var>T</var> involves
any extension steps.</div><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
In version 1.0 of this specification, <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>
of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> is only used when type substitution
(<code>xsi:type</code>) or element substitution (substitution groups) appear in
the instance document. It has been changed to take effect whenever complex type
derivation is checked, including cases beyond type and element substitutions in
instance documents. In particular, it affects
clause <a href="#c-vs-sg" shape="rect">4</a> of <a href="#e-props-correct" shape="rect">Element Declaration Properties Correct (&#167;3.3.6.1)</a>,
clause <a href="#c-vs-ctd-e" shape="rect">1.6</a> of <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>,
clause <a href="#c-vs-ctd-r" shape="rect">4</a> of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>,
and clause <a href="#c-vs-ct" shape="rect">4.5</a> of <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a>.
Because of the consideration of <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>,
existing schemas may be rendered invalid by the above rules. The XML Schema Working Group
solicits input from implementors and users of this specification as to whether
this change is desirable and acceptable.
</span></p></div><p><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> constrain
elements and attributes
to exist, not to exist, or to
have specified values.
Though specified as a sequence, the order
among the assertions is not significant during assessment.
See <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#ctd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-type" id="declare-type" shape="rect"></a>3.4.2 XML Representation of Complex Type Definition Schema Components</h4><p>The XML representation for a complex type definition schema component is a
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item.</p><p>The XML representation for complex type definitions with a
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
<b><i>simple</i></b> is significantly different from that
of those with other <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>s, and this is reflected in the presentation below,
which describes
the mappings for the two cases in separate subsections.
Common mapping rules are factored out and given in
separate sections.
As always, the mapping rules
given here apply after, not before, the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>complexType</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-complexType" name="element-complexType" shape="rect">&lt;complexType</a><br clear="none" />&#160;&#160;abstract = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;block =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
<br clear="none" />&#160;&#160;final =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;defaultAttributesApply = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;true<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleContent" class="eltref" shape="rect">simpleContent</a> | <a href="#element-complexContent" class="eltref" shape="rect">complexContent</a> | (<a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, (<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)))<br clear="none" />&lt;/complexType&gt;</p></div></div><div class="note"><div class="p"><b>Note:</b>
It is
a consequence of the concrete syntax given above that
a top-level
type definition need consist of no more than a name, i.e. that
<code>&lt;complexType name="anyThing"/&gt;</code> is allowed.
</div></div><div class="note"><div class="p"><b>Note:</b>
Aside from the simple coherence requirements outlined below, the requirement that type
definitions identified as restrictions actually <em>be</em>
restrictions &#8212; that is, the requirement that they accept
as valid only a subset of the items which are accepted as valid
by their base type definition &#8212; is enforced in <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components (&#167;3.4.6)</a>.</div></div><div class="block">The following sections describe
different sets of mapping rules for complex types; some
are common to all or many source declarations, others
only in specific circumstances.
<ul><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> element as a child,
then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
rules in
<ul><li><div class="p"><a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content (&#167;3.4.2.2)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
</div></li><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
has a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> element as a child,
then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
rules in
<ul><li><div class="p"><a href="#dcl.ctd.ctcc.explicit" shape="rect">Mapping Rules for Complex Types with Explicit Complex Content (&#167;3.4.2.3.1)</a>, </div></li><li><div class="p"><a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>, </div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
</div></li><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
has neither a
<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor a
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> element as a child,
then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
rules in
<ul><li><div class="p"><a href="#dcl.ctd.ctcc.implicit" shape="rect">Mapping Rules for Complex Types with Implicit Complex Content (&#167;3.4.2.3.2)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
</div></li></ul>
</div><p>Where convenient, the mapping rules are
described exclusively in terms of the schema document's
information set. The mappings, however, depend not only upon
the source declaration but also upon the schema context. Some
mappings, that is, depend on the properties of other components
in the schema. In particular, several of the mapping rules
given in the following sections depend upon the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> having
been identified before they apply.</p><div class="div4">
<h5><a name="dcl.ctd.common" id="dcl.ctd.common" shape="rect"></a>3.4.2.1 Common Mapping Rules for Complex Type Definitions</h5><p id="xr.ct1">Whichever
alternative for the content of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> is
chosen, the following property mappings
apply.
Except where otherwise specified, attributes and child
elements are to be sought among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor element information item if present,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>abstract</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a></div><div class="mapRepr">A set
corresponding to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>block</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, if present,
otherwise on the empty string. Call this the
<b>EBV</b> (for effective block value). Then the
value of this property is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <b>EBV</b> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b>the <b>EBV</b> is <code>#all</code>, <b>then </b><code>{</code><b><i>extension</i></b>,
<b><i>restriction</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>a set with members drawn from the set
above, each being present or absent depending on whether
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (which is a list) contains an equivalently
named item.
<div class="note"><div class="p"><b>Note:</b> Although the <code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <span class="rfc2119">may</span> include values other than
<b><i>restriction</i></b> or <b><i>extension</i></b>, those values
are ignored in the determination of <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> for complex type
definitions (they <em>are</em> used elsewhere).</div></div>
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-final" class="propref" shape="rect">{final}</a></div><div class="mapRepr">As for <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> above, but using the
<code>final</code> and <code>finalDefault</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> in place of the <code>block</code> and
<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-context" class="propref" shape="rect">{context}</a></div><div class="mapRepr"><a name="anchor11290b" id="anchor11290b" shape="rect"></a>
If the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (among the ancestor element information
items there will be a nearest <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>),
the <a href="#ed" class="compref" shape="rect">Element Declaration</a>
corresponding to
the nearest <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
information item among the
the ancestor element information items.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a></div><div class="mapRepr">
A sequence whose members are <a href="#as" class="compref" shape="rect">Assertion</a>s drawn from the following sources, in order:
<div class="constraintlist"><div class="clnumber">1 <span class="p">The
<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">2 <span class="p"><a href="#as" class="compref" shape="rect">Assertion</a>s corresponding to
all the <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element
information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> and <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>, if
any, in document
order.
</span></div>
</div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of
elements containing the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, if present, the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, the <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, and their <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> and <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, and their <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div><div class="note"><div class="p"><b>Note:</b>
If the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a
complex type definition, then the <a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> always
contain members of the
<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, no matter which
alternatives are chosen in the XML representation,
<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>,
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>.
</div></div></div><div class="div4">
<h5><a name="dcl.ctd.ctsc" id="dcl.ctd.ctsc" shape="rect"></a>3.4.2.2 Mapping Rules for Complex Types with Simple Content</h5><p id="xr.ct3">When the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
source declaration has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>
child, the
following elements are relevant
(as are <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>,
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>, and
<a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>),
and the
property
mappings are as below,
supplemented by the mappings in
<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>,
and <a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.
Note that either
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <span class="rfc2119">must</span>
appear in
the content of <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>.</p>
<div class="reprdef">
<div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>simpleContent</code>&#160;Element Information Item et al.</div>
<div class="reprBody">
<p class="element-syntax-1"><a id="element-simpleContent"
name="element-simpleContent" shape="rect">&lt;simpleContent</a><br
clear="none" />&#160;&#160;id = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID"
shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes
with non-schema namespace . . .}</em>&gt;<br clear="none"
/><em>&#160;&#160;Content: </em>(<a href="#element-annotation"
class="eltref" shape="rect">annotation</a>?, (<a
href="#element-simpleContent..restriction" class="eltref"
shape="rect">restriction</a> | <a
href="#element-simpleContent..extension" class="eltref"
shape="rect">extension</a>))<br clear="none"
/>&lt;/simpleContent&gt;</p>
<p class="element-syntax"><a id="element-simpleContent..restriction"
name="element-simpleContent..restriction"
shape="rect">&lt;restriction</a><br clear="none"
/>&#160;&#160;<b>base</b> = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName"
shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID"
shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes
with non-schema namespace . . .}</em>&gt;<br clear="none"
/><em>&#160;&#160;Content: </em>(<a href="#element-annotation"
class="eltref" shape="rect">annotation</a>?, (<a
href="#element-simpleType" class="eltref"
shape="rect">simpleType</a>?, (<a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minExclusive"
class="eltref" shape="rect">minExclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minInclusive"
class="eltref" shape="rect">minInclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxExclusive"
class="eltref" shape="rect">maxExclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxInclusive"
class="eltref" shape="rect">maxInclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-totalDigits"
class="eltref" shape="rect">totalDigits</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-fractionDigits"
class="eltref" shape="rect">fractionDigits</a> | <!--* <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxScale"
class="eltref" shape="rect">maxScale</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minScale"
class="eltref" shape="rect">minScale</a> | *-->
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-length"
class="eltref" shape="rect">length</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minLength"
class="eltref" shape="rect">minLength</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxLength"
class="eltref" shape="rect">maxLength</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration"
class="eltref" shape="rect">enumeration</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-whiteSpace"
class="eltref" shape="rect">whiteSpace</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern"
class="eltref" shape="rect">pattern</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-assertion"
class="eltref" shape="rect">assertion</a> | <em>{any with namespace:
##other}</em>)*)?, ((<a href="#element-attribute" class="eltref"
shape="rect">attribute</a> | <a href="#element-attributeGroup"
class="eltref" shape="rect">attributeGroup</a>)*, <a
href="#element-anyAttribute" class="eltref"
shape="rect">anyAttribute</a>?), <a href="#element-assert"
class="eltref" shape="rect">assert</a>*)<br clear="none"
/>&lt;/restriction&gt;</p>
<p class="element-syntax"><a id="element-simpleContent..extension" name="element-simpleContent..extension" shape="rect">&lt;extension</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)<br clear="none" />&lt;/extension&gt;</p>
</div>
</div>
<p>When
the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
element has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> child, then
the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element maps to a complex type with
simple content, as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with simple content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">The type
definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
on the
<a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or
<a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> element appearing as a child of
<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">If the
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative
is chosen, then <b><i>restriction</i></b>, otherwise (the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is
chosen) <b><i>extension</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="mapRepr">
A <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>simple</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal">the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is a
complex type definition whose own <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
<b><i>simple</i></b> and the <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative
is chosen, <b>then </b><a name="anchor11290c" id="anchor11290c" shape="rect"></a>
let <var>B</var> be
<div class="constraintlist"><div class="clnumber">1.1<a id="std1cl" name="std1cl" shape="rect"> </a><span class="p">the simple type definition corresponding to the
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> if there is one;</span></div>
<div class="clnumber">1.2<a id="std2cl" name="std2cl" shape="rect"> </a><span class="p">otherwise (<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> has no <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>), the
simple type definition which is the <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
</span></div>
</div> a simple type definition
as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item if present,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal">The <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
whose
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
is being defined</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><var>B</var></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">a set of facet components corresponding
to the appropriate element information items among the
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e.
those which specify facets, if any), as defined in
<a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>;</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">Based on
<a href="#std-variety" class="propref" shape="rect">{variety}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>,
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, a set of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ff" class="compref" shape="rect">Fundamental Facet</a> components, one each as
specified in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-ordered" shape="rect">The ordered Schema
Component </a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-bounded" shape="rect">The
bounded Schema Component </a>,
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-cardinality" shape="rect">The cardinality Schema
Component </a> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-numeric" shape="rect">The
numeric Schema Component </a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><var>B</var>.<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><var>B</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><var>B</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div>
</div><div class="clnumber">2 <b>If </b>the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is a
complex type definition whose own <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>mixed</i></b> and <a href="#ct-particle" class="propref" shape="rect">{particle}</a> a <a href="#p" class="compref" shape="rect">Particle</a> which is
<a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a>, as
defined in <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a> and the
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
alternative is chosen, <b>then </b> (let <var>S</var><sub><var>B</var></sub>
be the simple type definition corresponding to
the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> if any, otherwise
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>) a simple type definition which
restricts <var>S</var><sub><var>B</var></sub> with a set of facet
components corresponding to the appropriate element
information items among the <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e. those
which specify facets, if any), as defined in <a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>;
<div class="note"><div class="p"><b>Note:</b>
If there is no <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> (and if therefore
<var>S</var><sub><var>B</var></sub> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the result will be a simple type definition component
which fails to obey the constraints on simple type definitions, including
for example clause <a href="#c-base_atomic" shape="rect">1.1</a> of
<a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a>.
</div></div></div><div class="clnumber">3 <b>If </b>the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is a
complex type definition whose own
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b> and the
<a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is chosen, <b>then </b>
the <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> of the
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
that complex type definition;</div><div class="clnumber">4 <b>If </b>the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is a
simple type definition and the
<a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
alternative is chosen, <b>then </b>that simple type definition;</div><div class="clnumber">5<a id="c-ctsc-bad" name="c-ctsc-bad" shape="rect"> </a><b>otherwise </b><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div></div></div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.ctcc" id="dcl.ctd.ctcc" shape="rect"></a>3.4.2.3 Mapping Rules for Complex Types with Complex Content</h5><p id="xr.ct10">When the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
element does not have a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> child
element, then it maps to a complex type with complex
content. The
following elements are relevant (as are the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>,
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>,
and <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
elements,
which are described
more fully in
<a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>,
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and
<a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a>, respectively, and which are
not repeated here), and the additional property
mappings are as below, supplemented
by the mappings in
<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>,
<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>,
<a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations (&#167;3.2.2.2)</a>, and
<a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations (&#167;3.2.2.3)</a>. Note that either
<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <span class="rfc2119">must</span>
appear in
the content of <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>, but their
content
models are different in this case from the case above when they
occur as children of
<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>.</p><p id="xr.ct11">
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>complexContent</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-complexContent" name="element-complexContent" shape="rect">&lt;complexContent</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-complexContent..restriction" class="eltref" shape="rect">restriction</a> | <a href="#element-complexContent..extension" class="eltref" shape="rect">extension</a>))<br clear="none" />&lt;/complexContent&gt;</p><p class="element-syntax"><a id="element-complexContent..restriction" name="element-complexContent..restriction" shape="rect">&lt;restriction</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, (<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)<br clear="none" />&lt;/restriction&gt;</p><p class="element-syntax"><a id="element-complexContent..extension" name="element-complexContent..extension" shape="rect">&lt;extension</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, ((<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*))<br clear="none" />&lt;/extension&gt;</p><p class="element-syntax"><a id="element-openContent" name="element-openContent" shape="rect">&lt;openContent</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mode = (<var>none</var> | <var>interleave</var> | <var>suffix</var>)&#160;:&#160;interleave<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-any" class="eltref" shape="rect">any</a>?)<br clear="none" />&lt;/openContent&gt;</p></div></div><p>Complex types with complex content can
be the image of two different forms of
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element: one with a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> child (discussed in
<a href="#dcl.ctd.ctcc.explicit" shape="rect">Mapping Rules for Complex Types with Explicit Complex Content (&#167;3.4.2.3.1)</a>), and one with neither
<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> as a child (discussed in
<a href="#dcl.ctd.ctcc.implicit" shape="rect">Mapping Rules for Complex Types with Implicit Complex Content (&#167;3.4.2.3.2)</a>).
The mapping of the
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> is the same
in both cases; it is described in
<a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>.
</p><div class="div5">
<h6><a name="dcl.ctd.ctcc.explicit" id="dcl.ctd.ctcc.explicit" shape="rect"></a>3.4.2.3.1 Mapping Rules for Complex Types with Explicit Complex Content</h6><p>When the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
source declaration has a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
child, the following mappings apply, supplemented by those
specified in
<a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>,
<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>,
and
<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">The type
definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">If the
<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
alternative is chosen, then <b><i>restriction</i></b>, otherwise
(the <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is
chosen) <b><i>extension</i></b>.</div></div></div></div><div class="div5">
<h6><a name="dcl.ctd.ctcc.implicit" id="dcl.ctd.ctcc.implicit" shape="rect"></a>3.4.2.3.2 Mapping Rules for Complex Types with Implicit Complex Content</h6><p>When the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
has neither <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> as a child, it is taken
as shorthand for complex content restricting
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>. The mapping rules specific to this
situation are as follows; the mapping rules for properties
not described here are as given in
<a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>,
<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>,
and
<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">
<b><i>restriction</i></b>
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div5">
<h6><a name="dcl.ctd.ctcc.common" id="dcl.ctd.ctcc.common" shape="rect"></a>3.4.2.3.3 Mapping Rules for Content Type Property of Complex Content</h6><p>For complex types with complex content,
the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> property is
calculated as follows. (For the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> on complex types with simple content,
see <a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content (&#167;3.4.2.2)</a>.)
</p><div class="note"><div class="p"><b>Note:</b> The mapping rule below refers here and there to elements
not necessarily present within a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
source declaration. For purposes of evaluating tests like
"If the <code>abc</code> attribute is present
on the <code>xyz</code> element", if no <code>xyz</code>
element information item is present, then no
<code>abc</code> attribute is present on the
(non-existent) <code>xyz</code> element.</div><div class="p">When the mapping rule below refers to "the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>", then for a
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration with a
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> child, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
of <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
or <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> (whichever
appears as a child of <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>) are meant. If no <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> is present, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source
declaration itself are meant.
</div><div class="p">The mapping rule also refers to the value of the
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
property, whose value is determined as specified in
the preceding sections.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="mapRepr">
<div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-efm" id="key-efm" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>effective mixed</b> be
</span>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1<a id="ccmixed" name="ccmixed" shape="rect"> </a><b>If </b>the <code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present on <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">1.2<a id="ctmixed" name="ctmixed" shape="rect"> </a><b>If </b>the <code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present on
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">1.3 <b>otherwise </b><code>false</code>.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of clause <a href="#ccmixed-eq-ctmixed" shape="rect">5</a> of
<a href="#src-ct" shape="rect">Complex Type Definition Representation OK (&#167;3.4.3)</a> that
clause <a href="#ccmixed" shape="rect">1.1</a> and
clause <a href="#ctmixed" shape="rect">1.2</a> above will never contradict
each other in a conforming schema document.</div></div></div>
<div class="clnumber">2 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-expcon" id="key-expcon" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>explicit content</b> be
</span>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1<a id="c-cme-bis" name="c-cme-bis" shape="rect"> </a><b>If </b>
at least
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1.1 <span class="p">There is no <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>;</span></div>
<div class="clnumber">2.1.2 <span class="p">There is an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> with no
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of its own excluding <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>;</span></div>
<div class="clnumber">2.1.3 <span class="p">There is among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> a <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> element
whose <code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
has the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>0</code>
and which has no
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of its own except for <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>;
</span></div>
<div class="clnumber">2.1.4 <span class="p">The
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>
element
among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> has a <code>maxOccurs</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> with an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of 0;</span></div>
</div>
<b>then </b><b><i>empty</i></b></div><div class="clnumber">2.2 <b>otherwise </b>the particle corresponding to the
<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>,
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or
<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div></div></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
<span class="termdef"><a name="key-exg" id="key-exg" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>effective content</b> be
</span>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1<a id="c-cme" name="c-cme" shape="rect"> </a><b>If </b>
the <a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b>
, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1.1 <b>If </b>the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
mixed<span class="arrow">&#183;</span></a> is <code>true</code>, <b>then </b>A particle whose properties are as
follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">
a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b> and whose
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is empty.
</div></div></div>
</div><div class="clnumber">3.1.2 <b>otherwise </b><b><i>empty</i></b></div></div></div><div class="clnumber">3.2 <b>otherwise </b>the <a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a>.</div></div></div>
<div class="clnumber">4 <!--* no span class='p' possible here *-->
<span class="termdef"><a name="key-ect" id="key-ect" title="" shape="rect">[Definition:]&#160;&#160;</a>
Let the <b>explicit content type</b>
be</span>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1<a id="c-ctr" name="c-ctr" shape="rect"> </a><b>If </b>
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1.1<a id="c-ctr-empty" name="c-ctr-empty" shape="rect"> </a><b>If </b>the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b> , <b>then </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>empty</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div><div class="clnumber">4.1.2<a id="c-ctrp" name="c-ctrp" shape="rect"> </a><b>otherwise </b>a <a href="#ct" class="compref" shape="rect">Content Type</a>
as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b> if
the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
mixed<span class="arrow">&#183;</span></a> is <code>true</code>, otherwise
<b><i>element-only</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">The <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
content<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div>
</div><div class="clnumber">4.2<a id="ct-extension" name="ct-extension" shape="rect"> </a><b>If </b>
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.2.1<a id="c-ctes" name="c-ctes" shape="rect"> </a><b>If </b>the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a simple type
definition or is a complex type definition whose
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b> or
<b><i>simple</i></b>, <b>then </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as per
clause <a href="#c-ctr-empty" shape="rect">4.1.1</a>
and clause <a href="#c-ctrp" shape="rect">4.1.2</a> above;</div><div class="clnumber">4.2.2 <b>If </b>the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a complex type
definition whose <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>element-only</i></b> or <b><i>mixed</i></b> and the
<a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b>, <b>then </b><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>;</div><div class="clnumber">4.2.3 <b>otherwise </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as
follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b>
if
the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
mixed<span class="arrow">&#183;</span></a> is <code>true</code>, otherwise
<b><i>element-only</i></b>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">
<span class="termdef"><a name="key-baseparticle" id="key-baseparticle" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>base particle</b> be
the particle of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span> Then
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.2.3.1 <b>If </b>the
<a href="#p-term" class="propref" shape="rect">{term}</a> of
the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base particle<span class="arrow">&#183;</span></a> has
<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> <b><i>all</i></b> and the
<a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a> is empty, <b>then </b>the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base particle<span class="arrow">&#183;</span></a>.</div><div class="clnumber">4.2.3.2 <b>If </b>the
<a href="#p-term" class="propref" shape="rect">{term}</a> of
the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base particle<span class="arrow">&#183;</span></a> has
<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
<b><i>all</i></b> and the <a href="#p-term" class="propref" shape="rect">{term}</a> of the
<a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a> also has <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
<b><i>all</i></b>, <b>then </b>a <a href="#p" class="compref" shape="rect">Particle</a> whose properties are
as follows: <div class="glist"><div class="gitem"><div class="giLabel"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="giDef"><div class="p">the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>
of the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="giDef"><div class="p">a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
<b><i>all</i></b> and whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a> are the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of the
<a href="#p-term" class="propref" shape="rect">{term}</a> of the
<a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base particle<span class="arrow">&#183;</span></a> followed
by the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of the <a href="#p-term" class="propref" shape="rect">{term}</a> of the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>. </div></div></div></div>
</div><div class="clnumber">4.2.3.3<a id="c-suffix-extension" name="c-suffix-extension" shape="rect"> </a><b>otherwise </b>
<div class="glist"><div class="gitem"><div class="giLabel"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="giDef"><div class="p">
a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b>
and whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a> are the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base particle<span class="arrow">&#183;</span></a> followed by the
<a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>.
</div></div></div></div>
</div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal">
the <a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of the
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div></div></div>
</div></div></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->
<span class="termdef"><a name="key-we" id="key-we" title="" shape="rect">[Definition:]&#160;&#160;</a>
Let the <b>wildcard element</b> be</span>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">5.1 <b>If </b>
the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> is present
, <b>then </b>
the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.
</div><div class="clnumber">5.2 <b>If </b>
the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> is not
present,
the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a
<a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p">
the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> &#8800; <b><i>empty</i></b>
</span></div>
<div class="clnumber">5.2.2 <span class="p">
the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b> and the <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> element has
<code>appliesToEmpty</code> = <b><i>true</i></b>
</span></div>
</div>
<b>then </b>
the <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>.
</div><div class="clnumber">5.3 <b>otherwise </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div></div>
</div>
<div class="clnumber">6 <!--* no span class='p' possible here *-->
Then the value of the property is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">6.1 <b>If </b>
the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
or is present and has
<code>mode</code> = <code>'none'</code>
, <b>then </b>
the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">6.2 <b>otherwise </b>
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">
The <a href="#ct-variety" class="propref" shape="rect">{variety}</a> of the
<a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> if it's not <b><i>empty</i></b>;
otherwise <b><i>element-only</i></b>.
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">
The <a href="#ct-particle" class="propref" shape="rect">{particle}</a> of the
<a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> if the <a href="#ct-variety" class="propref" shape="rect">{variety}</a> of the
<a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> is not <b><i>empty</i></b>;
otherwise a <a href="#p" class="compref" shape="rect">Particle</a>
as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">
a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b> and whose
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is empty.
</div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal">
An <a href="#oc" class="compref" shape="rect">Open Content</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#oc-mode" class="propref" shape="rect">{mode}</a></div><div class="pvVal">
The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>mode</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
of the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a>, if present,
otherwise <b><i>interleave</i></b>.
</div></div><div class="pvpair"><div class="pvProp"><a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a></div><div class="pvVal">
Let <var>W</var> be the
wildcard corresponding to the <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> of the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a>.
If the
<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of the
<a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then <var>W</var>; otherwise
a wildcard whose <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a>
and <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> are those of <var>W</var>, and whose
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> is the
wildcard union of the
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> of <var>W</var> and
of <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a> of
the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a>, as defined in
<a href="#cos-aw-union" shape="rect">Attribute Wildcard Union (&#167;3.10.6.3)</a>.
</div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal">
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
</div></div></div>
</div></div>
</div>
</div>
</div></div></div><div class="note"><a name="xr.ctd.n4-bis" id="xr.ctd.n4-bis" shape="rect"></a><div class="p"><b>Note:</b>
It is a consequence of clause <a href="#ct-extension" shape="rect">4.2</a> above that
when a type definition is extended, the same particles appear
in both the base type definition and the extension;
the particles are reused without being copied.
</div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.attuses" id="dcl.ctd.attuses" shape="rect"></a>3.4.2.4 Mapping Rule for Attribute Uses Property</h5><p>Any <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
source declaration can have <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements as
children, or descendants. The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>
element is described in
<a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>
and will not be repeated here.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attributeGroup</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-simpleContent..attributeGroup" name="element-simpleContent..attributeGroup" shape="rect">&lt;attributeGroup</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>ref</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/attributeGroup&gt;</p></div></div><p>The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements map to
the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
property of the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> component
as described below. This mapping rule
is the same for all complex type definitions.
</p><div class="note"><div class="p"><b>Note:</b> In the following rule, references to "the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>" refer to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
or <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
element (whichever
appears as a child of <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> in the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration),
if present, otherwise to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration itself.
</div><div class="p">The rule also refers to the value of the
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
property, which is described elsewhere.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition (Attribute Uses)</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="mapRepr">
<p> If the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a
<code>defaultAttributes</code> attribute, and the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element does not have
<code>defaultAttributesApply</code> =
<code>false</code>, then the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
property is
computed as if there were an
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> with empty content
and a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the
same as that of the
<code>defaultAttributes</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> appearing after any other
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>. Otherwise proceed as if there were no such
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>. </p> Then the value is a union of sets of
attribute uses as follows
<div class="constraintlist"><div class="clnumber">1<a id="c-add1" name="c-add1" shape="rect"> </a><span class="p">The set of attribute uses corresponding to the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.</span></div>
<div class="clnumber">2<a id="c-add2" name="c-add2" shape="rect"> </a><span class="p">The <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> of the
attribute groups <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the
<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
The attribute uses "inherited" from the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>T</var>, as described by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>T</var> is a complex type definition and
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>the attribute
uses in <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
are inherited.</div><div class="clnumber">3.2 <b>If </b><var>T</var> is a
complex type definition and
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>the attribute uses in
<var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> are
inherited, with the exception of those with an <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> whose
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is
<b>one</b> of the following:<div class="constraintlist"><div class="clnumber">3.2.1<a id="att-locally-specified" name="att-locally-specified" shape="rect"> </a><span class="p">the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of an attribute use
which has already been included in the set, following
the rules in clause <a href="#c-add1" shape="rect">1</a> or clause <a href="#c-add2" shape="rect">2</a> above;</span></div>
<div class="clnumber">3.2.2<a id="att-prohibited" name="att-prohibited" shape="rect"> </a><span class="p">the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of what would have
been an attribute use corresponding to an <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, if the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> had not had <code>use</code> =
<b><i>prohibited</i></b>.</span><div class="note"><div class="p"><b>Note:</b> This sub-clause handles the case where the
base type definition <var>T</var> allows the attribute
in question, but the restriction prohibits it.</div></div></div>
</div>
</div><div class="clnumber">3.3 <b>otherwise </b>no attribute use
is inherited.</div></div>
</div>
</div>
</div></div></div><div class="note"><a name="xr.ctd.n3bis" id="xr.ctd.n3bis" shape="rect"></a><div class="p"><b>Note:</b>
The <em>only</em> substantive function of the value
<b><i>prohibited</i></b> for the <code>use</code> attribute of an
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> is in
establishing the correspondence between a complex type defined
by restriction and its XML representation. It serves to
prevent inheritance of an identically named attribute use from
the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>. Such an <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> does not correspond to any component, and
hence there is no interaction with either explicit or
inherited wildcards in the operation of <a href="#formal-complex-type" shape="rect">Complex Type Definition Validation Rules (&#167;3.4.4)</a> or <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components (&#167;3.4.6)</a>.
It is pointless, though not an
error, for the <code>use</code> attribute to have the value
<b><i>prohibited</i></b> in other contexts (e.g. in complex type
extensions or named model group definitions), in which cases
the &lt;attribute&gt; element is simply ignored, provided that
it does not violate other constraints in this
specification.</div></div></div><div class="div4">
<h5><a name="dcl.ctd.anyatt" id="dcl.ctd.anyatt" shape="rect"></a>3.4.2.5 Mapping Rule for Attribute Wildcard Property</h5><p>The <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>
property of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> depends on the
<a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element which may be present
within the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element
or within the attribute groups referred to
within <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>.
The <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
element is described in the preceding section
<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>
and will not be repeated here.
</p><div class="note"><div class="p"><b>Note:</b> The following mapping rule
is the same for all complex type definitions.
</div><div class="p">References to "the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>" refer to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
or <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
element (whichever
appears as a child of <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or
<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> in the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration),
if present, otherwise to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration itself.
</div><div class="p">The rule also refers to the value of the
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
property, which is described elsewhere.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition (Attribute Wildcard)</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="mapRepr">
<p>If the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a
<code>defaultAttributes</code> attribute, and the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element does not have
<code>defaultAttributesApply</code> = <code>false</code>, then the
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> property is computed
as if there were an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> with empty content and a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the same as that of the
<code>defaultAttributes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> appearing after any
other <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>. Otherwise proceed as if there were no such
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.</p>
<div class="constraintlist"><div class="clnumber">1 <span class="p"><span class="termdef"><a name="key-eaw" id="key-eaw" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>complete wildcard</b> be the
<a href="#w" class="compref" shape="rect">Wildcard</a> computed as described in
<a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards (&#167;3.6.2.2)</a>.</span>
</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->The value is then determined by
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete
wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2 <b>If </b>
<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>
<div class="constraintlist"><div class="clnumber">2.2.1 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-baw" id="key-baw" title="" shape="rect">[Definition:]&#160;&#160;</a>let the <b>base wildcard</b> be
defined as</span>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.2.1.1 <b>If </b>the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is a complex type definition with an
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b>that <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.</div><div class="clnumber">2.2.1.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
</div>
<div class="clnumber">2.2.2 <!--* no span class='p' possible here *-->The value is then determined by
the first <b>case</b> among the following which applies:<div class="constraintlist"><div class="clnumber">2.2.2.1 <b>If </b>the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2.2.2 <b>If </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2.2.3 <b>otherwise </b>
a wildcard whose <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> and
<a href="#w-annotations" class="propref" shape="rect">{annotations}</a> are those of the
<a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a>, and whose <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
is the wildcard union of the <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
of the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a> and of the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a>, as
defined in <a href="#cos-aw-union" shape="rect">Attribute Wildcard Union (&#167;3.10.6.3)</a>.
</div></div></div>
</div>
</div></div></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.exx" id="dcl.ctd.exx" shape="rect"></a>3.4.2.6 Examples of Complex Type Definitions</h5><div class="exampleOuter">
<div class="exampleHeader">Example: Three ways to define a type for length</div>
<div class="exampleWrapper">
<p>The following declaration defines a type for specifications of length
by creating a complex type with simple content, with
<code>xs:nonNegativeInteger</code> as the type of the
content, and a <code>unit</code> attribute to give the
unit of measurement.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length1"&gt;
&lt;xs:simpleContent&gt;
&lt;xs:extension base="xs:nonNegativeInteger"&gt;
&lt;xs:attribute name="unit" type="xs:NMTOKEN"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="width" type="length1"/&gt;
</pre></div><div class="exampleWrapper">
<p>An instance using this type might look like this:</p></div><div class="exampleInner">
<pre xml:space="preserve"> &lt;width unit="cm"&gt;25&lt;/width&gt;
</pre></div><div class="exampleWrapper">
<p>A second approach to defining length
uses two elements, one for size and one for the unit of
measure. The definition of the type and the
declaration of the element might look like this:
</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length2"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:anyType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
&lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="depth" type="length2"/&gt;
</pre></div><div class="exampleWrapper">
<p>An instance using this method might look like this:</p></div><div class="exampleInner">
<pre xml:space="preserve"> &lt;depth&gt;
&lt;size&gt;25&lt;/size&gt;&lt;unit&gt;cm&lt;/unit&gt;
&lt;/depth&gt;</pre></div><div class="exampleWrapper">
<p>A third definition of type leaves the base type
implicit; at the component level, the following declaration
is equivalent to the preceding one.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length3"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
&lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</pre></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="title" minOccurs="0"/&gt;
&lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:element name="surname"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="extendedName"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="generation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="addressee" type="extendedName"/&gt;
&lt;addressee&gt;
&lt;forename&gt;Albert&lt;/forename&gt;
&lt;forename&gt;Arnold&lt;/forename&gt;
&lt;surname&gt;Gore&lt;/surname&gt;
&lt;generation&gt;Jr&lt;/generation&gt;
&lt;/addressee&gt;</pre></div><div class="exampleWrapper">
<div class="p">A type definition for personal names, and a definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by
extension which adds a single element; an element declaration referencing the
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> definition, and a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> instance thereof.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="simpleName"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="forename" minOccurs="1" maxOccurs="1"/&gt;
&lt;xs:element name="surname"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="who" type="simpleName"/&gt;
&lt;who&gt;
&lt;forename&gt;Bill&lt;/forename&gt;
&lt;surname&gt;Clinton&lt;/surname&gt;
&lt;/who&gt;</pre></div><div class="exampleWrapper">
<div class="p">A simplified type definition
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the base type from the previous example by restriction, eliminating
one optional child and
fixing another to occur exactly once; an element declared by reference to it,
and a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> instance thereof.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="paraType" mixed="true"&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element ref="emph"/&gt;
&lt;xs:element ref="strong"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute name="version" type="xs:decimal"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">An illustration of the abbreviated form, with the
<code>mixed</code> attribute appearing on <code>complexType</code> itself.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="name"&gt;
&lt;xs:openContent&gt;
&lt;xs:any namespace="##other" processContents="skip"/&gt;
&lt;/xs:openContent&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="given" type="xs:string"/&gt;
&lt;xs:element name="middle" type="xs:string" minOccurs="0"/&gt;
&lt;xs:element name="family" type="xs:string"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
A complex type definition that
allows three explicitly declared child
elements, in the specified order (but not necessarily adjacent), and
furthermore allows additional elements of any name from any namespace other
than the target namespace to appear anywhere in the children.
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">To restrict away a local element declaration that <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with
a wildcard, use a wildcard in the derived type that explicitly
disallows the element's <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>. For example:</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="computer"&gt;
&lt;xs:all&gt;
&lt;xs:element name="CPU" type="CPUType"/&gt;
&lt;xs:element name="memory" type="memoryType"/&gt;
&lt;xs:element name="monitor" type="monitorType"/&gt;
&lt;xs:element name="speaker" type="speakerType"
minOccurs="0"/&gt;
&lt;!-- Any additional information about the computer --&gt;
&lt;xs:any processContents="lax"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:all&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="quietComputer"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="computer"&gt;
&lt;xs:all&gt;
&lt;xs:element name="CPU" type="CPUType"/&gt;
&lt;xs:element name="memory" type="memoryType"/&gt;
&lt;xs:element name="monitor" type="monitorType"/&gt;
&lt;!-- Any additional information about the computer --&gt;
&lt;xs:any processContents="lax" notQName="speaker"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:all&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The restriction type <code>quietComputer</code> has
a <b><i>lax</i></b> wildcard, which <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> any element but one with the name
<code>speaker</code>.</div></div><div class="exampleWrapper">
<div class="p">Without the specification of the <code>notQName</code> attribute,
the wildcard would <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> elements named
<code>speaker</code>, as well. In that case, the restriction
would be valid only if there is a
top-level declaration for <code>speaker</code> that also has type
<code>speakerType</code> or a type derived from it.
Otherwise, there would be instances locally valid against the restriction
<code>quietComputer</code> that are not locally valid against the base type
<code>computer</code>.</div></div><div class="exampleWrapper">
<div class="p">
For example, if there is no <code>notQName</code> attribute on the wildcard and
no top-level declaration for <code>speaker</code>, then the following is allowed
by <code>quietComputer</code>, but not by <code>computer</code>:
</div></div><div class="exampleInner">
<pre xml:space="preserve"> &lt;speaker xsi:type="xs:string"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The specific rule violated in this case
is clause <a href="#ctr-child-type-subsumption" shape="rect">2</a> of
constraint <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a> </div></div></div></div></div><div class="div3">
<h4><a name="sec-src-ct" id="sec-src-ct" shape="rect"></a>3.4.3 Constraints on XML Representations of Complex Type Definitions</h4><div class="constraintnote"><a id="src-ct" name="src-ct" shape="rect"></a><b>Schema Representation Constraint: Complex Type Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information items by the schema for schema documents,
<b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="simple-content-rules" name="simple-content-rules" shape="rect"> </a><span class="p">If the <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> alternative is chosen,
the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element <span class="rfc2119">must not</span>
have <code>mixed</code> = <b><i>true</i></b>.
</span></div>
<div class="clnumber">2 <span class="p">
<a name="anchor11222bx" id="anchor11222bx" shape="rect"></a>
If <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
is present under <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>, then
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
<span class="rfc2119">must not</span> include any two elements with the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> in the Schema (<code>xs</code>) namespace,
unless that <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is one of
<code>xs:enumeration</code>,
<code>xs:pattern</code>, or
<code>xs:assert</code>.
</span></div>
<div class="clnumber">3 <span class="p">
If <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> is present
and has
<code>mode</code> &#8800; <code>'none'</code>,
then there
<span class="rfc2119">must</span> be an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>.
</span></div>
<div class="clnumber">4 <span class="p">If <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> is present
and has <code>mode</code> = <code>'none'</code>,
then there <span class="rfc2119">must not</span> be an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>.
</span></div>
<div class="clnumber">5<a id="ccmixed-eq-ctmixed" name="ccmixed-eq-ctmixed" shape="rect"> </a><span class="p">
If the <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> alternative is chosen and the
<code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present on both
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>,
then <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> of those <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
<span class="rfc2119">must</span> be the same.
</span></div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="formal-complex-type" id="formal-complex-type" shape="rect"></a>3.4.4 Complex Type Definition Validation Rules</h4><div class="div4">
<h5><a name="sec-cdtt" id="sec-cdtt" shape="rect"></a>3.4.4.1 Locally Declared Type</h5><p>This section defines
the concept of
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>; this concept plays a role
in determining whether restrictions
and extensions of complex type definitions are legitimate.
The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
is also used to help determine the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> and
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of an element information item.</p><p>
<span class="termdef"><a name="key-ldtype" id="key-ldtype" title="" shape="rect">[Definition:]&#160;&#160;</a>
Every <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> determines a partial functional mapping from
element or attribute
information items (and their <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>) to type
definitions. This mapping serves as a <b>locally declared type</b>
for elements
and attributes which are allowed by
the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</span></p><p>
The attribute case is simpler and will be taken first.</p><div class="p">
<div class="termdef"><a name="key-ldt-att" id="key-ldt-att" title="" shape="rect">[Definition:]&#160;&#160;</a>
For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and a given attribute
information item <var>A</var>, the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>A</var> within <var>CTD</var> is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="dummy3" name="dummy3" shape="rect"> </a><b>If </b>
<var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<var>A</var> has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as some
attribute declaration <var>D</var> which is the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of some
<a href="#au" class="compref" shape="rect">Attribute Use</a> contained by <var>CTD</var>'s
<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
, <b>then </b>
the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
</div><div class="clnumber">3 <b>otherwise </b>
the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>A</var> within
<var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div>
</div>
</div><p>The definition for elements is slightly
more complex.</p><div class="p">
<div class="termdef"><a name="key-ldt-elem" id="key-ldt-elem" title="" shape="rect">[Definition:]&#160;&#160;</a>
For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
<var>CTD</var> and a given element information item <var>E</var>, the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>E</var> within <var>CTD</var> is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="dummy1" name="dummy1" shape="rect"> </a><b>If </b>
<var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<var>E</var>
has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
some element declaration <var>D</var> which is <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> by <var>CTD</var>'s
content model, whether <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>, <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>
, <b>then </b>
the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
</div><div class="clnumber">3 <b>otherwise </b>
the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>E</var> within
<var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> The constraint <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>
ensures that even if there is more than one such declaration
<var>D</var>, there will be just one type definition.
</div></div><div class="note"><div class="p"><b>Note:</b> The reference to <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicit<span class="arrow">&#183;</span></a>
containment ensures that if <var>E</var> has a
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for a declaration
<a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
by <var>CTD</var>'s content model, a
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
is defined for <var>E</var>.</div></div></div><div class="div4">
<h5><a name="sec-cvc-complex-type" id="sec-cvc-complex-type" shape="rect"></a>3.4.4.2 Element Locally Valid (Complex Type)</h5><div class="constraintnote"><a id="cvc-complex-type" name="cvc-complex-type" shape="rect"></a><b>Validation Rule: Element Locally Valid (Complex Type)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
complex type definition <var>T</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-cvct" name="c-cvct" shape="rect"> </a><!--* no span class='p' possible here *-->If <var>E</var> is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>, then <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>empty</i></b>, <b>then </b><var>E</var> has no character or element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div><div class="clnumber">1.2<a id="c-sv2" name="c-sv2" shape="rect"> </a><b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>simple</i></b>, <b>then </b><var>E</var> has no element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> of <var>E</var>
is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
to <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
as defined
by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="clnumber">1.3 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>element-only</i></b>, <b>then </b><var>E</var> has no character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> other
than those whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> is defined as
a <a href="http://www.w3.org/TR/xml11/#NT-S" shape="rect">white space</a>
in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
</div><div class="clnumber">1.4 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>element-only</i></b> or
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>mixed</i></b>, <b>then </b>the sequence of element
information items in
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, taken in order,
is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>,
as defined in
<a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>.</div></div></div>
<div class="clnumber">2<a id="c-aam" name="c-aam" shape="rect"> </a><!--* no span class='p' possible here *-->For each attribute information item <var>A</var>
in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
excepting those named <code>xsi:type</code>, <code>xsi:nil</code>,
<code>xsi:schemaLocation</code>, or <code>xsi:noNamespaceSchemaLocation</code>
(see <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>),
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-ctma" name="c-ctma" shape="rect"> </a><b>If </b>there is among the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> an
attribute use <var>U</var>
whose
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>
has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>A</var>
, <b>then </b><var>A</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to <var>U</var>
as per <a href="#cvc-au" shape="rect">Attribute Locally Valid (Use) (&#167;3.5.4)</a>.
In this case <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>
is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
declaration<span class="arrow">&#183;</span></a> for <var>A</var> with respect
to <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a> and
<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute) (&#167;3.2.5.1)</a>.
Also <var>A</var> is
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>U</var>.</div><div class="clnumber">2.2<a id="c-avaw" name="c-avaw" shape="rect"> </a><b>otherwise </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p">There is an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.</span></div>
<div class="clnumber">2.2.2 <span class="p"><var>A</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
to it as defined in <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.</span></div>
</div>
In this case <var>A</var> is
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.
</div></div>
</div>
<div class="clnumber">3<a id="c-ra" name="c-ra" shape="rect"> </a><span class="p">For each attribute use <var>U</var>
in <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>,
if <var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>true</i></b>,
then <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>
has the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
one of the attribute information items in
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence that
(with few exceptions)
each such <var>U</var> will have
the matching attribute information item
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> it by
clause <a href="#c-ctma" shape="rect">2.1</a> above.
The exceptions are
uses of <code>xsi:type</code> and the other
attributes named in
clause <a href="#c-ctma" shape="rect">2.1</a>; no
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a>
is performed for them.
</div></div></div>
<div class="clnumber">4 <span class="p">
For each <a href="#key-dflt-att" class="termref" shape="rect"><span class="arrow">&#183;</span>defaulted attribute<span class="arrow">&#183;</span></a>
<var>A</var> belonging to <var>E</var>,
the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> of
<var>A</var>'s
<a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to <var>A</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#a-type_definition" class="propref" shape="rect">{type definition}</a>
as defined by
<a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.
</span><div class="note"><div class="p"><b>Note:</b> When an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> is
present, this does <em>not</em> introduce any ambiguity with
respect to how attribute information items for which an attribute use
is present amongst the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> whose name and target namespace match are
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>. In such cases the attribute
use <em>always</em> takes precedence, and the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of such items stands or falls
entirely on the basis of the attribute use and its <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>. This follows from the details of
clause <a href="#c-aam" shape="rect">2</a>.</div></div></div>
<div class="clnumber">5 <span class="p">
For each element information item in
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
and each attribute information item in
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, if
neither the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> nor the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is the same as, or is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for, the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>, <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>without limitation<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">6<a id="c-as" name="c-as" shape="rect"> </a><span class="p"><var>E</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to each of the assertions in
<var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> as
per <a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a>.</span></div>
</div>
</div></div></div><div class="p">
<div class="termdef"><a name="key-dflt-att" id="key-dflt-att" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>defaulted attribute</b>
belonging to an element information item <var>E</var>
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governed by<span class="arrow">&#183;</span></a> a complex type <var>T</var>
is any <a href="#au" class="compref" shape="rect">Attribute Use</a>
<var>U</var>
for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>U</var> is a member of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>false</i></b>.
</span></div>
<div class="clnumber">3 <span class="p">
<var>U</var>'s <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">4 <span class="p">
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is not one
of the <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>s from <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>.
</span></div>
<div class="clnumber">5 <span class="p">
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> does not match
any of the
attribute information items in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
as per clause <a href="#c-ctma" shape="rect">2.1</a> of
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> above.
</span></div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-cvc-complex-content" id="sec-cvc-complex-content" shape="rect"></a>3.4.4.3 Element Sequence Locally Valid (Complex Content)</h5><div class="constraintnote"><a id="cvc-complex-content" name="cvc-complex-content" shape="rect"></a><b>Validation Rule: Element Sequence Locally Valid (Complex Content)</b><br clear="none" /><div class="constraint"><div class="p">
For a sequence <var>S</var> (possibly empty) of element information items
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
<a href="#ct" class="compref" shape="rect">Content Type</a> <var>CT</var>,
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
<var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
, <b>then </b>
<var>S</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as defined in
<a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
</div><div class="clnumber">2 <b>If </b><var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-mode" class="propref" shape="rect">{mode}</a> =
<b><i>suffix</i></b>
, <b>then </b>
<var>S</var> can be represented as two subsequences <var>S1</var> and
<var>S2</var> (either can be empty) such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
<var>S</var> = <var>S1</var> + <var>S2</var>
</span></div>
<div class="clnumber">2.2 <span class="p">
<var>S1</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as defined
in <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
</span></div>
<div class="clnumber">2.3 <span class="p">
If <var>S2</var> is not empty, let <var>E</var> be the first element
in <var>S2</var>, then <var>S1</var> + <var>E</var> does
<em>not</em> have a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in
<var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
</span></div>
<div class="clnumber">2.4 <span class="p">
Every element in <var>S2</var> is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the wildcard
<var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>, as defined in
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</span></div>
</div>
</div><div class="clnumber">3 <b>otherwise </b>
(<var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-mode" class="propref" shape="rect">{mode}</a> =
<b><i>interleave</i></b>) <var>S</var>
can be represented as two subsequences <var>S1</var> and <var>S2</var>
(either can be empty) such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
<var>S</var> is a member of <var>S1</var> &#215; <var>S2</var>
(where &#215; is the interleave
operator, see <a href="#all-mg" shape="rect">All-groups (&#167;3.8.4.1.3)</a>)
</span></div>
<div class="clnumber">3.2 <span class="p">
<var>S1</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as
defined in <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
</span></div>
<div class="clnumber">3.3 <span class="p">
For every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
the longest
prefix of <var>S1</var> where members of <var>S3</var> are before
<var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> does
<em>not</em> have a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in
<var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
</span></div>
<div class="clnumber">3.4 <span class="p">
Every element in <var>S2</var> is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the wildcard
<var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>,
as defined in
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</span></div>
</div>
</div></div>
</div></div></div><p><span class="termdef"><a name="loc-locallyValid-seq" id="loc-locallyValid-seq" title="" shape="rect">[Definition:]&#160;&#160;</a>
A sequence of element information items is <b>locally valid</b> with
respect to a <a href="#ct" class="compref" shape="rect">Content Type</a> if and only if it satisfies
<a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a> with respect to that <a href="#ct" class="compref" shape="rect">Content Type</a>.
</span></p></div><div class="div4">
<h5><a name="sec-particle-attribution" id="sec-particle-attribution" shape="rect"></a>3.4.4.4 Attribution
</h5><p><a name="anchor5748" id="anchor5748" shape="rect"></a><span class="termdef"><a name="key-att-to" id="key-att-to" title="" shape="rect">[Definition:]&#160;&#160;</a>
During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element
information item against its (complex) <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>,
associations
between element and attribute information items among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and the attribute uses,
attribute wildcard, particles
and open contentproperty record on the other, are
established. The element or attribute information item is
<b>attributed to</b> the corresponding component.
</span></p><p>
When an attribute information item
has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of an
<a href="#au" class="compref" shape="rect">Attribute Use</a>, then the item is <b>attributed to</b> that
attribute use. Otherwise, if the item matches an attribute wildcard, as
described in <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>, then the item is
<b>attributed to</b> that wildcard. Otherwise the item is
<em>not</em> <b>attributed to</b> any component.
</p><div class="block">
When a sequence <var>S</var> of <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> element information items are checked
against the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>'s <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
<var>CT</var>, let <var>S1</var> and <var>S2</var> be subsequences of <var>S</var>
such that
<ol class="enumar"><li><div class="p">
<var>S</var> is a member of <var>S1</var> &#215; <var>S2</var>
</div></li><li><div class="p">
<var>S1</var> is a prefix of some element sequence that is
<a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to <var>CT</var>,
as defined in <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>.
</div></li><li><div class="p">
for every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
the longest
prefix of <var>S1</var> where members of <var>S3</var> are before
<var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> is
<em>not</em> a prefix of any element sequence that is
<a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to <var>CT</var>.
</div></li></ol>
Then members of <var>S1</var> that form a
<a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in
<var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a> (see
<a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>) are <b>attributed to</b>
the particles they match up with in the
<a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>. Other members of
<var>S1</var> are <b>attributed to</b> the
<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of <var>CT</var>.
Members of <var>S2</var> are <em>not</em> <b>attributed to</b>
any component.
</div><div class="note"><div class="p"><b>Note:</b>
The above definition
makes sure that
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a> happens even when the
sequence of element information items is not
<a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> with respect to a
<a href="#ct" class="compref" shape="rect">Content Type</a>. For example, if a complex type definition has the
following content model:
<pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:element name="b"/&gt;
&lt;xs:element name="c"/&gt;
&lt;/xs:sequence&gt;</pre>
and an input sequence
<pre xml:space="preserve"> &lt;a/&gt;&lt;b/&gt;&lt;d/&gt;</pre>
Then the element &lt;a&gt; is
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to the particle whose term is the
"a" element declaration. Similarly, &lt;b&gt; is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to the "b"
particle.
</div></div><p>
<span class="termdef"><a name="key-dd" id="key-dd" title="" shape="rect">[Definition:]&#160;&#160;</a>
During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, associations between
element and attribute information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and element and attribute declarations on
the other, are also established. When an item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then it is associated with the declaration which is the
<a href="#p-term" class="propref" shape="rect">{term}</a> of the particle. Similarly, when an
attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
then the item is associated with the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of that
<a href="#au" class="compref" shape="rect">Attribute Use</a>. Such declarations are called the
<b>context-determined declarations</b>.
</span>
See clause <a href="#c-ctma" shape="rect">2.1</a> (in <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>)
for attribute declarations, clause <a href="#c-cdde" shape="rect">2</a> (in
<a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>) for element declarations.
</p></div></div><div class="div3">
<h4><a name="sec-ctdsic" id="sec-ctdsic" shape="rect"></a>3.4.5 Complex Type Definition Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-attrDefault" id="sec-sic-attrDefault" shape="rect"></a>3.4.5.1 Attribute Default Value</h5><div class="constraintnote"><a id="sic-attrDefault" name="sic-attrDefault" shape="rect"></a><b>Schema Information Set Contribution: Attribute Default Value</b><br clear="none" /><div class="constraint"><div class="p">For each <a href="#key-dflt-att" class="termref" shape="rect"><span class="arrow">&#183;</span>defaulted attribute<span class="arrow">&#183;</span></a>,
the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> has an attribute information item whose
properties are as below added to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of the element
information item.</div><div class="p">In addition, if necessary
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed on the element
information item for the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</div><div class="glist"><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local name]</a></div><div class="giDef"><div class="p">The <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s <a href="#ad-name" class="propref" shape="rect">{name}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a></div><div class="giDef"><div class="p">The <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a></div><div class="giDef"><div class="p">If the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> has a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> <var>N</var>, then
a namespace prefix bound to <var>N</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> property
of the element information item in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
If the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="p">
If
more than one
prefix is
bound to <var>N</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>, it is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of those prefixes is used.
</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a></div><div class="giDef"><div class="p">The element information item being assessed.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s
<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_default" class="propref" shape="rect">[schema default]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validation_context" class="propref" shape="rect">[validation context]</a></div><div class="giDef"><div class="p">The nearest ancestor element information item with a
<a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> property.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validity" class="propref" shape="rect">[validity]</a></div><div class="giDef"><div class="p"><b><i>valid</i></b>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div><div class="giDef"><div class="p"><b><i>full</i></b>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_specified" class="propref" shape="rect">[schema specified]</a></div><div class="giDef"><div class="p"><b><i>schema</i></b>.</div></div></div></div><div class="p">The added items
also
have <a href="#a-type_definition" class="propref" shape="rect">[type definition]</a>
(and <a href="#a-member_type_definition" class="propref" shape="rect">[member type definition]</a>
and <a href="#a-member_type_definitions" class="propref" shape="rect">[member type definitions]</a>
if appropriate) properties,
and
their lighter-weight alternatives, as specified in <a href="#sic-attrType" shape="rect">Attribute Validated by Type (&#167;3.2.5.4)</a>.</div></div></div><div class="p"> <a name="anchor6445" id="anchor6445" shape="rect"></a>
<div class="termdef"><a name="term-ns-fixup" id="term-ns-fixup" title="" shape="rect">[Definition:]&#160;&#160;</a>When
default values are supplied for attributes, <b>namespace fixup</b>
may be required, to ensure that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes
the namespace bindings needed and maintains the consistency
of the namespace information in the infoset. To perform
namespace fixup on an element information item <var>E</var> for
a namespace <var>N</var>:
<div class="constraintlist"><div class="clnumber">1 <span class="p">If the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var>
binds a prefix to <var>N</var>, no
namespace fixup is needed; the properties of <var>E</var>
are not changed.</span></div>
<div class="clnumber">2 <span class="p">Otherwise, first select some prefix <var>P</var> which is not bound by
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> (the choice of
prefix
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>).</span></div>
<div class="clnumber">3 <span class="p">Add an entry to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> binding <var>P</var> to <var>N</var>.</span></div>
<div class="clnumber">4 <span class="p">Add a namespace attribute to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of <var>E</var>.</span></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Maintain the consistency of the information set by adjusting
the namespace bindings on the descendants of <var>E</var>. This may
be done in either of two ways:<div class="constraintlist"><div class="clnumber">5.1 <span class="p">Add the binding of <var>P</var> to <var>N</var> to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of all
descendants of <var>E</var>, except where that binding is overridden
by another binding for <var>P</var>.</span></div>
<div class="clnumber">5.2 <span class="p">Add to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of each child of <var>E</var> a namespace
attribute which undeclares the binding for <var>P</var> (i.e. a
namespace attribute for prefix <var>P</var> whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
is the empty string), unless that child already has a
namespace declaration for prefix <var>P</var>.
Note that this approach is possible
only if <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use,
rather than <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>.</span></div>
</div>
<div class="p">The choice between the two methods of maintaining
consistency in the information set is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</div></div>
</div></div>
If the <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is occasioned by a defaulted attribute
with a non-absent target namespace, then (as noted above), the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a> of the attribute information item supplied
in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is set to <var>P</var>.</div><div class="note"><div class="p"><b>Note:</b>
When a default value of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> is applied,
it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs; if it does not, the prefix
used in the lexical representation (in
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a>
or <a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>) will
not necessarily map to the namespace name of the value
(in <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>).
To reduce problems and
confusion, users may prefer to ensure that the required namespace
information item is
present in the input infoset.
</div></div></div><div class="div4">
<h5><a name="sec-sic-match-info" id="sec-sic-match-info" shape="rect"></a>3.4.5.2 Match Information</h5><div class="constraintnote"><a id="sic-match-info" name="sic-match-info" shape="rect"></a><b>Schema Information Set Contribution: Match Information</b><br clear="none" /><div class="constraint"><div class="p">
To allow users of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
to distinguish element information
items which are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> from those
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>, if
and only if the
local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of an element
information item has been assessed as defined by
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>,
then each attribute information item in its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
has the following properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-attribution" name="a-attribution" shape="rect"><span class="propdef">[attribute attribution]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
an <a href="#au" class="compref" shape="rect">Attribute Use</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the <a href="#au" class="compref" shape="rect">Attribute Use</a>.</div><div class="clnumber">2 <b>If </b>the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the attribute wildcard.</div><div class="clnumber">3 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
an <a href="#au" class="compref" shape="rect">Attribute Use</a> or an
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>) <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
</dd><dt><a id="a-match_info" name="a-match_info" shape="rect"><span class="propdef">[match information]</span></a></dt><dd>
A keyword indicating what kind of component the
attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to.
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#au" class="compref" shape="rect">Attribute Use</a>, <b>then </b><b><i>attribute</i></b></div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>strict</i></b></div><div class="clnumber">3 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>lax</i></b></div><div class="clnumber">4 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>skip</i></b></div><div class="clnumber">5 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
an <a href="#au" class="compref" shape="rect">Attribute Use</a> or an
<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>)
<b><i>none</i></b></div></div>
</dd></dl>
</div>
</div>
<div class="p">And each element information item in
its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> has the following properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-attribution" name="e-attribution" shape="rect"><span class="propdef">[element attribution]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the <a href="#p" class="compref" shape="rect">Particle</a>.</div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#oc" class="compref" shape="rect">Open Content</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the <a href="#oc" class="compref" shape="rect">Open Content</a>.</div><div class="clnumber">3 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
a <a href="#p" class="compref" shape="rect">Particle</a> or an
<a href="#oc" class="compref" shape="rect">Open Content</a>) <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
</dd><dt><a id="e-match_info" name="e-match_info" shape="rect"><span class="propdef">[match information]</span></a></dt><dd>
A keyword indicating what kind of <a href="#p" class="compref" shape="rect">Particle</a> the
item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to.
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>element</i></b></div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>strict</i></b></div><div class="clnumber">3 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>lax</i></b></div><div class="clnumber">4 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>skip</i></b></div><div class="clnumber">5 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#oc" class="compref" shape="rect">Open Content</a>, <b>then </b><b><i>open</i></b></div><div class="clnumber">6 <b>otherwise </b>(the item is not
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <a href="#p" class="compref" shape="rect">Particle</a> or
an <a href="#oc" class="compref" shape="rect">Open Content</a>) <b><i>none</i></b></div></div>
</dd></dl>
</div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="coss-ct" id="coss-ct" shape="rect"></a>3.4.6 Constraints on Complex Type Definition Schema Components</h4><p>All complex type definitions (see <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-ct-props-correct" id="sec-ct-props-correct" shape="rect"></a>3.4.6.1 Complex Type Definition Properties Correct</h5><div class="constraintnote"><a id="ct-props-correct" name="ct-props-correct" shape="rect"></a><b>Schema Component Constraint: Complex Type Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a complex type definition are as described in
the property tableau in
<a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a simple type
definition, the <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> is <b><i>extension</i></b>.</span></div>
<div class="clnumber">3 <span class="p">There are no circular
definitions, except for that of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>. That is, it is
possible to reach the definition of
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> by repeatedly following the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">4 <span class="p">
No two distinct members of the
<a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> have
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>s
with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.
</span></div>
<div class="clnumber">5 <span class="p">
If <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>, then
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
is either <b><i>element-only</i></b>
or <b><i>mixed</i></b>.
</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-ct-extends" id="sec-cos-ct-extends" shape="rect"></a>3.4.6.2 Derivation Valid (Extension)</h5><div class="constraintnote"><a id="cos-ct-extends" name="cos-ct-extends" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Extension)</b><br clear="none" /><div class="constraint"><div class="p">
For every complex type <var>T</var> with
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>B</var> where
<var>T</var>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
= <b><i>extension</i></b>,
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>B</var> is a complex type definition, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p"><var>B</var>.<a href="#ctd-final" class="propref" shape="rect">{final}</a>
does not contain <b><i>extension</i></b>.</span></div>
<div class="clnumber">1.2<a id="c-cte" name="c-cte" shape="rect"> </a><span class="p"><var>B</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
is a subset of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
That is, for every attribute use <var>U</var> in
<var>B</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>,
there is an attribute use in
<var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
whose properties, recursively, are identical to
those of <var>U</var>.
</span></div>
<div class="clnumber">1.3 <span class="p">If <var>B</var> has an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>,
then <var>T</var>
also
has one, and <var>B</var>.<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
is a subset of
<var>T</var>.<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as
defined by <a href="#cos-ns-subset" shape="rect">Wildcard Subset (&#167;3.10.6.2)</a>.</span></div>
<div class="clnumber">1.4 <!--* no span class='p' possible here *-->
<b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.1 <span class="p"><var>B</var> and <var>T</var> both
have <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>simple</i></b> and both have the same
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.
</span></div>
<div class="clnumber">1.4.2 <span class="p"><var>B</var> and <var>T</var> both have
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
=
<b><i>empty</i></b>.</span></div>
<div class="clnumber">1.4.3 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.4.3.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
=
<b><i>element-only</i></b> or
<b><i>mixed</i></b>.</span></div>
<div class="clnumber">1.4.3.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.3.2.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b>.</span></div>
<div class="clnumber">1.4.3.2.2 <!--* no span class='p' possible here *-->
<b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.4.3.2.2.1 <span class="p">Both <var>B</var> and <var>T</var> have
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>mixed</i></b> or
both have <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>element-only</i></b>.</span></div>
<div class="clnumber">1.4.3.2.2.2 <span class="p">
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
is a <a href="#cd-model-extension" class="termref" shape="rect"><span class="arrow">&#183;</span>valid
extension<span class="arrow">&#183;</span></a> of
<var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>,
as defined in <a href="#cos-particle-extend" shape="rect">Particle Valid (Extension) (&#167;3.9.6.2)</a>.</span></div>
<div class="clnumber">1.4.3.2.2.3 <!--* no span class='p' possible here *-->
<b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.3.2.2.3.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
(call it <b>BOT</b>) is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">1.4.3.2.2.3.2 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
(call it <b>EOT</b>) has
<a href="#oc-mode" class="propref" shape="rect">{mode}</a>
<b><i>interleave</i></b>.
</span></div>
<div class="clnumber">1.4.3.2.2.3.3 <span class="p">
Both <b>BOT</b> and <b>EOT</b>
have
<a href="#oc-mode" class="propref" shape="rect">{mode}</a>
<b><i>suffix</i></b>.
</span></div>
</div>
</div>
<div class="clnumber">1.4.3.2.2.4 <span class="p">
If neither <b>BOT</b> nor
<b>EOT</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
<b>BOT</b>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
is a subset of
<b>EOT</b>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined
by
<a href="#cos-ns-subset" shape="rect">Wildcard Subset (&#167;3.10.6.2)</a>.</span></div>
</div>
</div>
</div></div>
</div></div>
</div>
</div>
<div class="clnumber">1.5 <span class="p">It is in principle
possible to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> <var>T</var> in two steps, the first
an extension and the second a restriction (possibly
vacuous), from that type definition among its ancestors
whose <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span><div class="note"><div class="p"><b>Note:</b> This requirement ensures that
nothing removed by a restriction is subsequently added
back by an extension in an incompatible way (for example,
with a conflicting type assignment or value
constraint).</div><div class="p">Constructing the intermediate type definition to
check this constraint is straightforward: simply
re-order the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> to put all the extension
steps first, then collapse them into a single
extension. If the resulting definition can be the
basis for a valid restriction to the desired
definition, the constraint is satisfied.</div></div></div>
<div class="clnumber">1.6<a id="c-vs-ctd-e" name="c-vs-ctd-e" shape="rect"> </a><span class="p">
For any element or attribute information item, its
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> within <var>T</var> is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
within <var>B</var>, <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>without limitation<span class="arrow">&#183;</span></a>, if neither is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">1.7 <span class="p"><var>B</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>
is a prefix of <var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>.</span></div>
</div>
</div><div class="clnumber">2 <b>If </b><var>B</var> is a simple type definition, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>simple</i></b> and
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> =
<var>B</var>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a>
does not contain <b><i>extension</i></b>.</span></div>
</div>
</div></div> .
</div></div></div><p><span class="termdef"><a name="cd-ct-extension" id="cd-ct-extension" title="" shape="rect">[Definition:]&#160;&#160;</a>
A complex type <b>T</b> is a <b>valid extension</b> of its
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if
<b>T</b>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
= <b><i>extension</i></b>
and
<var>T</var>
satisfies the constraint <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a></span>.</p></div><div class="div4">
<h5><a name="sec-derivation-ok-restriction" id="sec-derivation-ok-restriction" shape="rect"></a>3.4.6.3 Derivation Valid (Restriction, Complex)</h5><div class="constraintnote"><a id="derivation-ok-restriction" name="derivation-ok-restriction" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Restriction, Complex)</b><br clear="none" /><div class="constraint"><div class="p">
For every complex type <var>T</var> with
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>B</var> where
<var>T</var>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
= <b><i>restriction</i></b>,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>B</var> is a complex type definition whose
<a href="#ctd-final" class="propref" shape="rect">{final}</a> does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>B</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>simple</i></b></span></div>
<div class="clnumber">2.2.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.2.2.1 <span class="p">Let <var>S</var><sub><var>B</var></sub> be
<var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>,
and
<var>S</var><sub><var>T</var></sub> be
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.
Then <var>S</var><sub><var>T</var></sub> is validly derived from <var>S</var><sub><var>B</var></sub> as defined
in
<a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">2.2.2.2 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b> and
<var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
is a <a href="#p" class="compref" shape="rect">Particle</a> which is
<a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a> as
defined in <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">2.3 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p">
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>empty</i></b>.
</span></div>
<div class="clnumber">2.3.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.3.2.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>empty</i></b>.</span></div>
<div class="clnumber">2.3.2.2 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
<b><i>element-only</i></b> or
<b><i>mixed</i></b>, and
<var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
is a
<a href="#p" class="compref" shape="rect">Particle</a> which is <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a> as defined in
<a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">2.4 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.4.1 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.4.1.1 <span class="p">
<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>element-only</i></b>
and <var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
= <b><i>element-only</i></b> or <b><i>mixed</i></b>. </span></div>
<div class="clnumber">2.4.1.2 <span class="p">
<var>T</var> and <var>B</var> both have
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
=
<b><i>mixed</i></b>.</span></div>
</div></div>
<div class="clnumber">2.4.2<a id="T.ct.restricts.B.ct" name="T.ct.restricts.B.ct" shape="rect"> </a><span class="p">The <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
<var>T</var> <a href="#pt-actual-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricts<span class="arrow">&#183;</span></a>
that of <var>B</var> as defined
in <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">3<a id="c-ran" name="c-ran" shape="rect"> </a><span class="p">For every element information item <var>E</var>, if the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of <var>E</var> satisfy clause <a href="#c-aam" shape="rect">2</a> and
clause <a href="#c-ra" shape="rect">3</a> of
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to <var>T</var>, then they also satisfy the same
clauses with respect to
<var>B</var>,
and for every attribute information item <var>A</var> in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
<var>B</var>'s <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a> for <var>A</var> <a href="#loc-testSubP" class="termref" shape="rect"><span class="arrow">&#183;</span>subsumes<span class="arrow">&#183;</span></a> that defined by
<var>T</var>.</span></div>
<div class="clnumber">4<a id="c-vs-ctd-r" name="c-vs-ctd-r" shape="rect"> </a><span class="p">
For any element or
attribute information item, its
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
within <var>T</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a>
for its
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> within
<var>B</var>, subject to the blocking keywords
{<b><i>extension</i></b>, <b><i>list</i></b>, <b><i>union</i></b>}, if the item has a
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> both in
<var>T</var> and in <var>B</var>.
</span></div>
<div class="clnumber">5 <span class="p"><var>B</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> is a prefix of
<var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>.</span></div>
</div>
<span class="termdef"><a name="cd-ct-restriction" id="cd-ct-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A complex
type definition with <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b> is a <b>valid
restriction</b> of its <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if the constraint <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a> is
satisfied</span>.
</div></div></div><div class="note"><div class="p"><b>Note:</b> Valid
restriction involves both a subset relation on the set of
elements valid against <var>T</var> and those valid against <var>B</var>, and a derivation relation, explicit in the
type hierarchy, between the types assigned to attributes and
child elements by <var>T</var> and those assigned to the same
attributes and children by <var>B</var>.</div></div><p>The constraint just given,
like other constraints on schemas,
<span class="rfc2119">must</span> be satisfied by every complex type <var>T</var> to which it
applies.
</p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
<a name="anchor5293far1" id="anchor5293far1" shape="rect"></a>
The above constraint allows a complex type with an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>
model groups to restrict another complex type with either
<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, or <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>
model groups. Even when the base type has an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a> model
group, the list of member elements and wildcard may be very different
between the two types. The working group solicits feedback on how useful
this is in practice, and on the difficulty in implementing this feature.
</span></p></div><p>
However, under certain conditions conforming processors
need not (although they <span class="rfc2119">may</span>) detect some violations of this constraint.
If (1) the type definition being checked
has <var>T</var> . <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> . <a href="#ct-particle" class="propref" shape="rect">{particle}</a> . <a href="#p-term" class="propref" shape="rect">{term}</a> . <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
= <b><i>all</i></b>
and (2) an implementation is unable to determine
by examination of the schema in isolation
whether or not clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
is satisfied, then the implementation <span class="rfc2119">may</span>
provisionally accept the derivation.
If any instance encountered in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode
is valid against <var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>,
then the derivation of <var>T</var> does not satisfy this
constraint, the schema does not conform to this
specification, and no <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> can be performed
using that schema.
</p><p>It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor (a) always
detects violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
by examination of the schema in isolation, (b)
detects them only when some element information item
in the input document is valid against <var>T</var> but not
against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, or (c) sometimes detects
such violations by examination of the schema in isolation
and sometimes not. In the latter case, the circumstances
in which the processor does one or the other are
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
<a name="anchor5293far2" id="anchor5293far2" shape="rect"></a>
The above rule allows an implementation to use a potentially non-conforming
schema to perform schema assessment and produce PSVI. This results in
an exception of rules specified in <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure (&#167;5.1)</a>.
The Working Group solicits input from implementors and users of this
specification as to whether this is an acceptable implementation
behavior.
</span></p></div></div><div class="div4">
<h5><a name="sec-cos-content-act-restrict" id="sec-cos-content-act-restrict" shape="rect"></a>3.4.6.4 Content Type Restricts (Complex Content)</h5><div class="constraintnote"><a id="cos-content-act-restrict" name="cos-content-act-restrict" shape="rect"></a><b>Schema Component Constraint: Content type restricts (Complex Content)</b><br clear="none" /><div class="constraint"><div class="p"><div class="termdef"><a name="pt-actual-restriction" id="pt-actual-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<a href="#ct" class="compref" shape="rect">Content Type</a> <b>R</b> (for "restriction")
with complex content (i.e. one with a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#ct-particle" class="propref" shape="rect">{particle}</a>)
<b>restricts</b> another <a href="#ct" class="compref" shape="rect">Content Type</a> <b>B</b> (for
"base") with complex content
if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Every sequence of element information items which is
<a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to <b>R</b>
is also <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to <b>B</b>.</span></div>
<div class="clnumber">2<a id="ctr-child-type-subsumption" name="ctr-child-type-subsumption" shape="rect"> </a><span class="p">For all sequences of element information items <b>ES</b> which are
<a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to <b>R</b>, for all
elements <b>E</b> in <b>ES</b>,
<b>B</b>'s <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a> for <b>E</b>
<a href="#loc-testSubP" class="termref" shape="rect"><span class="arrow">&#183;</span>subsumes<span class="arrow">&#183;</span></a>
that defined by <b>R</b>.
</span></div>
</div>
</div>
</div><div class="p"><div class="termdef"><a name="key-dft-binding" id="key-dft-binding" title="" shape="rect">[Definition:]&#160;&#160;</a>
When a sequence of element information items <b>ES</b>
is <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to a
<a href="#ct" class="compref" shape="rect">Content Type</a> <b>CT</b>
or when a set of attribute information items
<b>AS</b> satisfies clause <a href="#c-aam" shape="rect">2</a> and clause <a href="#c-ra" shape="rect">3</a>
of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
there is a (partial) functional mapping from
the element information items <var>E</var> in the sequence <var>ES</var>
or the attribute information items in
<var>AS</var>
to a <b>default binding</b> for the item,
where the default binding is
an <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
or one
of the keywords <b><i>strict</i></b>, <b><i>lax</i></b>, or <b><i>skip</i></b>,
as follows:
<div class="constraintlist"><div class="clnumber">1 <span class="p">When the item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, the
default binding is that <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</span></div>
<div class="clnumber">2 <span class="p">
When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#au" class="compref" shape="rect">Attribute Use</a>, the default binding is
that <a href="#au" class="compref" shape="rect">Attribute Use</a>.
</span></div>
<div class="clnumber">3 <span class="p">
When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
attribute wildcard, the default binding is
an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>,
whose <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and
whose <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>'s
<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> (the other properties in the
<a href="#au" class="compref" shape="rect">Attribute Use</a> are not relevant).
</span></div>
<div class="clnumber">4 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>strict</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and
it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or
a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
the default binding is the keyword <b><i>strict</i></b>.</span></div>
<div class="clnumber">5 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and
it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or
a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
the default binding is
the keyword <b><i>lax</i></b>.</span></div>
<div class="clnumber">6 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> then
the default binding is the keyword
<b><i>skip</i></b>.</span></div>
</div>
</div>
</div><div class="p"><span class="termdef"><a name="loc-testSubP" id="loc-testSubP" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a>
<b>G</b> (for general) <b>subsumes</b> another
<a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a>
<b>S</b> (for specific) if and only if </span>
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>G</b> is <b><i>skip</i></b>.</span></div>
<div class="clnumber">2 <span class="p"><b>G</b> is <b><i>lax</i></b>
and <b>S</b> is not <b><i>skip</i></b>.</span></div>
<div class="clnumber">3 <span class="p">Both <b>G</b> and <b>S</b> are <b><i>strict</i></b>.</span></div>
<div class="clnumber">4 <!--* no span class='p' possible here *--><b>G</b> and <b>S</b> are both Element Declarations and
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.1 <span class="p">Either
<b>G</b>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>
or
<b>S</b>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>false</i></b>.</span></div>
<div class="clnumber">4.2 <span class="p">Either <b>G</b> has no <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, or it is not <b><i>fixed</i></b>,
or <b>S</b> has a <b><i>fixed</i></b> <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> with
an equal or
identical
value.</span></div>
<div class="clnumber">4.3 <span class="p"><b>S</b>.<a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>
is
a superset of <b>G</b>.<a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>.</span></div>
<div class="clnumber">4.4 <span class="p"><b>S</b> disallows a superset of the substitutions that <b>G</b> does.</span></div>
<div class="clnumber">4.5<a id="c-vs-ct" name="c-vs-ct" shape="rect"> </a><span class="p">
<b>S</b>'s declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is
<a href="#key-val-sub-type-restricts" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable as a restriction<span class="arrow">&#183;</span></a> for <b>G</b>'s
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
<div class="clnumber">4.6<a id="c-tt-equiv" name="c-tt-equiv" shape="rect"> </a><span class="p">
<b>S</b>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> and
<b>G</b>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
or are both <a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a> and
<a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
</span></div>
</div>
</div>
<div class="clnumber">5 <!--* no span class='p' possible here *--><b>G</b> and <b>S</b> are both
<a href="#au" class="compref" shape="rect">Attribute Use</a>s and
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.1 <span class="p"><var>G</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> is
validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<var>S</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>,
as
defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">5.2 <!--* no span class='p' possible here *-->
Let <b>GVC</b> be <var>G</var>'s
<a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> and <b>SVC</b> be <var>S</var>'s
<a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>, then
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p"><b>GVC</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or has
<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> <b><i>default</i></b>.</span></div>
<div class="clnumber">5.2.2 <span class="p"><b>SVC</b>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a>
= <b><i>fixed</i></b> and
<b>SVC</b>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a> is
equal or identical to
<b>GVC</b>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
</div>
</div>
<div class="clnumber">5.3 <span class="p">
<var>G</var>.<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> =
<var>S</var>.<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a>.
</span></div>
</div>
</div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> To restrict a complex type definition with a simple base type definition
to <b><i>empty</i></b>, use a simple type definition with a <b><i>fixed</i></b> value of
the empty string: this preserves the type information.</div></div><div class="note"><div class="p"><b>Note:</b> To restrict away a local element declaration that <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with
a wildcard, use a wildcard in the derived type that explicitly
disallows the element's <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>. See the example given in
<a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>.</div></div></div><div class="div4">
<h5><a name="sec-cos-ct-derived-ok" id="sec-cos-ct-derived-ok" shape="rect"></a>3.4.6.5 Type Derivation OK (Complex)</h5><p>The following constraint defines a relation appealed to elsewhere
in this specification.</p><div class="constraintnote"><a id="cos-ct-derived-ok" name="cos-ct-derived-ok" shape="rect"></a><b>Schema Component Constraint: Type Derivation OK (Complex)</b><br clear="none" /><div class="constraint"><div class="p">For a complex type definition (call it <b>D</b>, for
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>) to be validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition (call this
<b>B</b>, for base) subject to
the blocking keywords in
a subset of {<b><i>extension</i></b>,
<b><i>restriction</i></b>}
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">If <b>B</b> and <b>D</b> are not the same type
definition, then the <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> of
<b>D</b> is not
in the subset.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
<b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-tid" name="c-tid" shape="rect"> </a><span class="p"><b>B</b> = <b>D</b>.</span></div>
<div class="clnumber">2.2 <span class="p"><b>B</b> = <b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->
<b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p"><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> &#8800; <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.3.2 <!--* no span class='p' possible here *-->
The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.3.2.1 <b>If </b><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is complex, <b>then </b>it is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
subject to the subset as defined by this constraint.</div><div class="clnumber">2.3.2.2 <b>If </b><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is simple, <b>then </b>it is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
subject to the subset as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> This constraint is used to check that when someone uses a type in a
context where another type was expected (either via <code>xsi:type</code> or
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a>), that the type used is actually <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the expected
type, and that that <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> does not involve a form of <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> which was
ruled out by the expected type.</div></div><div class="note"><a name="no-identity" id="no-identity" shape="rect"></a><div class="p"><b>Note:</b> The wording of clause <a href="#c-tid" shape="rect">2.1</a> above appeals to a notion of component identity which
is only incompletely defined by this version of this specification.
In some cases, the wording of this specification does make clear the
rules for component identity. These cases include:
<ul><li><div class="p">When they are both top-level components with the same component type,
namespace name, and local name;</div></li><li><div class="p">When they are necessarily the same type definition (for example, when
the two type
definitions in question are the type definitions associated with
two attribute or element declarations, which are discovered to be the same
declaration);</div></li><li><div class="p">When they are the same by construction (for example, when an element's
type definition defaults to being the same type definition as that of its
substitution-group head or when a complex type definition inherits an attribute
declaration from its base type definition).</div></li></ul>
</div><div class="p">In other cases
it is possible
that conforming implementations will
disagree as to whether components are identical.</div></div><div class="note"><div class="p"><b>Note:</b> When a complex type definition <var>S</var> is said to be
"validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>" from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
or with the explicit phrase "without limitation",
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</div></div></div></div><div class="div3">
<h4><a name="builtin-ctd" id="builtin-ctd" shape="rect"></a>3.4.7 Built-in Complex Type Definition</h4><p>There is a complex
type definition for <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> present in every schema
by definition. It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="any-type-itself" name="any-type-itself" shape="rect">Complex Type Definition of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">anyType</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">http://www.w3.org/2001/XMLSchema</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">itself</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="pvVal"><b><i>restriction</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="pvVal">A <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">a
<a href="#p" class="compref" shape="rect">Particle</a> with the properties shown
below in <a href="#anyType-outer-particle" shape="rect">Outer Particle for Content Type of anyType (&#167;3.4.7)</a>.
</div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="pvVal">
a wildcard with the following properties::
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with the following properties:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>any</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">The empty set</div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal"><b><i>lax</i></b></div></div></div></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a></div><div class="pvVal">The empty sequence</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a></div><div class="pvVal"><b><i>false</i></b></div></div></div></div><p>
The outer particle of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> contains a sequence with a single term:
</p><div class="scInstance"><div class="scHead"><a id="anyType-outer-particle" name="anyType-outer-particle" shape="rect">Outer Particle for Content Type of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">a model group with
the following properties:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#mg-compositor" class="propref" shape="rect">{compositor}</a></div><div class="pvVal"><b><i>sequence</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#mg-particles" class="propref" shape="rect">{particles}</a></div><div class="pvVal">
a list containing one particle with the properties shown
below in <a href="#anyType-inner-particle" shape="rect">Inner Particle for Content Type of anyType (&#167;3.4.7)</a>.
</div></div></div>
</div></div></div></div><p>
The inner particle of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> contains a wildcard which matches any element:
</p><div class="scInstance"><div class="scHead"><a id="anyType-inner-particle" name="anyType-inner-particle" shape="rect">Inner Particle for Content Type of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">0</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal"><b><i>unbounded</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">a wildcard with the following properties:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with the following properties:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>any</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">The empty set</div></div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal"><b><i>lax</i></b></div></div></div>
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> This specification does not provide an inventory of built-in complex
type definitions for use in user schemas. A preliminary library of complex type
definitions is available which includes both mathematical (e.g.
<code>rational</code>) and utility (e.g. <code>array</code>) type definitions.
In particular, there is a <code>text</code> type definition which is recommended for use
as the type definition in element declarations intended for general text
content, as it makes sensible provision for various aspects of
internationalization. For more details, see the schema document for the type
library at its namespace name: <a href="http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd" shape="rect">http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd</a>.</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Complex_Type_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAttribute_Group_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttributeUse" id="cAttributeUse" shape="rect"></a>3.5 Attribute Uses</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.1 <a href="#AU_details" shape="rect">The Attribute Use Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.2 <a href="#sec-xrau" shape="rect">XML Representation of Attribute Use Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.3 <a href="#sec-src-au" shape="rect">Constraints on XML Representations of Attribute Uses</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.4 <a href="#sec-cvc-au" shape="rect">Attribute Use Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.5 <a href="#sec-ausic" shape="rect">Attribute Use Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.6 <a href="#coss-attruse" shape="rect">Constraints on Attribute Use Schema Components</a><br clear="none" />
</div><p>An attribute use is a utility component which controls the occurrence and
defaulting behavior of attribute declarations. It plays the same role for
attribute declarations in complex types that particles play for element declarations.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType&gt;
. . .
&lt;xs:attribute ref="xml:lang" use="required"/&gt;
&lt;xs:attribute ref="xml:space" default="preserve"/&gt;
&lt;xs:attribute name="version" type="xs:decimal" fixed="1.0"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations which all involve attribute uses, illustrating some of
the possibilities for controlling occurrence.</div></div></div><div class="div3">
<h4><a name="AU_details" id="AU_details" shape="rect"></a>3.5.1 The Attribute Use Schema Component</h4><p>The attribute use schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="au" id="au" shape="rect">Attribute Use</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="au-annotations" shape="rect" id="au-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="au-required" shape="rect" id="au-required"></a><div class="pdName"><span class="propdef">{required}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
<div class="propDefn"><a name="au-attribute_declaration" shape="rect" id="au-attribute_declaration"></a><div class="pdName"><span class="propdef">{attribute declaration}</span></div>
<div class="pdDef">
An <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> component. Required.</div>
</div>
<div class="propDefn"><a name="au-value_constraint" shape="rect" id="au-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A <a href="#vc_au" class="compref" shape="rect">Value Constraint</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="au-inheritable" shape="rect" id="au-inheritable"></a><div class="pdName"><span class="propdef">{inheritable}</span></div>
<div class="pdDef">
An xs:boolean value. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_au" id="vc_au" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_au-variety" shape="rect" id="vc_au-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}. Required.</div>
</div>
<div class="propDefn"><a name="vc_au-value" shape="rect" id="vc_au-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>. Required.
</div>
</div>
<div class="propDefn"><a name="vc_au-lexical_form" shape="rect" id="vc_au-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">
A character string. Required.
</div>
</div>
</div></div>
</div>
</div>
<p><a href="#au-required" class="propref" shape="rect">{required}</a> determines whether this use of an attribute
declaration requires an appropriate attribute information item to be present, or
merely allows it.</p><p><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> provides the attribute declaration itself,
which will in turn determine the simple type definition used.</p><p><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> allows for local
specification of a default or fixed value. This <span class="rfc2119">must</span> be
consistent with that of the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>, in that if
the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> specifies
a fixed value, the only allowed <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is the same fixed value, or a value equal or
identical to it.</p><p>
See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#au-annotations" class="propref" shape="rect">{annotations}</a> property.
</p></div><div class="div3">
<h4><a name="sec-xrau" id="sec-xrau" shape="rect"></a>3.5.2 XML Representation of Attribute Use Schema Components</h4><p>Attribute uses correspond to all uses of <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> which
allow a <code>use</code> attribute. These in turn correspond to
<em>two</em> components in each case, an attribute use and its <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> (although note the latter is not new when the attribute use is a reference to a top-level attribute declaration). The appropriate mapping is described in <a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>.</p></div><div class="div3">
<h4><a name="sec-src-au" id="sec-src-au" shape="rect"></a>3.5.3 Constraints on XML Representations of Attribute Uses</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-au" id="sec-cvc-au" shape="rect"></a>3.5.4 Attribute Use Validation Rules</h4><p>
<span class="termdef"><a name="key-evc" id="key-evc" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>effective value constraint</b> of an attribute use
<var>U</var>
is <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, otherwise
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present,
otherwise
the <b>effective value constraint</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span>
</p><div class="constraintnote"><a id="cvc-au" name="cvc-au" shape="rect"></a><b>Validation Rule: Attribute Locally Valid (Use)</b><br clear="none" /><div class="constraint"><div class="p">For an attribute information item to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an attribute use
its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be equal or identical to the <a href="#vc_a-value" class="propref" shape="rect">{value}</a> of the attribute use's <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if it is present and has <a href="#vc_a-variety" class="propref" shape="rect">{variety}</a>
<b><i>fixed</i></b>.</div></div></div></div><div class="div3">
<h4><a name="sec-ausic" id="sec-ausic" shape="rect"></a>3.5.5 Attribute Use Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-attruse" id="coss-attruse" shape="rect"></a>3.5.6 Constraints on Attribute Use Schema Components</h4><p>All attribute uses (see <a href="#cAttributeUse" shape="rect">Attribute Uses (&#167;3.5)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="constraintnote"><a id="au-props-correct" name="au-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Use Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute use
<var>U</var> are as
described in the property tableau in
<a href="#AU_details" shape="rect">The Attribute Use Schema Component (&#167;3.5.1)</a>, modulo
the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is
not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then it is a valid default with
respect to
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>
as defined in <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.</span></div>
<div class="clnumber">3 <span class="p">If <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> has
<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a>
= <b><i>fixed</i></b> and <var>U</var> itself has a
<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, then
<var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_au-variety" class="propref" shape="rect">{variety}</a>
= <b><i>fixed</i></b> and
<var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_au-value" class="propref" shape="rect">{value}</a>
is identical to
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttributeUse" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cModel_Group_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttribute_Group_Definitions" id="cAttribute_Group_Definitions" shape="rect"></a>3.6 Attribute Group Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.1 <a href="#Attribute_Group_Definition_details" shape="rect">The Attribute Group Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2 <a href="#declare-attributeGroup" shape="rect">XML Representation of Attribute Group Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2.1 <a href="#declare-attributeGroup-core" shape="rect">XML Mapping Rule for Named Attribute Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2.2 <a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3 <a href="#constrain-attribute-group-xml" shape="rect">Constraints on XML Representations of Attribute Group Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.4 <a href="#sec-cvc-agd" shape="rect">Attribute Group Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.5 <a href="#sec-sic-agd" shape="rect">Attribute Group Definition Information Set
Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.6 <a href="#coss-attrGroup" shape="rect">Constraints on Attribute Group Definition Schema Components</a><br clear="none" />
</div><p>A schema can name a group of attribute declarations so that they can be incorporated as a
group into complex type definitions.</p><p>
Attribute group definitions do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such, but the
<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>
of one or
more complex type definitions <span class="rfc2119">may</span> be constructed in whole or part by reference
to an attribute group. Thus, attribute group definitions provide a
replacement for some uses of XML's
<a href="http://www.w3.org/TR/xml11/#dt-PE" shape="rect">parameter entity</a> facility.
Attribute group definitions are provided primarily for reference from the XML
representation of schema components
(see <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>).
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:attributeGroup name="myAttrGroup"&gt;
&lt;xs:attribute . . ./&gt;
. . .
&lt;/xs:attributeGroup&gt;
&lt;xs:complexType name="myelement"&gt;
. . .
&lt;xs:attributeGroup ref="myAttrGroup"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations for attribute group definitions. The effect is as if the attribute
declarations in the group were present in the type definition.</div></div></div><p>The example above illustrates the pattern
mentioned in <a href="#xroc" shape="rect">XML Representations of Components (&#167;3.1.2)</a>: The same
element, in this case <code>attributeGroup</code>, serves both to
define and to incorporate by reference. In the first
<code>attributeGroup</code> element in the example, the
<code>name</code> attribute is required and the
<code>ref</code> attribute is forbidden; in the second the
<code>ref</code> attribute is required, the
<code>name</code> attribute is forbidden.</p><div class="div3">
<h4><a name="Attribute_Group_Definition_details" id="Attribute_Group_Definition_details" shape="rect"></a>3.6.1 The Attribute Group Definition Schema Component</h4><p>The attribute group definition schema component has the
following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="agd" id="agd" shape="rect">Attribute Group Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="agd-annotations" shape="rect" id="agd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="agd-name" shape="rect" id="agd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="agd-target_namespace" shape="rect" id="agd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="agd-attribute_uses" shape="rect" id="agd-attribute_uses"></a><div class="pdName"><span class="propdef">{attribute uses}</span></div>
<div class="pdDef">
A set of <a href="#au" class="compref" shape="rect">Attribute Use</a> components. </div>
</div>
<div class="propDefn"><a name="agd-attribute_wildcard" shape="rect" id="agd-attribute_wildcard"></a><div class="pdName"><span class="propdef">{attribute wildcard}</span></div>
<div class="pdDef">
A <a href="#w" class="compref" shape="rect">Wildcard</a> component. Optional.</div>
</div>
</div></div>
</div>
</div>
<p>Attribute groups are identified by their <a href="#agd-name" class="propref" shape="rect">{name}</a> and <a href="#agd-target_namespace" class="propref" shape="rect">{target namespace}</a>; attribute group identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><p><a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> is
a set of
attribute uses, allowing
for local specification of occurrence and default or fixed values.</p><p><a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> provides for an attribute wildcard to be included in an
attribute group.
See above under <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a> for the
interpretation of
attribute wildcards during <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#agd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-attributeGroup" id="declare-attributeGroup" shape="rect"></a>3.6.2 XML Representation of Attribute Group Definition Schema Components</h4><div class="div4">
<h5><a name="declare-attributeGroup-core" id="declare-attributeGroup-core" shape="rect"></a>3.6.2.1 XML Mapping Rule for Named Attribute Groups</h5><p>The XML representation for an attribute group definition
schema component is an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
element information item. It provides for naming a group of
attribute declarations and an attribute wildcard for use by
reference in the XML representation of complex type definitions
and other attribute group definitions. The correspondences between the
properties of the information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the
component it corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attributeGroup</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-attributeGroup" name="element-attributeGroup" shape="rect">&lt;attributeGroup</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?))<br clear="none" />&lt;/attributeGroup&gt;</p></div></div><p id="ag_p1">When an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> appears as a child of
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, it corresponds to an
attribute group definition as below. When it appears as a
child of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>, it does
not correspond to any component as such.</p><div class="note"><div class="p"><b>Note:</b>
If the <a href="#element-attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> is a child of
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
and it overrides a corresponding declaration in the
<a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of its parent,
it will also correspond to
an attribute group definition as shown below.
See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Group_Definition_details" shape="rect">Attribute Group Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="mapRepr">
The union of the set of attribute uses corresponding to the
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, with the
<a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> of the attribute groups
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the <code>ref</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.
<div class="note"><div class="p"><b>Note:</b> As described below, circular references from <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
to <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> are not errors.</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="mapRepr">
The <a href="#w" class="compref" shape="rect">Wildcard</a> determined by
applying the attribute-wildcard mapping described
in
<a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards (&#167;3.6.2.2)</a>
to the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
element information item.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element and
its <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div><div class="note"><div class="p"><b>Note:</b>
It is a consequence of this rule and the rule in <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>
that any annotations specified in attribute group references are included in
the sequence of <a href="#a" class="compref" shape="rect">Annotation</a>s of the enclosing <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or
<a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> components.
</div></div><p>The rules given above for
<a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> specify that
if an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element <var>A</var> contains a reference
to another attribute group <var>B</var> (i.e. <var>A</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> include an
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> with a <code>ref</code> attribute pointing
at <var>B</var>), then <var>A</var> maps to an <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> component whose
<a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> reflect not only
the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>A</var> but also those of
<var>B</var> and of any <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements referred
to in <var>B</var>. The same is true for attribute groups referred to from
complex types.
</p><p>
Circular reference is <em>not</em> disallowed. That is, it
is not an error if <var>B</var>, or some <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
element referred to by <var>B</var> (directly, or indirectly at some
remove) contains a reference to <var>A</var>. An <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
element involved in such a reference cycle maps to a
component whose <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> properties
reflect all the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>
elements contained in, or referred to (directly or indirectly)
by elements in the cycle.
</p><div class="note"><div class="p"><b>Note:</b>
In version 1.0 of this specification, circular group reference was not
allowed except in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>.
As described above, this version allows it.
The effect is to take the transitive closure of the
reference relation between <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
elements and take into account
all their <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and
<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> properties.
</div></div></div><div class="div4">
<h5><a name="declare-attributeGroup-wildcard" id="declare-attributeGroup-wildcard" shape="rect"></a>3.6.2.2 Common Rules for Attribute Wildcards</h5><div class="p">
The following mapping for attribute-wildcards forms part of the
XML mapping rules for different kinds of source declaration
(most prominently <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>). It can be
applied to any element which can have an <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
element as a child, and produces as a result either a
<a href="#w" class="compref" shape="rect">Wildcard</a> or the special value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
The mapping depends on the concept of the <a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local wildcard<span class="arrow">&#183;</span></a>:
<div class="termdef"><a name="key-law" id="key-law" title="" shape="rect">[Definition:]&#160;&#160;</a>
The
<b>local wildcard</b> of
an element information item <var>E</var>
is the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="local-wc-yes" name="local-wc-yes" shape="rect"> </a><b>If </b><var>E</var> has
an <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> child, <b>then </b>the
<a href="#w" class="compref" shape="rect">Wildcard</a> mapped to by the <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element using the wildcard
mapping set out in
<a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a>;</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div></div>
</div><div class="block">The mapping is defined as follows:
<div class="constraintlist"><div class="clnumber">1<a id="local-wc" name="local-wc" shape="rect"> </a><span class="p">
Let <var>L</var> be the
<a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local wildcard<span class="arrow">&#183;</span></a>
</span></div>
<div class="clnumber">2 <span class="p">Let <var>W</var> be a sequence containing all the <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>s
of the attribute groups referenced
by <var>E</var>, in document order.
</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
The value is then determined by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>W</var> is empty, <b>then </b>the <a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local
wildcard<span class="arrow">&#183;</span></a>
<var>L</var>.</div><div class="clnumber">3.2 <b>otherwise </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.2.1<a id="c-awi1" name="c-awi1" shape="rect"> </a><b>If </b><var>L</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>, <b>then </b>a wildcard whose
properties are as follows:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal">
<var>L</var>.<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">
<var>L</var>.<a href="#w-annotations" class="propref" shape="rect">{annotations}</a>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">the
wildcard intersection
of <var>L</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> and of the
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s of all
the the wildcards in <var>W</var>,
as defined in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>
</div></div></div>
</div><div class="clnumber">3.2.2<a id="c-awi2" name="c-awi2" shape="rect"> </a><b>otherwise </b>(no <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> is
present)
a wildcard whose properties are as follows: <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal">
The <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> of the first
wildcard in <var>W</var>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
The wildcard intersection
of the <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s
of all the wildcards in <var>W</var>,
as defined in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>
</div></div><div class="pvpair"><div class="pvProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>The empty sequence<span class="arrow">&#183;</span></a>
</div></div></div>
</div></div>
</div></div>
</div>
</div>
</div></div></div><div class="div3">
<h4><a name="constrain-attribute-group-xml" id="constrain-attribute-group-xml" shape="rect"></a>3.6.3 Constraints on XML Representations of Attribute Group Definitions</h4><div class="constraintnote"><a id="src-attribute_group" name="src-attribute_group" shape="rect"></a><b>Schema Representation Constraint: Attribute Group Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">None as such.</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-agd" id="sec-cvc-agd" shape="rect"></a>3.6.4 Attribute Group Definition Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-agd" id="sec-sic-agd" shape="rect"></a>3.6.5 Attribute Group Definition Information Set
Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-attrGroup" id="coss-attrGroup" shape="rect"></a>3.6.6 Constraints on Attribute Group Definition Schema Components</h4><p>All attribute group definitions (see <a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions (&#167;3.6)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="ag-props-correct" name="ag-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Group Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute group definition
are as described in the property tableau in
<a href="#Attribute_Group_Definition_details" shape="rect">The Attribute Group Definition Schema Component (&#167;3.6.1)</a>, modulo the impact
of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>;</span></div>
<div class="clnumber">2 <span class="p">No two
distinct members of the <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> have
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>s with the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttribute_Group_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Model_Groups" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cModel_Group_Definitions" id="cModel_Group_Definitions" shape="rect"></a>3.7 Model Group Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.1 <a href="#Model_Group_Definition_details" shape="rect">The Model Group Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.2 <a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.3 <a href="#sec-src-model_group_defn" shape="rect">Constraints on XML Representations of Model Group Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.4 <a href="#sec-cvc-mg" shape="rect">Model Group Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.5 <a href="#sec-sic-mg" shape="rect">Model Group Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.6 <a href="#coss-groupDef" shape="rect">Constraints on Model Group Definition Schema Components</a><br clear="none" />
</div><p>A model group definition associates a name and optional annotations with
a <a href="#mg" class="compref" shape="rect">Model Group</a>.
By reference to the name, the entire model group can be incorporated by reference into
a <a href="#p-term" class="propref" shape="rect">{term}</a>.</p><p>
Model group definitions are provided
primarily for reference from the <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a> (see <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
and <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>). Thus, model group definitions provide a
replacement for some uses of XML's
<a href="http://www.w3.org/TR/xml11/#dt-PE" shape="rect">parameter entity</a> facility.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:group name="myModelGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="someThing"/&gt;
. . .
&lt;/xs:sequence&gt;
&lt;/xs:group&gt;
&lt;xs:complexType name="trivial"&gt;
&lt;xs:group ref="myModelGroup"/&gt;
&lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="moreSo"&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="anotherThing"/&gt;
&lt;xs:group ref="myModelGroup"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">A minimal model group is defined and used by reference, first as the whole
content model, then as one alternative in a choice. </div></div></div><div class="div3">
<h4><a name="Model_Group_Definition_details" id="Model_Group_Definition_details" shape="rect"></a>3.7.1 The Model Group Definition Schema Component</h4><p>The model group definition schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="mgd" id="mgd" shape="rect">Model Group Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="mgd-annotations" shape="rect" id="mgd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="mgd-name" shape="rect" id="mgd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="mgd-target_namespace" shape="rect" id="mgd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="mgd-model_group" shape="rect" id="mgd-model_group"></a><div class="pdName"><span class="propdef">{model group}</span></div>
<div class="pdDef">
A <a href="#mg" class="compref" shape="rect">Model Group</a> component. Required.</div>
</div>
</div></div>
</div>
</div>
<p>Model group definitions are identified by their <a href="#mgd-name" class="propref" shape="rect">{name}</a> and <a href="#mgd-target_namespace" class="propref" shape="rect">{target namespace}</a>; model group identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><p>Model group definitions <em>per se</em> do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, but the <a href="#p-term" class="propref" shape="rect">{term}</a> of
a particle <span class="rfc2119">may</span> correspond in whole or in part
to a model group from a model group definition.</p><p><a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> is the <a href="#mg" class="compref" shape="rect">Model Group</a> for which the model group definition provides a name.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-namedModelGroup" id="declare-namedModelGroup" shape="rect"></a>3.7.2 XML Representation of Model Group Definition Schema Components</h4><p>The XML representation for a model group definition schema component is a
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information item.
It provides for
naming a model group for use by reference in the XML representation of
complex type definitions and model groups. The correspondences between the
properties of the information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>group</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-group" name="element-group" shape="rect">&lt;group</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?)<br clear="none" />&lt;/group&gt;</p></div></div><p id="xr.mgd1">If
the item has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
as its parent (in which case there will be a
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
then the item maps
to a model group definition component with properties as
follows:</p><div class="note"><div class="p"><b>Note:</b>
If the item is a child of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, it will
also have a <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>; if it overrides
a corresponding declaration in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of its parent, it will also (in the
overridden schema document) map to a component as described
below. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Model_Group_Definition_details" shape="rect">Model Group Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
ancestor element information
item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-model_group" class="propref" shape="rect">{model group}</a></div><div class="mapRepr">A model group which is
the <a href="#p-term" class="propref" shape="rect">{term}</a> of a particle
corresponding to the <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or
<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (there <span class="rfc2119">must</span>
be exactly one).</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p id="xr.mgd3">Otherwise,
if
the item
has
a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
and does <em>not</em> have <code>minOccurs=maxOccurs=0</code>
, then
the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element maps
to a particle component with properties
as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">The <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> of the model group definition
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>ref</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>Otherwise, the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>
has <code>minOccurs=maxOccurs=0</code>, in which
case it maps to no component at all.</p><div class="note"><div class="p"><b>Note:</b> The name of this section is slightly misleading, in that the
second, un-named, case above (with a <code>ref</code> and no
<code>name</code>) is not really a named model group at all, but
a reference to one. Also note that in the first (named) case
above no reference is made to <code>minOccurs</code> or
<code>maxOccurs</code>: this is because the schema for schema documents does not
allow them on the child of <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> when it is
named. This in
turn is because the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of the particles which
<em>refer</em> to the definition are what count.</div></div></div><div class="div3">
<h4><a name="sec-src-model_group_defn" id="sec-src-model_group_defn" shape="rect"></a>3.7.3 Constraints on XML Representations of Model Group Definitions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-mg" id="sec-cvc-mg" shape="rect"></a>3.7.4 Model Group Definition Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-mg" id="sec-sic-mg" shape="rect"></a>3.7.5 Model Group Definition Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-groupDef" id="coss-groupDef" shape="rect"></a>3.7.6 Constraints on Model Group Definition Schema Components</h4><p>All model group definitions (see <a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions (&#167;3.7)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="mgd-props-correct" name="mgd-props-correct" shape="rect"></a><b>Schema Component Constraint: Model Group Definition Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of a model group definition <span class="rfc2119">must</span> be as described in
the property tableau in
<a href="#Model_Group_Definition_details" shape="rect">The Model Group Definition Schema Component (&#167;3.7.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cModel_Group_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cParticles" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Model_Groups" id="Model_Groups" shape="rect"></a>3.8 Model Groups</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.1 <a href="#Model_Group_details" shape="rect">The Model Group Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.2 <a href="#declare-contentModel" shape="rect">XML Representation of Model Group Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.3 <a href="#sec-src-model_group" shape="rect">Constraints on XML Representations of Model Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4 <a href="#sec-cvc-mgrp" shape="rect">Model Group Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.1 <a href="#group-recognition" shape="rect">Language Recognition by Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.2 <a href="#group-validation" shape="rect">Principles of Validation against Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.3 <a href="#sec-cvc-model-group" shape="rect">Element Sequence Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.5 <a href="#sec-sic-mgrp" shape="rect">Model Group Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6 <a href="#coss-modelGroup" shape="rect">Constraints on Model Group Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.1 <a href="#sec-mg-props-correct" shape="rect">Model Group Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.2 <a href="#sec-cos-all-limited" shape="rect">All Group Limited</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.3 <a href="#sec-cos-element-consistent" shape="rect">Element Declarations Consistent</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.4 <a href="#sec-cos-nonambig" shape="rect">Unique Particle Attribution</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.5 <a href="#sec-cos-seq-range" shape="rect">Effective Total Range (all and sequence)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.6 <a href="#sec-cos-choice-range" shape="rect">Effective Total Range (choice)</a><br clear="none" />
</div><p>When the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element information items are not constrained
to be <b><i>empty</i></b> or by reference to a simple type definition
(<a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions (&#167;3.16)</a>), the sequence of element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> content <span class="rfc2119">may</span> be specified in
more detail with a model group. Because the <a href="#p-term" class="propref" shape="rect">{term}</a>
property of a particle can be a
model group, and model groups contain particles, model groups can indirectly
contain other model groups; the grammar for model groups
is therefore recursive.
<span class="termdef"><a name="key-contain-dgp" id="key-contain-dgp" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group
<b>directly contains</b> the particles in the value of its
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property.</span>
<span class="termdef"><a name="key-contain-igx" id="key-contain-igx" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
by the particles it
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>.</span>
<span class="termdef"><a name="key-contain-xgx" id="key-contain-xgx" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group
<b>contains</b> the components which it either
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-igx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</span>
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:group name="otherPets"&gt;
&lt;xs:all&gt;
&lt;xs:element name="birds"/&gt;
&lt;xs:element name="fish"/&gt;
&lt;/xs:all&gt;
&lt;/xs:group&gt;
&lt;xs:all&gt;
&lt;xs:element ref="cats"/&gt;
&lt;xs:element ref="dogs"/&gt;
&lt;xs:group ref="otherPets"/&gt;
&lt;/xs:all&gt;
&lt;xs:sequence&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="left"/&gt;
&lt;xs:element ref="right"/&gt;
&lt;/xs:choice&gt;
&lt;xs:element ref="landmark"/&gt;
&lt;/xs:sequence&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations for the three kinds of model group, the third nested
inside the second.</div></div></div><div class="div3">
<h4><a name="Model_Group_details" id="Model_Group_details" shape="rect"></a>3.8.1 The Model Group Schema Component</h4><p>The model group schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="mg" id="mg" shape="rect">Model Group</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="mg-annotations" shape="rect" id="mg-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="mg-compositor" shape="rect" id="mg-compositor"></a><div class="pdName"><span class="propdef">{compositor}</span></div>
<div class="pdDef">
One of {<span class="enumval">all</span>, <span class="enumval">choice</span>, <span class="enumval">sequence</span>}. Required.</div>
</div>
<div class="propDefn"><a name="mg-particles" shape="rect" id="mg-particles"></a><div class="pdName"><span class="propdef">{particles}</span></div>
<div class="pdDef">
A sequence of <a href="#p" class="compref" shape="rect">Particle</a> components. </div>
</div>
</div></div>
</div>
</div>
<div class="block">specifies a sequential (<b><i>sequence</i></b>),
disjunctive (<b><i>choice</i></b>) or conjunctive (<b><i>all</i></b>) interpretation of
the <a href="#mg-particles" class="propref" shape="rect">{particles}</a>. This in turn
determines whether the element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by the model group <span class="rfc2119">must</span>:
<ul><li><div class="p">(<b><i>sequence</i></b>) correspond, in order, to the specified <a href="#mg-particles" class="propref" shape="rect">{particles}</a>;</div></li><li><div class="p">(<b><i>choice</i></b>) correspond
to exactly one of the specified <a href="#mg-particles" class="propref" shape="rect">{particles}</a>;</div></li><li><div class="p">(<b><i>all</i></b>) correspond to the specified <a href="#mg-particles" class="propref" shape="rect">{particles}</a>. The elements can occur in any
order. </div></li></ul></div><p>When two or more
element declarations contained
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>,
<a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or
<a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a> in the
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a model group have identical names, the type definitions of those declarations <span class="rfc2119">must</span> be the
same. </p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#mg-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-contentModel" id="declare-contentModel" shape="rect"></a>3.8.2 XML Representation of Model Group Schema Components</h4><p>The XML representation for a model group schema component is
either an
<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, a <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or a <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>
element information item. The correspondences between the
properties of those information items
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component they correspond to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>all</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-all" name="element-all" shape="rect">&lt;all</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = <var>1</var>&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = (<var>0</var> | <var>1</var>)&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-any" class="eltref" shape="rect">any</a> | <a href="#element-group" class="eltref" shape="rect">group</a>)*)<br clear="none" />&lt;/all&gt;</p><p class="element-syntax"><a id="element-choice" name="element-choice" shape="rect">&lt;choice</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a> | <a href="#element-any" class="eltref" shape="rect">any</a>)*)<br clear="none" />&lt;/choice&gt;</p><p class="element-syntax"><a id="element-sequence" name="element-sequence" shape="rect">&lt;sequence</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a> | <a href="#element-any" class="eltref" shape="rect">any</a>)*)<br clear="none" />&lt;/sequence&gt;</p></div></div><p id="xr.mg3">Each of the
above items corresponds to a particle containing a model group,
with properties as follows (unless <code>minOccurs=maxOccurs=0</code>,
in which case the item corresponds to no component at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>minOccurs</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the <code>maxOccurs</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals <b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>maxOccurs</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A model group as given below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The same annotations as the <a href="#mg-annotations" class="propref" shape="rect">{annotations}</a> of
the model group. See below.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>The particle just described has a
<a href="#mg" class="compref" shape="rect">Model Group</a> as the value of its <a href="#p-term" class="propref" shape="rect">{term}</a> property, as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Model_Group_details" shape="rect">Model Group</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-compositor" class="propref" shape="rect">{compositor}</a></div><div class="mapRepr">One of <b><i>all</i></b>,
<b><i>choice</i></b>, <b><i>sequence</i></b> depending on the element
information item.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-particles" class="propref" shape="rect">{particles}</a></div><div class="mapRepr">A sequence of particles
corresponding to all the <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>,
<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>,
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> items among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>, or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> element, whichever is present, as defined
in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div></div><div class="div3">
<h4><a name="sec-src-model_group" id="sec-src-model_group" shape="rect"></a>3.8.3 Constraints on XML Representations of Model Groups</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-mgrp" id="sec-cvc-mgrp" shape="rect"></a>3.8.4 Model Group Validation Rules</h4><p>In order to define the validation rules for model
groups clearly, it will be useful to define some basic terminology;
this is done in the next two sections, before the validation rules
themselves are formulated.</p><div class="div4">
<h5><a name="group-recognition" id="group-recognition" shape="rect"></a>3.8.4.1 Language Recognition by Groups</h5><p>Each model group <var>M</var> denotes a language
<var>L</var>(<var>M</var>), whose members are the sequences of element information items
<a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>M</var>.</p><p>Within <var>L</var>(<var>M</var>) a smaller language <var>V</var>(<var>M</var>) can be
identified, which is of particular importance for schema-validity
assessment. The difference between the two languages is that
<var>V</var>(<var>M</var>) enforces some constraints which are ignored in the definition
of <var>L</var>(<var>M</var>).
Informally <var>L</var>(<var>M</var>) is the set of sequences which are accepted by a model
group if no account is taken of the schema component
constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> or the related provisions
in the validation rules which specify how to choose a unique <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a>
in a non-deterministic model group. By contrast, <var>V</var>(<var>M</var>) takes
account of those constraints and includes only the sequences which are
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>. For all model groups <var>M</var>, <var>V</var>(<var>M</var>) is a
subset of <var>L</var>(<var>M</var>). <var>L</var>(<var>M</var>) and related concepts are described in this
section; <var>V</var>(<var>M</var>) is described in the next section, <a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.
</p><p>
<span class="termdef"><a name="key-path" id="key-path" title="" shape="rect">[Definition:]&#160;&#160;</a>When a sequence <var>S</var> of element information
items is checked against a model group <var>M</var>, the sequence of
<a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a>
which the items of <var>S</var> match, in order, is a
<b>path</b> of <var>S</var> in <var>M</var>. For a given <var>S</var> and
<var>M</var>, the
path of <var>S</var> in
<var>M</var> is not necessarily unique.
Detailed rules for the matching, and thus for the construction of
paths, are given in <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and <a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>.
</span>
Not every sequence has a path in every model group, but every
sequence accepted by the model group does have a path.
<span class="termdef"><a name="key-complete-path" id="key-complete-path" title="" shape="rect">[Definition:]&#160;&#160;</a>For
a model group <var>M</var> and a sequence <var>S</var> in <var>L</var>(<var>M</var>), the path
of <var>S</var> in <var>M</var> is a <b>complete path</b>; prefixes of
complete paths which are themselves not complete paths
are <b>incomplete paths</b>.</span>
For example, in the model group</p><pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:element name="b"/&gt;
&lt;xs:element name="c"/&gt;
&lt;/xs:sequence&gt;</pre><p>the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;</code>)
and (<code>&lt;a/&gt;&lt;b/&gt;</code>) have <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
(the first a <a href="#key-complete-path" class="termref" shape="rect"><span class="arrow">&#183;</span>complete path<span class="arrow">&#183;</span></a> and the second
an <a href="#key-complete-path" class="termref" shape="rect"><span class="arrow">&#183;</span>incomplete path<span class="arrow">&#183;</span></a>),
but the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;</code>) and
(<code>&lt;a/&gt;&lt;x/&gt;</code>) do not
have paths.</p><div class="note"><div class="p"><b>Note:</b> It is possible, but unusual, for a model group to
have some paths which are neither complete paths, nor
prefixes of complete paths. For example, the model group
<pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:element name="b"/&gt;
&lt;xs:choice/&gt;
&lt;/xs:sequence&gt;</pre>
accepts no sequences because the empty <code>choice</code> recognizes
no input sequences. But the sequences (<code>&lt;a/&gt;</code>)
and (<code>&lt;a/&gt;&lt;b/&gt;</code>) have paths in the model group.</div></div><p>The definitions of <var>L</var>(<var>M</var>) and <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, when <var>M</var> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a> or
a <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particle<span class="arrow">&#183;</span></a>, are given in
<a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>. The definitions for groups are
given below.
</p><div class="div5">
<h6><a name="sec-sequences" id="sec-sequences" shape="rect"></a>3.8.4.1.1 Sequences</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is a sequence group.</p><p>If <var>M</var> is a <a href="#mg" class="compref" shape="rect">Model Group</a>,
and the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>sequence</i></b>,
and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ...,
<var>P</var><sub><var>n</var></sub>, then <var>L</var>(<var>M</var>) is the set of sequences <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... +
<var>Sn</var> (taking "+" as the concatenation operator), where
<var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.
The sequence of sequences <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of
<var>S</var>.
Less formally, when <var>M</var> is a sequence of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which is
accepted by <var>P</var><sub>1</sub>, then one accepted by <var>P</var><sub>2</sub>, and so on, up through
<var>P</var><sub><var>n</var></sub>, and then concatenating them together in order.</p><p><span class="termdef"><a name="key-partition" id="key-partition" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>partition</b> of a sequence is a sequence of sub-sequences,
some or all of which <span class="rfc2119">may</span> be empty, such that concatenating all
the sub-sequences yields the original sequence</span>.</p><div class="block">When <var>M</var> is a sequence group
and <var>S</var> is a sequence of input items, the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var>
in <var>M</var> is the set of all
paths <var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><var>j</var></sub>, where<ul><li><div class="p"><var>j</var> &#8804; <var>n</var>, and</div></li><li><div class="p"><var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>S</var><sub><var>j</var></sub> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>S</var><sub><var>j</var></sub> is
a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var>), and</div></li><li><div class="p"><var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>) for 0 &lt; <var>i</var> &lt; <var>j</var>, and</div></li><li><div class="p"><var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>P</var><sub><var>i</var></sub> for 0 &lt; <var>i</var> &#8804; <var>j</var>.</div></li></ul>
</div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
By this definition, some sequences which do not satisfy the
entire model group nevertheless have <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a model group.
For example, given the model group <var>M</var>
</div></div><div class="exampleInner">
<pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:element name="b"/&gt;
&lt;xs:element name="c"/&gt;
&lt;/xs:sequence&gt;</pre></div><div class="exampleWrapper">
<div class="p">and an input sequence <var>S</var></div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;a/&gt;&lt;b/&gt;</pre></div><div class="exampleWrapper">
<div class="p">where <var>n</var> = 3, <var>j</var> = 2, then
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>),
and
<var>S</var> has a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in <var>M</var>, even though <var>S</var> is not in
<var>L</var>(<var>M</var>). The <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> has two items, first the <a href="#p" class="compref" shape="rect">Particle</a>
for the <code>a</code> element, then the <a href="#p" class="compref" shape="rect">Particle</a> for the
<code>b</code> element.</div></div></div><p>When <var>M</var> is a sequence group,
the set <var>V</var>(<var>M</var>) (the set of sequences
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
Informally, <var>V</var>(<var>M</var>) contains those sequences which are
accepted by <var>M</var> and for which no element information item
is ever <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> if it can, in
context, instead be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
There will invariably be a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var> whose
members are <a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <a href="#mg-particles" class="propref" shape="rect">{particles}</a>
of <var>M</var>.
</p><div class="note"><div class="p"><b>Note:</b> For sequences with more than one <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in <var>M</var>,
the <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributions<span class="arrow">&#183;</span></a> of
the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> are used in validation and for determining
the contents of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>. For example, if <var>M</var> is
<pre xml:space="preserve">
&lt;xs:sequence&gt;
&lt;xs:any minOccurs="0"/&gt;
&lt;xs:element name="a" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;</pre>
then the sequence (<code>&lt;a/&gt;</code>) has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
in <var>M</var>, one containing just the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and the other
containing just the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>. It is the latter
which is a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> and which determines which
<a href="#p" class="compref" shape="rect">Particle</a> the item in the input is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b> There are model groups for which some members of
<var>L</var>(<var>M</var>) are not in <var>V</var>(<var>M</var>). For example, if <var>M</var> is
<pre xml:space="preserve">
&lt;xs:sequence&gt;
&lt;xs:any minOccurs="0"/&gt;
&lt;xs:element name="a"/&gt;
&lt;/xs:sequence&gt;</pre>
then the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is in <var>L</var>(<var>M</var>), but not
in <var>V</var>(<var>M</var>), because the validation rules require that the first
<code>a</code> be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
In a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> the initial <code>a</code> will invariably be
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, and so no sequence
with an initial <code>a</code> can be <a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against
this model group.</div></div></div><div class="div5">
<h6><a name="sec-choices" id="sec-choices" shape="rect"></a>3.8.4.1.2 Choices</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is a choice group.</p><p>When the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>choice</i></b>, and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><var>n</var></sub>,
then
<var>L</var>(<var>M</var>) is
<var>L</var>(<var>P</var><sub>1</sub>) &#8746; <var>L</var>(<var>P</var><sub>2</sub>) &#8746; ... &#8746; <var>L</var>(<var>P</var><sub><var>n</var></sub>),
and the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is the set
<var>Q</var> = <var>Q</var><sub>1</sub> &#8746; <var>Q</var><sub>2</sub> &#8746; ... &#8746; <var>Q</var><sub><var>n</var></sub>, where
<var>Q</var><sub><var>i</var></sub> is the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var><sub><var>i</var></sub>, for
0 &lt; <var>i</var> &#8804; <var>n</var>.
Less formally, when <var>M</var> is a choice of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) contains any sequence accepted by any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>,
and any <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>
is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>.
</p><p>The set <var>V</var>(<var>M</var>) (the set of sequences
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
In effect, this means that if one of the choices in <var>M</var>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> an initial element information item to
a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, and another <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> the same
item to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the latter choice is used
for validation.</p><div class="note"><div class="p"><b>Note:</b> For example, if <var>M</var> is
<pre xml:space="preserve">
&lt;xs:choice&gt;
&lt;xs:any/&gt;
&lt;xs:element name="a"/&gt;
&lt;/xs:choice&gt;</pre>
then the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> for the sequence (<code>&lt;a/&gt;</code>)
contains just the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and it is to the
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> that the input element will be
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a>; the alternate <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a>
containing just the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> is not relevant for
validation as defined in this specification.
</div></div></div><div class="div5">
<h6><a name="all-mg" id="all-mg" shape="rect"></a>3.8.4.1.3 All-groups</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is an all-group.</p><p>When the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>all</i></b>, and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><var>n</var></sub>,
then
<var>L</var>(<var>M</var>) is the set of sequences
<var>S</var> = <var>S</var><sub>1</sub> &#215; <var>S</var><sub>2</sub> &#215; ... &#215; <var>Sn</var>
(taking "&#215;" as the interleave operator),
where
for 0 &lt; <var>i</var> &#8804; <var>n</var>, <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>).
The set of sequences
{<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a <a href="#key-grouping" class="termref" shape="rect"><span class="arrow">&#183;</span>grouping<span class="arrow">&#183;</span></a> of <var>S</var>.
The set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is
the set of all <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
<var>Q</var> = <var>Q</var><sub>1</sub> &#215; <var>Q</var><sub>2</sub> &#215; ... &#215; <var>Q</var><sub><var>n</var></sub>,
where <var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>P</var><sub><var>i</var></sub>,
for 0 &lt; <var>i</var> &#8804; <var>n</var>.
</p><p>
Less formally, when <var>M</var> is an <b><i>all</i></b>-group of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which
is accepted by <var>P</var><sub>1</sub>,
then one accepted by <var>P</var><sub>2</sub>,
and so on, up through <var>P</var><sub><var>n</var></sub>, and then interleaving them
together. Equivalently, <var>L</var>(<var>M</var>) is the set of sequences <var>S</var>
such that the set {<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a
<a href="#key-grouping" class="termref" shape="rect"><span class="arrow">&#183;</span>grouping<span class="arrow">&#183;</span></a> of <var>S</var>, and
for 0 &lt; <var>i</var> &#8804; <var>n</var>, <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>).
</p><p><span class="termdef"><a name="key-grouping" id="key-grouping" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>grouping</b> of a sequence is a set of sub-sequences, some or
all of which may be empty, such that each member of the original
sequence appears once and only once in one of the sub-sequences and
all members of all sub-sequences are in the original
sequence.</span> </p><div class="block">For example, given the model group <var>M</var>
<pre xml:space="preserve"> &lt;xs:all&gt;
&lt;xs:element name="a" minOccurs="0" maxOccurs="5"/&gt;
&lt;xs:element name="b" minOccurs="1" maxOccurs="1"/&gt;
&lt;xs:element name="c" minOccurs="0" maxOccurs="5"/&gt;
&lt;/xs:all&gt;</pre>
and an input sequence <var>S</var> <pre xml:space="preserve">&lt;a/&gt;&lt;b/&gt;&lt;a/&gt;</pre>
where <var>n</var> = 3, then
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>),
and the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of
<var>S</var> in <var>M</var> is the sequence containing first the <a href="#p" class="compref" shape="rect">Particle</a>
for the <code>a</code> element, then the <a href="#p" class="compref" shape="rect">Particle</a> for the
<code>b</code> element, then once more the
<a href="#p" class="compref" shape="rect">Particle</a> for the <code>a</code> element.
</div><p>The set <var>V</var>(<var>M</var>) (the set of sequences
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
In effect, this means that if one of the <a href="#p" class="compref" shape="rect">Particles</a> in <var>M</var>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> an element information item to
a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, and a <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competing<span class="arrow">&#183;</span></a> <a href="#p" class="compref" shape="rect">Particle</a>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> the same item to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> is used for validation.</p><div class="note"><div class="p"><b>Note:</b> For example, if <var>M</var> is
<pre xml:space="preserve">
&lt;xs:all&gt;
&lt;xs:any/&gt;
&lt;xs:element name="a"/&gt;
&lt;/xs:all&gt;</pre>
then <var>M</var> accepts sequences of length two, containing
one <code>a</code> element and one other element.
</div><div class="p">
The other element can be anything at all, including a second
<code>a</code> element. After the first <code>a</code>
the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> accepts no more elements
and so no longer <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
So if the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>)
is checked against <var>M</var>, in the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> the
first <code>a</code> element will be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a>
the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and the second to the
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</div><div class="p">If the intention is not to allow the second <code>a</code>,
use a wildcard that explicitly disallows it. That is,
<pre xml:space="preserve">
&lt;xs:all&gt;
&lt;xs:any notQName="a"/&gt;
&lt;xs:element name="a"/&gt;
&lt;/xs:all&gt;</pre>
Now the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is not
accepted by the particle.
</div></div></div><div class="div5">
<h6><a name="sec-multiplepaths" id="sec-multiplepaths" shape="rect"></a>3.8.4.1.4 Multiple Paths in Groups</h6><p>It is possible for a given sequence of element information items
to have multiple <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a given model group <var>M</var>; this is
the case, for example, when <var>M</var> is ambiguous, as for example</p><pre xml:space="preserve"> &lt;xs:choice&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="my:a" maxOccurs="unbounded"/&gt;
&lt;xs:element ref="my:b"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="my:a"/&gt;
&lt;xs:element ref="my:b" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:choice&gt;</pre><p>which can match the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>)
in more than one way.
It may also be the case with unambiguous model groups, if
they do not correspond to a <a href="http://www.w3.org/TR/xml11/#determinism" shape="rect">deterministic</a>
expression (as it is termed in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>)
or a "1-unambiguous" expression, as it
is defined by <a href="#ABK-DW" shape="rect">[Br&#252;ggemann-Klein / Wood 1998]</a>.
For example,</p><pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a" minOccurs="0"/&gt;
&lt;xs:element name="a"/&gt;
&lt;/xs:sequence&gt;</pre><div class="note"><div class="p"><b>Note:</b> Because these model groups do not obey the
constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>, they cannot
appear in a conforming schema.</div></div></div></div><div class="div4">
<h5><a name="group-validation" id="group-validation" shape="rect"></a>3.8.4.2 Principles of Validation against Groups</h5><p>As noted above, each model group <var>M</var> denotes a
language <var>L</var>(<var>M</var>), whose members are sequences of element information
items. Each member of <var>L</var>(<var>M</var>) has one or more <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, as do
other sequences of element information items.</p><p>By imposing conditions on <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a model group <var>M</var>
it is possible to identify a set of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> in <var>M</var>,
such that if <var>M</var> is a
model group which obeys the
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> constraint, then
any sequence <var>S</var> has at most one <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
The language <var>V</var>(<var>M</var>) can then be defined as the set of
sequences which have <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> in <var>M</var>.</p><p><span class="termdef"><a name="key-compete" id="key-compete" title="" shape="rect">[Definition:]&#160;&#160;</a>Two
<a href="#p" class="compref" shape="rect">Particles</a> <var>P</var><sub>1</sub> and <var>P</var><sub>2</sub> contained in some <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
<b>compete</b> with each other if and only if some sequence <var>S</var>
of element information items has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which are
identical except that one path has <var>P</var><sub>1</sub> as its last item and the other
has <var>P</var><sub>2</sub>.</span></p><p>For example, in the content model</p><pre xml:space="preserve"> &lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:choice&gt;
&lt;xs:element name="b"/&gt;
&lt;xs:any/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;</pre><p>the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>) has two paths,
one (<var>Q</var><sub>1</sub>) consisting of the <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>a</code> followed by the
<a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>b</code>, and
a second (<var>Q</var><sub>2</sub>) consisting of the <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>a</code> followed by the
<a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the wildcard. The sequences <var>Q</var><sub>1</sub> and <var>Q</var><sub>2</sub> are
identical except for their last items, and so the
two <a href="#p" class="compref" shape="rect">Particles</a> which are the last items of <var>Q</var><sub>1</sub> and
<var>Q</var><sub>2</sub> are said to <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other.
</p><div class="block">By contrast, in the content model
<pre xml:space="preserve">
&lt;xs:choice&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="a"/&gt;
&lt;xs:element name="b"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="c"/&gt;
&lt;xs:any/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:choice&gt;</pre>
the <a href="#p" class="compref" shape="rect">Particles</a> for <code>b</code> and the
wildcard do not <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a>, because there is no
pair of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which differ only in one
having the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> for <code>b</code> and
the other having the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</div><p><span class="termdef"><a name="key-competing-paths" id="key-competing-paths" title="" shape="rect">[Definition:]&#160;&#160;</a>Two
(or more) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of a sequence <var>S</var> in a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
are <b>competing paths</b> if and only if
they are identical except for their final items, which
differ.</span></p><p><span class="termdef"><a name="key-vpath" id="key-vpath" title="" shape="rect">[Definition:]&#160;&#160;</a>For any sequence <var>S</var> of element
information items and any particle <var>P</var>, a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a <b>validation-path</b> if and only if for each
prefix of the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> which ends with a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the
corresponding prefix of <var>S</var> has no <a href="#key-competing-paths" class="termref" shape="rect"><span class="arrow">&#183;</span>competing path<span class="arrow">&#183;</span></a> which
ends with an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
</span></p><div class="note"><div class="p"><b>Note:</b> It is a consequence of the definition of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> that for
any content model <var>M</var> which obeys constraint
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> and for any sequence <var>S</var> of
element information items, <var>S</var> has at most one
<a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
</div></div><p><span class="termdef"><a name="key-lvip" id="key-lvip" title="" shape="rect">[Definition:]&#160;&#160;</a>A sequence <var>S</var> of
element information items is <b>locally valid</b> against
a particle <var>P</var> if and only if
<var>S</var> has a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>P</var>. The set of all such
sequences is written <var>V</var>(<var>P</var>).</span></p></div><div class="div4">
<h5><a name="sec-cvc-model-group" id="sec-cvc-model-group" shape="rect"></a>3.8.4.3 Element Sequence Valid</h5><div class="constraintnote"><a id="cvc-model-group" name="cvc-model-group" shape="rect"></a><b>Validation Rule: Element Sequence Valid</b><br clear="none" /><div class="constraint"><div class="p">For a sequence <var>S</var> (possibly empty) of element information items to be
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
a model group <var>M</var>, <var>S</var> <span class="rfc2119">must</span> be in <var>V</var>(<var>M</var>).
</div><div class="note"><div class="p"><b>Note:</b> It is possible to define groups whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a>
is empty. When a <b><i>choice</i></b>-group <var>M</var> has an empty
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property, then
<var>L</var>(<var>M</var>) is the empty set.
When <var>M</var> is a <b><i>sequence</i></b>- or <b><i>all</i></b>-group with an empty
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property, then
<var>L</var>(<var>M</var>) is the set containing the empty (zero-length) sequence.
</div></div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-mgrp" id="sec-sic-mgrp" shape="rect"></a>3.8.5 Model Group Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-modelGroup" id="coss-modelGroup" shape="rect"></a>3.8.6 Constraints on Model Group Schema Components</h4><p>All model groups (see <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-mg-props-correct" id="sec-mg-props-correct" shape="rect"></a>3.8.6.1 Model Group Correct</h5><div class="constraintnote"><a id="mg-props-correct" name="mg-props-correct" shape="rect"></a><b>Schema Component Constraint: Model Group Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a model group are as
described in the property tableau in
<a href="#Model_Group_details" shape="rect">The Model Group Schema Component (&#167;3.8.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2<a id="no-circular-groups" name="no-circular-groups" shape="rect"> </a><span class="p">There are no circular
groups. That is, within the
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a group there
is no
particle at any depth whose
<a href="#p-term" class="propref" shape="rect">{term}</a> is the group itself.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-all-limited" id="sec-cos-all-limited" shape="rect"></a>3.8.6.2 All Group Limited</h5><div class="constraintnote"><a id="cos-all-limited" name="cos-all-limited" shape="rect"></a><b>Schema Component Constraint: All Group Limited</b><br clear="none" /><div class="constraint"><div class="p">When a model group has <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> <b><i>all</i></b>, then
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">It appears only as the value of one or more of the following properties:</span><div class="constraintlist"><div class="clnumber">1.1 <span class="p">the <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> property of a model group definition.</span></div>
<div class="clnumber">1.2 <span class="p">the <a href="#p-term" class="propref" shape="rect">{term}</a> property of a <a href="#p" class="compref" shape="rect">Particle</a> with
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a><code> = 1</code> which is
the <a href="#ct-particle" class="propref" shape="rect">{particle}</a>
of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of a complex
type definition.</span></div>
<div class="clnumber">1.3 <span class="p">the <a href="#p-term" class="propref" shape="rect">{term}</a> property of a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> with
<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> <code>=</code>
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> <code>= 1</code>, where
<var>P</var> is among the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a
<a href="#mg" class="compref" shape="rect">Model Group</a> whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
<b><i>all</i></b>.</span></div>
</div></div>
<div class="clnumber">2 <span class="p">For every particle <var>P</var> in its <a href="#mg-particles" class="propref" shape="rect">{particles}</a>,
if <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a model group,
then <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a>.<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
= <b><i>all</i></b>.</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-element-consistent" id="sec-cos-element-consistent" shape="rect"></a>3.8.6.3 Element Declarations Consistent</h5><div class="constraintnote"><a id="cos-element-consistent" name="cos-element-consistent" shape="rect"></a><b>Schema Component Constraint: Element Declarations Consistent</b><br clear="none" /><div class="constraint"><div class="p">If the <a href="#mg-particles" class="propref" shape="rect">{particles}</a>
property contains, either
directly, indirectly (that is, within the <a href="#mg-particles" class="propref" shape="rect">{particles}</a>
property of a
contained model group, recursively),
or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>, two or more
element
declarations with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>, then all their type
definitions <span class="rfc2119">must</span> be the same top-level definition, that is,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">All
their declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s have a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#ctd-name" class="propref" shape="rect">{name}</a>.</span></div>
<div class="clnumber">2 <span class="p">All
their
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s have the same
<a href="#ctd-name" class="propref" shape="rect">{name}</a>.</span></div>
<div class="clnumber">3 <span class="p">All
their
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s have the same
<a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>.</span></div>
<div class="clnumber">4 <span class="p">All their <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>s are either
all <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or else all are present and
<a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.</span></div>
</div>
</div><div class="p">If
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
The <a href="#mg-particles" class="propref" shape="rect">{particles}</a> property contains (either directly,
indirectly, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>) one or more
element declarations with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>Q</var>;
call these element
declarations <var>EDS</var>.
</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
At least <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
The <a href="#mg-particles" class="propref" shape="rect">{particles}</a> property contains one or more
<b><i>strict</i></b> or <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a> which <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> <var>Q</var>.
</span></div>
<div class="clnumber">2.2 <span class="p">
The <a href="#mg" class="compref" shape="rect">Model Group</a> is the <a href="#p-term" class="propref" shape="rect">{term}</a> of the
<a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> of some <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and
<var>CTD</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has an <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
with a <b><i>strict</i></b> or <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> which
<a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>Q</var>.
</span></div>
</div>
</div>
<div class="clnumber">3 <span class="p">
There exists a top-level element declaration <var>G</var> with the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
<var>Q</var>.
</span></div>
</div>
then the <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>s of <var>EDS</var>
and the <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> of
<var>G</var> <span class="rfc2119">must</span> either
all be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or else all be present and
<a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.</div><div class="p"><span class="termdef"><a name="key-impl-cont" id="key-impl-cont" title="" shape="rect">[Definition:]&#160;&#160;</a>A list
of particles <b>implicitly contains</b> an element declaration if and only if a
member of the list contains that
element declaration in its <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a></span>.</div><div class="p"><div class="termdef"><a name="key-equiv-tt" id="key-equiv-tt" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T1</var> is <b>equivalent</b> to a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T2</var>
if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>T1</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> has the same length as <var>T2</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and their
corresponding entries are <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>T1</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> and <var>T2</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> are
<a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
</span></div>
</div></div></div><div class="p">
<div class="termdef"><a name="key-equiv-ta" id="key-equiv-ta" title="" shape="rect">[Definition:]&#160;&#160;</a>
Any <a href="#tac" class="compref" shape="rect">Type Alternative</a> is <b>equivalent</b> to itself.
Otherwise, any <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>T1</var> is <b>equivalent</b>
to a different <a href="#tac" class="compref" shape="rect">Type Alternative</a>
<var>T2</var> if and only if
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> and
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> are true for the same
set of input element information items
and
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> accept
the same set of input information items as valid.
In the general case, equivalence and non-equivalence
can be difficult to establish.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under just what conditions a
processor detects that two type
alternatives are equivalent, but all
processors <span class="rfc2119">must</span> detect <var>T1</var> and <var>T2</var> as
equivalent if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
have the same number of <a href="#nb" class="compref" shape="rect">Namespace Binding</a>s, and for each entry in
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
there is a corresponding entry in
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
with the same <a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value.
</span></div>
<div class="clnumber">3 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value.
</span></div>
<div class="clnumber">4 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
have the same value.
</span></div>
<div class="clnumber">5 <span class="p">
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> are the same type definition.
</span></div>
</div>
A processor <span class="rfc2119">may</span> treat two type alternatives as
non-equivalent if they do not satisfy the conditions just
given and the processor does not detect that they
are nonetheless equivalent.
</div></div><div class="note"><div class="p"><b>Note:</b>
In the general case, equivalence can be
difficult to prove, so the minimum required of implementations
is kept relatively simple. Schema authors can avoid
interoperability issues by ensuring that any type alternatives
for which equivalence must be established do satisfy
the tests above.
Implementations <span class="rfc2119">may</span> recognize cases
when differences of namespace bindings, base URIs,
and white space in the XPath expression do not affect
the meaning of the expression.
</div></div></div></div></div><div class="div4">
<h5><a name="sec-cos-nonambig" id="sec-cos-nonambig" shape="rect"></a>3.8.6.4 Unique Particle Attribution</h5><p>
<span class="termdef"><a name="key-ep" id="key-ep" title="" shape="rect">[Definition:]&#160;&#160;</a>
An <b>element particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
</span>
<span class="termdef"><a name="key-wp" id="key-wp" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <b>wildcard particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#w" class="compref" shape="rect">Wildcard</a>.
Wildcard particles may be
referred to as "strict", "lax",
or "skip" particles,
depending on the
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property
of their <a href="#p-term" class="propref" shape="rect">{term}</a>.</span>
</p><div class="constraintnote"><a id="cos-nonambig" name="cos-nonambig" shape="rect"></a><b>Schema Component Constraint: Unique Particle Attribution</b><br clear="none" /><div class="constraint"><div class="p">A content model <span class="rfc2119">must not</span> contain two
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> which <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other, nor two
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a> which <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other.</div></div></div><div class="note"><div class="p"><b>Note:</b> Content models in which an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
<a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other are <em>not</em> prohibited.
In such cases, the <a href="#ed" class="compref" shape="rect">Element Declaration</a> is chosen;
see the definitions of
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a>
and <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b> This constraint reconstructs for XSD the equivalent
constraints of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and SGML. See
<a href="#non-ambig" shape="rect">Analysis of the Unique Particle Attribution Constraint (non-normative) (&#167;J)</a> for further
discussion.</div><div class="p">Since this constraint is expressed at the component level, it
applies to content models whose origins (e.g. via type <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> and
references to named model groups) are no longer evident. So particles at
different points in the content model are always distinct from one another,
even if they originated from the same named model group.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>, together with
the definition of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>, that any sequence <var>S</var> of element
information items has at most one <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in any particle <var>P</var>.
This means in turn that each item in <var>S</var> is attributed to at most one particle in <var>P</var>.
No item can match more than one <a href="#w" class="compref" shape="rect">Wildcard</a>
or more than one <a href="#ed" class="compref" shape="rect">Element Declaration</a> (because no two <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>
and no two <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> <span class="rfc2119">may</span> <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a>), and if an item matches
both a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> by
the rules for <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> to the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.</div></div><div class="note"><div class="p"><b>Note:</b> Because locally-scoped element declarations sometimes
have and sometimes do not have a
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a>, the scope of
declarations is <em>not</em> relevant to enforcing either
the
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> constraint or the
<a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> constraint.</div></div></div><div class="div4">
<h5><a name="sec-cos-seq-range" id="sec-cos-seq-range" shape="rect"></a>3.8.6.5 Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>)</h5><p>The following constraints define relations appealed to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-seq-range" name="cos-seq-range" shape="rect"></a><b>Schema Component Constraint: Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>)</b><br clear="none" /><div class="constraint"><div class="p">The effective total range of a particle <var>P</var>
whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a group <var>G</var>
whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
<b><i>all</i></b> or <b><i>sequence</i></b> is a pair of minimum and maximum, as follows: </div><div class="glist"><div class="gitem"><div class="giLabel">minimum</div><div class="giDef"><div class="p">The product of <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and the
sum of the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> of every wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the minimum
part of the effective total range of each of the group particles in
<var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> (or <code>0</code>
if there are no
<a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div><div class="gitem"><div class="giLabel">maximum</div><div class="giDef"><div class="p"><b><i>unbounded</i></b> if the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of any wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> or the maximum
part of the effective total range of any of the group particles in
<var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is <b><i>unbounded</i></b>,
or if any of those is non-zero
and <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>
= <b><i>unbounded</i></b>,
otherwise the product of <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the
sum of the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of every wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the maximum
part of the effective total range of each of the group particles in
<var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a>
(or <code>0</code> if there are no
<a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div></div></div></div></div><div class="div4">
<h5><a name="sec-cos-choice-range" id="sec-cos-choice-range" shape="rect"></a>3.8.6.6 Effective Total Range (<b><i>choice</i></b>)</h5><div class="constraintnote"><a id="cos-choice-range" name="cos-choice-range" shape="rect"></a><b>Schema Component Constraint: Effective Total Range (<b><i>choice</i></b>)</b><br clear="none" /><div class="constraint"><div class="p">The effective total range of a particle <var>P</var>
whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a group <var>G</var>
whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
<b><i>choice</i></b> is a pair of minimum and maximum, as follows:</div><div class="glist"><div class="gitem"><div class="giLabel">minimum</div><div class="giDef"><div class="p">The product of <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and the
minimum of the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> of every wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and
the minimum part of the effective total range of each of the group particles
in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a>
(or <code>0</code> if there are no <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div><div class="gitem"><div class="giLabel">maximum</div><div class="giDef"><div class="p"><b><i>unbounded</i></b> if the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of any wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> or the maximum
part of the effective total range of any of the group particles in
<var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is <b><i>unbounded</i></b>,
or if any of those is non-zero and
<var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <b><i>unbounded</i></b>,
otherwise the product of <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the
maximum of the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of every wildcard or element
declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the maximum
part of the effective total range of each of the group particles in
<var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a>
(or <code>0</code> if there are no <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div></div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Model_Groups" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Wildcards" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cParticles" id="cParticles" shape="rect"></a>3.9 Particles</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.1 <a href="#Particle_details" shape="rect">The Particle Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.2 <a href="#declare-particles" shape="rect">XML Representation of Particle Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.3 <a href="#sec-src-p" shape="rect">Constraints on XML Representations of Particles</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4 <a href="#sec-cvc-p" shape="rect">Particle Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.1 <a href="#particle-validation" shape="rect">Principles of Validation against Particles</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.2 <a href="#sec-cvc-particle" shape="rect">Element Sequence Locally Valid (Particle)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.3 <a href="#sec-cvc-accept" shape="rect">Element Sequence Accepted (Particle)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.5 <a href="#sec-sic-p" shape="rect">Particle Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6 <a href="#coss-particle" shape="rect">Constraints on Particle Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.1 <a href="#sec-p-props-correct" shape="rect">Particle Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.2 <a href="#sec-cos-particle-extend" shape="rect">Particle Valid (Extension)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.3 <a href="#sec-cos-group-emptiable" shape="rect">Particle Emptiable</a><br clear="none" />
</div><p>As described in <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>, particles contribute
to the definition
of content models.</p><p>When an element is validated against a complex type,
its sequence of child elements is checked against the content model of
the complex type and the children are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> to
<a href="#p" class="compref" shape="rect">Particles</a> of the content model.
The attribution of items to <a href="#p" class="compref" shape="rect">Particles</a>
determines the calculation of the items'
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
declarations<span class="arrow">&#183;</span></a>
and thus partially determines the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing
element declarations<span class="arrow">&#183;</span></a> for the children:
when
an element information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, that <a href="#p" class="compref" shape="rect">Particle</a>'s <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
or an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for it,
becomes
the item's <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
declaration<span class="arrow">&#183;</span></a> and
thus normally its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>; when the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>
depends on the <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property of the wildcard and
on <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element ref="egg" minOccurs="12" maxOccurs="12"/&gt;
&lt;xs:group ref="omelette" minOccurs="0"/&gt;
&lt;xs:any maxOccurs="unbounded"/&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations which all involve particles, illustrating some of
the possibilities for controlling occurrence.</div></div></div><div class="div3">
<h4><a name="Particle_details" id="Particle_details" shape="rect"></a>3.9.1 The Particle Schema Component</h4><p>The particle schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="p" id="p" shape="rect">Particle</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="p-min_occurs" shape="rect" id="p-min_occurs"></a><div class="pdName"><span class="propdef">{min occurs}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value. Required.</div>
</div>
<div class="propDefn"><a name="p-max_occurs" shape="rect" id="p-max_occurs"></a><div class="pdName"><span class="propdef">{max occurs}</span></div>
<div class="pdDef">
Either a positive integer or <b><i>unbounded</i></b>. Required.</div>
</div>
<div class="propDefn"><a name="p-term" shape="rect" id="p-term"></a><div class="pdName"><span class="propdef">{term}</span></div>
<div class="pdDef">
A <a href="#t" class="compref" shape="rect">Term</a> component. Required.</div>
</div>
<div class="propDefn"><a name="p-annotations" shape="rect" id="p-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
</div></div>
</div>
</div>
<p>In general, multiple element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, possibly with intervening character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> if the content type
is <b><i>mixed</i></b>, can be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with
respect to a single particle. When the <a href="#p-term" class="propref" shape="rect">{term}</a> is an element
declaration or wildcard, <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> determines the minimum number of such element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> that can occur. The number of such children <span class="rfc2119">must</span> be greater than or equal to <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>. If <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is <b><i>0</i></b>, then occurrence of such children is optional.</p><p>Again, when the <a href="#p-term" class="propref" shape="rect">{term}</a> is an element
declaration or wildcard, the number of such element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <span class="rfc2119">must</span> be less than or equal to any numeric specification of
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>; if <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is <b><i>unbounded</i></b>, then there is no
upper bound on the number of such children.</p><p>When the <a href="#p-term" class="propref" shape="rect">{term}</a> is a model group, the permitted
occurrence range is determined by a combination of <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the occurrence ranges of the <a href="#p-term" class="propref" shape="rect">{term}</a>'s <a href="#mg-particles" class="propref" shape="rect">{particles}</a>.</p><p>
<span class="termdef"><a name="key-contain-dpt" id="key-contain-dpt" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle
<b>directly contains</b> the component which is the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</span>
<span class="termdef"><a name="key-contain-ipx" id="key-contain-ipx" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are contained by the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</span>
<span class="termdef"><a name="key-contain-xpx" id="key-contain-xpx" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle
<b>contains</b> the components which it either
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</span>
</p><p>
See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#p-annotations" class="propref" shape="rect">{annotations}</a> property.
</p></div><div class="div3">
<h4><a name="declare-particles" id="declare-particles" shape="rect"></a>3.9.2 XML Representation of Particle Schema Components</h4><div class="block"><a name="anchor11228" id="anchor11228" shape="rect"></a>
Particles in the schema typically
correspond to element
information items that can bear <code>minOccurs</code> and <code>maxOccurs</code>
attributes in the schema document:<ul><li><div class="p">Local <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, see <a href="#declare-element" shape="rect">XML Representation of Element Declaration Schema Components (&#167;3.3.2)</a></div></li><li><div class="p">Model groups <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, and <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>, see <a href="#declare-contentModel" shape="rect">XML Representation of Model Group Schema Components (&#167;3.8.2)</a></div></li><li><div class="p">Group references <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, see <a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components (&#167;3.7.2)</a></div></li><li><div class="p">Wildcard <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>, see <a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a></div></li></ul>
Sometimes particles do not correspond to any of these
elements. For example, particles may be synthesized in complex
type extension.
</div></div><div class="div3">
<h4><a name="sec-src-p" id="sec-src-p" shape="rect"></a>3.9.3 Constraints on XML Representations of Particles</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-p" id="sec-cvc-p" shape="rect"></a>3.9.4 Particle Validation Rules</h4><div class="div4">
<h5><a name="particle-validation" id="particle-validation" shape="rect"></a>3.9.4.1 Principles of Validation against Particles</h5><p>Every particle <var>P</var> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>recognizes<span class="arrow">&#183;</span></a> some language <var>L</var>(<var>P</var>).
When <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of <var>P</var> are
both 1, <var>L</var>(<var>P</var>) is the language of <var>P</var>'s <a href="#p-term" class="propref" shape="rect">{term}</a>,
as described in <a href="#term-recognition" shape="rect">Validation of Basic Terms (&#167;3.9.4.1.2)</a>. The
following section (<a href="#particle-recognition" shape="rect">Language Recognition for Repetitions (&#167;3.9.4.1.1)</a>)
describes how more complicated counts are handled.</p><div class="div5">
<h6><a name="particle-recognition" id="particle-recognition" shape="rect"></a>3.9.4.1.1 Language Recognition for Repetitions</h6><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>n</var>,
and <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>,
then <var>L</var>(<var>P</var>) is the set of sequences <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>Sn</var> such that <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.
Less formally: <var>L</var>(<var>P</var>) is
the
set of sequences which have <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partitions<span class="arrow">&#183;</span></a> into <var>n</var> sub-sequences
for which each of the <var>n</var> subsequences
is in the language accepted by the <a href="#p-term" class="propref" shape="rect">{term}</a> of <var>P</var>.
</p><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>j</var>
and <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>k</var>,
and <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>,
then <var>L</var>(<var>P</var>) is the set of sequences <var>S</var> = <var>S</var><sub>1</sub>, + <var>S</var><sub>2</sub> + ... + <var>Sn</var>, i.e. the
set of sequences which have <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partitions<span class="arrow">&#183;</span></a> into <var>n</var> sub-sequences
such that <var>n</var> &#8805; <var>j</var> and <var>n</var> &#8804; <var>k</var> (or <var>k</var> is <b><i>unbounded</i></b>)
and <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.</p><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = 0,
then <var>L</var>(<var>P</var>) also includes the empty sequence.</p><div class="block">If (1) <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> has
<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>j</var>, <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>k</var>, and <a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>,
and (2) <var>S</var> is a sequence of element information items
such that <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>Sn</var> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is
a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var>),
and (3) <var>n</var> &#8804; <var>k</var> (or <var>k</var> is <b><i>unbounded</i></b>),
and (4) <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &lt; <var>n</var>,
then:
<ul><li><div class="p">If <var>T</var> is a model group,
then the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is the set of all <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> <var>Q</var> such that
<var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><var>n</var></sub>, where
<var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>T</var> for 0 &lt; <var>i</var> &#8804; <var>n</var>.
(For the definition of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in model groups,
see <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.)
</div></li><li><div class="p">
If <var>T</var> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>, then the (sole) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a sequence of <var>n</var> occurrences of <var>P</var>.
</div></li></ul>
<div class="note"><div class="p"><b>Note:</b>
Informally: the path of an input sequence <var>S</var> in a
particle <var>P</var> may go through the <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a> in
<var>P</var> as many times as is allowed by
<var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.
If the path goes through <var>P</var> more than once, each
time before the last one must correspond to a sequence
accepted by
<var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a>;
because the last
iteration in the path
may not be complete, it need not be accepted by the
<a href="#p-term" class="propref" shape="rect">{term}</a>.</div></div>
</div></div><div class="div5">
<h6><a name="term-recognition" id="term-recognition" shape="rect"></a>3.9.4.1.2 Validation of Basic Terms</h6><p>In the preceding section (<a href="#particle-recognition" shape="rect">Language Recognition for Repetitions (&#167;3.9.4.1.1)</a>), the language <var>L</var>(<var>P</var>) <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by a
<a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> is defined in terms of the language <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>P</var>'s
<a href="#p-term" class="propref" shape="rect">{term}</a>. This section defines <var>L</var>(<var>T</var>) for <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic terms<span class="arrow">&#183;</span></a>;
for the definition of <var>L</var>(<var>T</var>) when <var>T</var> is a group,
see <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.</p><p>
<span class="termdef"><a name="key-L.ed" id="key-L.ed" title="" shape="rect">[Definition:]&#160;&#160;</a>
For any <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var>, the language
<b><var>L</var>(<var>D</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>D</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>D</var>.</span></p><div class="p">
<div class="termdef"><a name="key-e-d-match" id="key-e-d-match" title="" shape="rect">[Definition:]&#160;&#160;</a>
An element information item <var>E</var> <b>matches</b> an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var> if and only if
<b>one</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>,</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>E</var> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an element
declaration <var>D</var><sub>2</sub> which is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a>
for <var>D</var>.</span></div>
</div>
</div>
</div><div class="p"><div class="termdef"><a name="key-en-match" id="key-en-match" title="" shape="rect">[Definition:]&#160;&#160;</a>An
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var> <b>matches</b> an
<a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a> <var>N</var> and
a namespace name <var>NS</var> (or, equivalently, <var>N</var> and <var>NS</var>
<b>match</b> <var>E</var>)
if and only if all of the following
are true:
<ul><li><div class="p">The local name of <var>E</var> is identical to <var>N</var>.</div></li><li><div class="p">Either the namespace name of <var>E</var> is identical to <var>NS</var>,
or else <var>E</var> has no namespace name (<var>E</var> is an unqualified
name) and <var>NS</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></li></ul>
</div>
</div><div class="note"><div class="p"><b>Note:</b> For convenience, <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>
are sometimes spoken of as <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matching<span class="arrow">&#183;</span></a>
a <a href="#td" class="compref" shape="rect">Type Definition</a>, an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>,
or other schema component which has both a <span class="anonRef">{name}</span>
and a <span class="anonRef">{target namespace}</span> property (or vice versa,
the component is spoken of as <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matching<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>), when what is meant
is, strictly speaking, that the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> the <span class="anonRef">{name}</span>
and <span class="anonRef">{target namespace}</span>
properties of the component.</div></div><p>
<span class="termdef"><a name="key-L.w" id="key-L.w" title="" shape="rect">[Definition:]&#160;&#160;</a>
For any <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>, the language
<b><var>L</var>(<var>W</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>W</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>W</var>.</span>
</p><p><a name="anchor6159-2" id="anchor6159-2" shape="rect"></a>
<span class="termdef"><a name="key-wc-match" id="key-wc-match" title="" shape="rect">[Definition:]&#160;&#160;</a>An element information item <var>E</var>
<b>matches</b> a <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>
(or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is <var>W</var>)
if and only if <var>E</var>
is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>W</var>, as defined in the validation rule
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</span>
</p><p><span class="termdef"><a name="key-ns-match" id="key-ns-match" title="" shape="rect">[Definition:]&#160;&#160;</a>Two namespace
names <var>N</var><sub>1</sub> and <var>N</var><sub>2</sub> are said to <b>match</b>
if and only if they are identical or both are <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></p><p>For principles of validation when the <a href="#p-term" class="propref" shape="rect">{term}</a> is a model group
instead of a <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particle<span class="arrow">&#183;</span></a>, see
<a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and
<a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.</p></div></div><div class="div4">
<h5><a name="sec-cvc-particle" id="sec-cvc-particle" shape="rect"></a>3.9.4.2 Element Sequence Locally Valid (Particle)</h5><div class="constraintnote"><a id="cvc-particle" name="cvc-particle" shape="rect"></a><b>Validation Rule: Element Sequence Locally Valid (Particle)</b><br clear="none" /><div class="constraint"><div class="p">For a sequence (possibly empty) of element information items to be
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
<a href="#p" class="compref" shape="rect">Particle</a>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The sequence must be accepted by the <a href="#p" class="compref" shape="rect">Particle</a>, as defined
in <a href="#cvc-accept" shape="rect">Element Sequence Accepted (Particle) (&#167;3.9.4.3)</a>.</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cvc-accept" id="sec-cvc-accept" shape="rect"></a>3.9.4.3 Element Sequence Accepted (Particle)</h5><div class="constraintnote"><a id="cvc-accept" name="cvc-accept" shape="rect"></a><b>Validation Rule: Element Sequence Accepted (Particle)</b><br clear="none" /><div class="constraint"><div class="p">For a sequence (possibly empty) of
element information items to be
accepted by a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>, </div>the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-pw" name="c-pw" shape="rect"> </a><b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a
wildcard, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p">The length of the sequence is greater than or
equal to <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">1.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a number,
then the length of
the sequence is less than or equal to the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
<div class="clnumber">1.3 <span class="p">Each element information item in the sequence is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
wildcard as defined by <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.</span></div>
</div> In this case, each
element information item in the sequence is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>P</var> and has no <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>.</div><div class="clnumber">2<a id="c-cdde" name="c-cdde" shape="rect"> </a><b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is an
element declaration <var>D</var>, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">The length of the sequence is greater than or
equal to <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">2.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a number,
then the length of
the sequence is less than or equal to the
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->For each element information item <var>E</var> in the sequence
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p"><var>D</var>
has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>E</var>.</span><div class="p">In this case <var>D</var> is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>
for <var>E</var> with respect to
<a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> and
<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>.</div></div>
<div class="clnumber">2.3.2<a id="c-psg" name="c-psg" shape="rect"> </a><span class="p"><var>D</var> is top-level (i.e. <var>D</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a> =
<b><i>global</i></b>), its <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> does not contain
<b><i>substitution</i></b>, <var>E</var>'s
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to
an element declaration
<var>S</var> &#8212;
<span class="termdef"><a name="key-eqd" id="key-eqd" title="" shape="rect">[Definition:]&#160;&#160;</a>call this declaration the
<b>substituting declaration</b></span> &#8212; and <a href="#key-eqd" class="termref" shape="rect"><span class="arrow">&#183;</span><var>S</var><span class="arrow">&#183;</span></a> is
<a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for <var>D</var> as defined in
<a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</span><div class="p">In this case <a href="#key-eqd" class="termref" shape="rect"><span class="arrow">&#183;</span><var>S</var><span class="arrow">&#183;</span></a> is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>
for <var>E</var> with respect to
<a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> and <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>.</div></div>
</div><div class="p">In this case <var>E</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>P</var>.</div><div class="note"><div class="p"><b>Note:</b>
This clause is equivalent to requiring that the sequence
of length 1 containing <var>E</var> is in
<a href="#key-L.ed" class="termref" shape="rect"><span class="arrow">&#183;</span><var>L</var>(<var>D</var>)<span class="arrow">&#183;</span></a>.
</div></div></div>
</div>
</div><div class="clnumber">3 <b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a model
group, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">There is a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of the sequence
into <var>n</var> sub-sequences such that
<var>n</var> is greater than or equal to
<var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">3.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a
number, <var>n</var> is less than or equal to
<var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
<div class="clnumber">3.3 <span class="p">Each sub-sequence in the <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to that model
group as defined in <a href="#cvc-model-group" shape="rect">Element Sequence Valid (&#167;3.8.4.3)</a>.</span></div>
</div> In this case, the
element information items in each sub-sequence are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <a href="#p" class="compref" shape="rect">Particles</a>
within the model group which is the <a href="#p-term" class="propref" shape="rect">{term}</a>, as described in
<a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.</div></div><div class="note"><div class="p"><b>Note:</b> The rule just given does not require that the
content model be deterministic. In practice, however,
most
non-determinism in content models is ruled out by the schema
component constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>.
Non-determinism can occur despite that constraint for
several reasons.
In some such cases,
some particular element information item may be accepted by either a
<a href="#w" class="compref" shape="rect">Wildcard</a> or an <a href="#ed" class="compref" shape="rect">Element Declaration</a>. In such situations,
the validation process defined in this specification matches the
element information item against the <a href="#ed" class="compref" shape="rect">Element Declaration</a>, both in
identifying the <a href="#ed" class="compref" shape="rect">Element Declaration</a> as the item's
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>,
and in choosing alternative paths through a content model.
Other cases of non-determinism involve nested particles each of
which has <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> greater than 1,
where the input sequence can be partitioned in multiple ways.
In those cases, there is no fixed rule for eliminating the
non-determinism.</div></div><div class="note"><div class="p"><b>Note:</b> clause <a href="#c-pw" shape="rect">1</a> and clause <a href="#c-psg" shape="rect">2.3.2</a> do not
interact: an element information item validatable by a declaration
with a substitution group head is
<em>not</em> validatable by a wildcard which accepts the head's
(namespace, name) pair but not its own.</div></div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-p" id="sec-sic-p" shape="rect"></a>3.9.5 Particle Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-particle" id="coss-particle" shape="rect"></a>3.9.6 Constraints on Particle Schema Components</h4><div class="div4">
<h5><a name="sec-p-props-correct" id="sec-p-props-correct" shape="rect"></a>3.9.6.1 Particle Correct</h5><p>All particles (see <a href="#cParticles" shape="rect">Particles (&#167;3.9)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="p-props-correct" name="p-props-correct" shape="rect"></a><b>Schema Component Constraint: Particle Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a particle are as described in
the property tableau in
<a href="#Particle_details" shape="rect">The Particle Schema Component (&#167;3.9.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->If <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is not <b><i>unbounded</i></b>, that is, it has a
numeric value, then
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is not greater than <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
</div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-particle-extend" id="sec-cos-particle-extend" shape="rect"></a>3.9.6.2 Particle Valid (Extension)</h5><p>The following constraint
defines a
relation
appealed to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-particle-extend" name="cos-particle-extend" shape="rect"></a><b>Schema Component Constraint: Particle Valid (Extension)</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="cd-model-extension" id="cd-model-extension" title="" shape="rect">[Definition:]&#160;&#160;</a>For a particle
(call it <b>E</b>, for extension) to be a <b>valid extension</b> of
another particle (call it <b>B</b>, for base)</span>
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p">They are the same particle.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>
= <var>E</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>
= 1 and <var>E</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a
<b><i>sequence</i></b> group whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a>' first member is a
particle all of whose properties, recursively, are
identical to those of <b>B</b>.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
<b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
<b>E</b>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> =
<b>B</b>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.
</span></div>
<div class="clnumber">3.2 <span class="p">
Both <b>E</b> and <b>B</b> have <b><i>all</i></b> groups
as their <a href="#p-term" class="propref" shape="rect">{term}</a>s.
</span></div>
<div class="clnumber">3.3 <span class="p">The
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <b>B</b>'s
<b><i>all</i></b> group is a prefix of the
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> of
<b>E</b>'s <b><i>all</i></b> group.
</span></div>
</div>
</div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-group-emptiable" id="sec-cos-group-emptiable" shape="rect"></a>3.9.6.3 Particle Emptiable</h5><p>The following constraint defines a relation appealed
to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-group-emptiable" name="cos-group-emptiable" shape="rect"></a><b>Schema Component Constraint: Particle Emptiable</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="cd-emptiable" id="cd-emptiable" title="" shape="rect">[Definition:]&#160;&#160;</a>For a particle to be
<b>emptiable</b></span>
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Its <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is <code>0</code>.</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#p-term" class="propref" shape="rect">{term}</a> is a group and the minimum part of the
effective total range of that group, as defined by <a href="#cos-seq-range" shape="rect">Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>) (&#167;3.8.6.5)</a> (if
the group is <b><i>all</i></b> or <b><i>sequence</i></b>) or
<a href="#cos-choice-range" shape="rect">Effective Total Range (<b><i>choice</i></b>) (&#167;3.8.6.6)</a> (if it is <b><i>choice</i></b>), is <code>0</code>.</span></div>
</div>
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cParticles" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cIdentity-constraint_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Wildcards" id="Wildcards" shape="rect"></a>3.10 Wildcards</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.1 <a href="#Wildcard_details" shape="rect">The Wildcard Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2 <a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2.1 <a href="#dcl.wc.p" shape="rect">Mapping from
&lt;any&gt; to a Particle</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2.2 <a href="#dcl.wc.wc" shape="rect">Mapping from
&lt;any&gt;
and
&lt;anyAttribute&gt;
to a Wildcard Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.3 <a href="#sec-src-wildcard" shape="rect">Constraints on XML Representations of Wildcards</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4 <a href="#sec-cvc-w" shape="rect">Wildcard Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.1 <a href="#sec-cvc-wildcard" shape="rect">Item Valid (Wildcard)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.2 <a href="#sec-cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.3 <a href="#sec-cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.5 <a href="#sec-sic-w" shape="rect">Wildcard Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6 <a href="#coss-wildcard" shape="rect">Constraints on Wildcard Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.1 <a href="#sec-w-props-correct" shape="rect">Wildcard Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.2 <a href="#sec-cos-ns-subset" shape="rect">Wildcard Subset</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.3 <a href="#sec-cos-aw-union" shape="rect">Attribute Wildcard Union</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.4 <a href="#sec-cos-aw-intersect" shape="rect">Attribute Wildcard Intersection</a><br clear="none" />
</div><p>In order to exploit the full potential for extensibility offered by XML
plus namespaces, more provision is needed than DTDs allow for targeted flexibility in content
models and attribute declarations. A wildcard provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
attribute and element information items dependent on their namespace
names
and optionally on their local names.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:any processContents="skip"/&gt;
&lt;xs:any namespace="##other" processContents="lax"/&gt;
&lt;xs:any namespace="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
notQName="xsl:comment xsl:fallback"/&gt;
<a name="anchor6013a" id="anchor6013a" shape="rect"></a>&lt;xs:any notNamespace="##targetNamespace ##local"/&gt;
&lt;xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">XML representations of the four basic types of wildcard, plus one attribute wildcard.</div></div></div><div class="div3">
<h4><a name="Wildcard_details" id="Wildcard_details" shape="rect"></a>3.10.1 The Wildcard Schema Component</h4><p>The wildcard schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="w" id="w" shape="rect">Wildcard</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="w-annotations" shape="rect" id="w-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="w-namespace_constraint" shape="rect" id="w-namespace_constraint"></a><div class="pdName"><span class="propdef">{namespace constraint}</span></div>
<div class="pdDef">
A <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Namespace Constraint</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="w-process_contents" shape="rect" id="w-process_contents"></a><div class="pdName"><span class="propdef">{process contents}</span></div>
<div class="pdDef">
One of {<span class="enumval">skip</span>, <span class="enumval">strict</span>, <span class="enumval">lax</span>}. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="nc" id="nc" shape="rect">Namespace Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nc-variety" shape="rect" id="nc-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">any</span>, <span class="enumval">enumeration</span>, <span class="enumval">not</span>}. Required.</div>
</div>
<div class="propDefn"><a name="nc-namespaces" shape="rect" id="nc-namespaces"></a><div class="pdName"><span class="propdef">{namespaces}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A set each of whose members is either an xs:anyURI value or
the distinguished value
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. Required.</p></div>
</div>
</div>
<div class="propDefn"><a name="nc-disallowed_names" shape="rect" id="nc-disallowed_names"></a><div class="pdName"><span class="propdef">{disallowed names}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A set each of whose members is either an xs:QName value or
the keyword <b><i>defined</i></b>
or the keyword <b><i>sibling</i></b>. Required.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<div class="block"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> provides for
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of attribute and element items that:
<ol class="enumar"><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a>
<b><i>any</i></b>) have any namespace or are not
namespace-qualified;</div></li><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a> <b><i>not</i></b> and
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> a set whose members are either namespace names or
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) have any namespace
other than the specified namespaces and/or, if <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is included in the set, are
namespace-qualified;
(see this <a href="#anchor6013a" shape="rect">example</a>, which accepts
only namespace-qualified names distinct from the target namespace; the
"<code>##local</code>" in the schema document
maps to the value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> in the
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
property)</div></li><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a>
<b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> a set
whose members are either namespace names or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) have any of the specified
namespaces and/or, if <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is included in the set, are
unqualified.</div></li><li><div class="p">(<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members) have any <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
other than the specified names.</div></li><li><div class="p">
(<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains the keyword <b><i>defined</i></b>) have any
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
other than those matching the
names of global element or attribute declarations.
</div></li><li><div class="p">
(<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains the keyword <b><i>sibling</i></b>) have
any <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> other than those
matching the names of element or attribute declarations in
the containing complex type definition.
</div></li></ol></div><div class="block"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> controls the impact on <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
of the information items allowed by wildcards, as follows:
<div class="glist"><div class="gitem"><div class="giLabel">strict</div><div class="giDef"><div class="p">There <span class="rfc2119">must</span> be a top-level declaration for the item
available, or the item <span class="rfc2119">must</span> have an <code>xsi:type</code>, and the
item <span class="rfc2119">must</span> be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as
appropriate.</div></div></div><div class="gitem"><div class="giLabel">skip</div><div class="giDef"><div class="p">No constraints at all: the item <span class="rfc2119">must</span> simply be well-formed XML.</div></div></div><div class="gitem"><div class="giLabel">lax</div><div class="giDef"><div class="p">If the item has a uniquely
determined declaration available, it <span class="rfc2119">must</span> be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
that
declaration, that is, <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>
if you can, don't worry if you can't.</div></div></div></div>
</div><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#w-annotations" class="propref" shape="rect">{annotations}</a> property.</p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">The keywords
<b><i>defined</i></b> and
<b><i>sibling</i></b> allow a kind of wildcard which matches only
elements not declared in the current schema or contained
within the current complex type,
respectively. They are
new in this version of this specification. The Working Group is
uncertain whether their value outweighs their
liabilities; we solicit input from implementors and users of
this specification as to whether they should be retained or not.</span></p></div></div><div class="div3">
<h4><a name="declare-openness" id="declare-openness" shape="rect"></a>3.10.2 XML Representation of Wildcard Schema Components</h4><p>The XML representation for a wildcard schema component is an
<a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> or <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element
information item. </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>any</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-any" name="element-any" shape="rect">&lt;any</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;namespace =
((<var>##any</var> | <var>##other</var>) | List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
)
<br clear="none" />&#160;&#160;notNamespace = List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;notQName = List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> | (<var>##defined</var> | <var>##definedSibling</var>))
<br clear="none" />&#160;&#160;processContents = (<var>lax</var> | <var>skip</var> | <var>strict</var>)&#160;:&#160;strict<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/any&gt;</p></div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>anyAttribute</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-anyAttribute" name="element-anyAttribute" shape="rect">&lt;anyAttribute</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;namespace =
((<var>##any</var> | <var>##other</var>) | List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
)
<br clear="none" />&#160;&#160;notNamespace = List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;notQName = List of
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> | <var>##defined</var>)
<br clear="none" />&#160;&#160;processContents = (<var>lax</var> | <var>skip</var> | <var>strict</var>)&#160;:&#160;strict<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/anyAttribute&gt;</p></div></div><p id="any_p1">An <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item
corresponds both to a wildcard component and to
a particle containing that wildcard
(unless <code>minOccurs=maxOccurs=0</code>, in which case the
item corresponds to no component at
all).
The mapping rules are given in the following two subsections.
As always, the mapping rules
given here apply after, not before, the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="div4">
<h5><a name="dcl.wc.p" id="dcl.wc.p" shape="rect"></a>3.10.2.1 Mapping from
&lt;any&gt; to a Particle</h5><p>The mapping from an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item to a particle
is as follows.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if
<code>maxOccurs</code> = <b><i>unbounded</i></b>,
otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A wildcard as given
below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The same annotations as the <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> of the wildcard. See below.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.wc.wc" id="dcl.wc.wc" shape="rect"></a>3.10.2.2 Mapping from
&lt;any&gt;
and
&lt;anyAttribute&gt;
to a Wildcard Component</h5><p>The mapping from an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item to a wildcard component
is as follows. This mapping is also used for mapping
<a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> information items to wildcards,
although in some cases the result of the mapping is further
modified, as specified in the rules for
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> and
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Wildcard_details" shape="rect">Wildcard</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="mapRepr"> A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with
the following properties:
<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present, <b>then </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b><code>namespace</code>
= <code>"##any"</code>, <b>then </b><b><i>any</i></b>;</div><div class="clnumber">1.2 <b>If </b><code>namespace</code>
= <code>"##other"</code>, <b>then </b><b><i>not</i></b>;</div><div class="clnumber">1.3 <b>otherwise </b><b><i>enumeration</i></b>;</div></div>
</div><div class="clnumber">2 <b>If </b>the <code>notNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
is present, <b>then </b>
<b><i>not</i></b>;
</div><div class="clnumber">3 <b>otherwise </b>(neither <code>namespace</code> nor
<code>notNamespace</code> is present) <b><i>any</i></b>.</div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>neither <code>namespace</code> nor
<code>notNamespace</code> is present, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b>
<code>namespace</code> = <code>"##any"</code>, <b>then </b>the empty set;</div><div class="clnumber">3 <b>If </b><code>namespace</code>
= <code>"##other"</code>, <b>then </b>a set consisting of
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
and, if the <code>targetNamespace</code> [attribute] of
the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor element
information item is present, its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">4 <b>otherwise </b>a set whose members are namespace
names corresponding to the space-delimited substrings of
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>namespace</code> or
<code>notNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (whichever is
present), except
<div class="constraintlist"><div class="clnumber">4.1 <span class="p">if one such substring is
<code>##targetNamespace</code>, the corresponding
member is the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
element information item if present, otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">4.2 <span class="p">if one such substring is <code>##local</code>, the
corresponding member is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span></div>
</div>
</div></div>
</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">
If the <code>notQName</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present, then a set whose members
correspond to the items in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>notQName</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
as follows.
<ul><li><div class="p">If the item is a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
value (i.e. an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>), then that
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
value is a member of the set.</div></li><li><div class="p">If the item is the token "<code>##defined</code>",
then the keyword <b><i>defined</i></b> is a member of the set.</div></li><li><div class="p">If the item is the token "<code>##definedSibling</code>",
then the keyword <b><i>sibling</i></b> is a member of the set.</div></li></ul>
If the <code>notQName</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, then
the empty set.
</div></div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>processContents</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,
otherwise <b><i>strict</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<div class="note"><div class="p"><b>Note:</b>
When this rule is used for an attribute wildcard (see <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>), the <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> is the
<a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
element.
</div></div>
</div></div></div><p>Wildcards are subject to the same ambiguity constraints
(<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>) as other content model
particles:
If an instance element could match one
of two wildcards, within the content model of a type, that model
is in error.</p></div></div><div class="div3">
<h4><a name="sec-src-wildcard" id="sec-src-wildcard" shape="rect"></a>3.10.3 Constraints on XML Representations of Wildcards</h4><div class="constraintnote"><a id="src-wildcard" name="src-wildcard" shape="rect"></a><b>Schema Representation Constraint: Wildcard Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>
and <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
element information items by the schema for schema documents, <code>namespace</code> and
<code>notNamespace</code> attributes <span class="rfc2119">must not</span> both be
present.
</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-w" id="sec-cvc-w" shape="rect"></a>3.10.4 Wildcard Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-wildcard" id="sec-cvc-wildcard" shape="rect"></a>3.10.4.1 Item Valid (Wildcard)</h5><div class="constraintnote"><a id="cvc-wildcard" name="cvc-wildcard" shape="rect"></a><b>Validation Rule: Item Valid (Wildcard)</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor6159-1" id="anchor6159-1" shape="rect"></a>
For an element or attribute information item <var>I</var> to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a wildcard
<var>W</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
<var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined in
<a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <b>If </b><var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
contains the keyword <b><i>defined</i></b>, <b>then </b><b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b><var>W</var> is an element wildcard (i.e., <var>W</var> appears in a
content model), <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>
to an element declaration. (Informally, no such top-level element is
declared in the schema.)</div><div class="clnumber">2.2 <b>If </b><var>W</var> is an attribute wildcard, <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>
to an attribute declaration.</div></div></div><div class="clnumber">3 <b>If </b><b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
contains the keyword <b><i>sibling</i></b>;</span></div>
<div class="clnumber">3.2 <span class="p"><var>W</var> is an element wildcard</span></div>
<div class="clnumber">3.3 <span class="p"><var>I</var> is an element information item</span></div>
<div class="clnumber">3.4 <span class="p"><var>I</var> has a <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a> <var>P</var> that is
also an element information item</span></div>
<div class="clnumber">3.5 <span class="p"><var>I</var> and <var>P</var> have the same <a href="#e-validation_context" class="propref" shape="rect">[validation context]</a></span></div>
<div class="clnumber">3.6 <span class="p"><var>P</var> has an <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> <var>T</var> (which is always a complex
type and contains <var>W</var> in its <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a>)</span></div>
</div> <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> any
element declaration <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
in the content model of <var>T</var>, whether
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>,
<a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or
<a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>.<div class="p">Informally, the keyword <b><i>sibling</i></b> disallows any element declared as
a possible sibling of the wildcard <var>W</var>.</div></div></div>
</div></div></div><p>When an element or attribute information
item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a wildcard and the preceding constraint
(<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>) is satisfied, then the item has no
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>. Its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration, if any, is found by matching its
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as described in <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
Note that QName resolution is performed only if the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
a <b><i>strict</i></b> or <b><i>lax</i></b> wildcard; if the wildcard has a
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property of <b><i>skip</i></b>,
then the item has no <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration.</p><p><span class="termdef"><a name="key-skipped" id="key-skipped" title="" shape="rect">[Definition:]&#160;&#160;</a>
An element or attribute information item is <b>skipped</b> if it
is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b> wildcard or if one of its ancestor
elements is.
</span></p></div><div class="div4">
<h5><a name="sec-cvc-wildcard-name" id="sec-cvc-wildcard-name" shape="rect"></a>3.10.4.2 Wildcard allows Expanded Name</h5><div class="constraintnote"><a id="cvc-wildcard-name" name="cvc-wildcard-name" shape="rect"></a><b>Validation Rule: Wildcard allows Expanded Name</b><br clear="none" /><div class="constraint"><div class="p">For an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var>, i.e. a
(namespace name, local name) pair,
to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
namespace constraint <var>C</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The namespace name is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
<var>C</var>, as defined in <a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>;</span></div>
<div class="clnumber">2 <span class="p"><var>C</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> does not
contain <var>E</var>.</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cvc-wildcard-namespace" id="sec-cvc-wildcard-namespace" shape="rect"></a>3.10.4.3 Wildcard allows Namespace Name</h5><div class="constraintnote"><a id="cvc-wildcard-namespace" name="cvc-wildcard-namespace" shape="rect"></a><b>Validation Rule: Wildcard allows Namespace Name</b><br clear="none" /><div class="constraint"><div class="p">For a value <var>V</var>
which is either a namespace name or
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
a
namespace
constraint
<var>C</var> (the
value of a <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>)
<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</span></div>
<div class="clnumber">2 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>,
and <var>V</var> is not identical to any of the members of
<var>C</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">3 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a>
= <b><i>enumeration</i></b>, and <var>V</var> is
identical to one of the members of <var>C</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
</div>
</div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-w" id="sec-sic-w" shape="rect"></a>3.10.5 Wildcard Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-wildcard" id="coss-wildcard" shape="rect"></a>3.10.6 Constraints on Wildcard Schema Components</h4><div class="div4">
<h5><a name="sec-w-props-correct" id="sec-w-props-correct" shape="rect"></a>3.10.6.1 Wildcard Properties Correct</h5><p>All wildcards (see <a href="#Wildcards" shape="rect">Wildcards (&#167;3.10)</a>) <span class="rfc2119">must</span> satisfy
the following constraint.</p><div class="constraintnote"><a id="w-props-correct" name="w-props-correct" shape="rect"></a><b>Schema Component Constraint: Wildcard Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a wildcard are as
described in the property tableau in
<a href="#Wildcard_details" shape="rect">The Wildcard Schema Component (&#167;3.10.1)</a>, modulo the impact of
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <a href="#nc-variety" class="propref" shape="rect">{variety}</a> is <b><i>not</i></b>,
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> has at least one member.</span></div>
<div class="clnumber">3 <span class="p">If <a href="#nc-variety" class="propref" shape="rect">{variety}</a> is <b><i>any</i></b>, <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is
empty.</span></div>
<div class="clnumber">4 <span class="p">The namespace name of each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> member
in <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> is allowed by the
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined in
<a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>.</span></div>
<div class="clnumber">5 <span class="p">Attribute wildcards do not contain <b><i>sibling</i></b> in their
<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-ns-subset" id="sec-cos-ns-subset" shape="rect"></a>3.10.6.2 Wildcard Subset</h5><p>The following constraints define a relation appealed to
elsewhere in this specification.</p><div class="constraintnote"><a id="cos-ns-subset" name="cos-ns-subset" shape="rect"></a><b>Schema Component Constraint: Wildcard Subset</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-wc_subset" id="key-wc_subset" title="" shape="rect">[Definition:]&#160;&#160;</a> Given two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s <b>sub</b> and <b>super</b>,
<b>sub</b> is a <b>wildcard subset</b> of <b>super</b>
if and only if</span>
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>super</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>any</i></b>.</span></div>
<div class="clnumber">2 <span class="p">Both <b>sub</b> and <b>super</b>
have
<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b>, and
<b>super</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
is a superset of <b>sub</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">3 <span class="p"><b>sub</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>enumeration</i></b>,
<b>super</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>not</i></b>, and the
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of the two are disjoint.</span></div>
<div class="clnumber">4 <span class="p">Both <b>sub</b> and <b>super</b>
have
<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>, and
<b>super</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is a subset of
<b>sub</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
</div>
</div><div class="p"><a name="anchor6161" id="anchor6161" shape="rect"></a>
And <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> member
of <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> is not
allowed
by <b>sub</b>, as defined in <a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <span class="p">
If <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains
<b><i>defined</i></b>, then
<b>sub</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> also contains
<b><i>defined</i></b>.
</span></div>
<div class="clnumber">3 <span class="p">
If <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains <b><i>sibling</i></b>, then
<b>sub</b>'s <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> also contains <b><i>sibling</i></b>.
</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-aw-union" id="sec-cos-aw-union" shape="rect"></a>3.10.6.3 Attribute Wildcard Union</h5><div class="constraintnote"><a id="cos-aw-union" name="cos-aw-union" shape="rect"></a><b>Schema Component Constraint: Attribute Wildcard Union</b><br clear="none" /><div class="constraint"><div class="p">
<span class="termdef"><a name="key-wc_union" id="key-wc_union" title="" shape="rect">[Definition:]&#160;&#160;</a>
Given three <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s <var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is
the
<b>wildcard union</b> of <var>O1</var> and
<var>O2</var> if and only if, first, the <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>, and, second, the <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> of
<var>O</var> are consistent
with <var>O</var> being the union of <var>O1</var> and <var>O2</var>, as that is defined
below. </span></div><div class="p">
The <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O</var> are consistent
with <var>O</var> being the wildcard union of <var>O1</var> and <var>O2</var> if and
only if
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
the same <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">2 <span class="p">Either <var>O1</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>any</i></b> or <var>O2</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>any</i></b>, and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</span></div>
<div class="clnumber">3 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
<a href="#nc-variety" class="propref" shape="rect">{variety}</a> <b><i>enumeration</i></b>, and
<var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is the union of
<var>O1</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
and <var>O2</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">4 <!--* no span class='p' possible here *--><var>O1</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <var>O2</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>not</i></b>, and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">4.1 <span class="p">
The intersection of the <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var> is the
empty set, and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.
</span></div>
<div class="clnumber">4.2 <span class="p">
<var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>not</i></b>, and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is the non-empty
intersection of <var>O1</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> and
<var>O2</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.
</span></div>
</div>
</div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
= <var>S1</var>, and
the other has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S2</var>, and
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">5.1 <span class="p">
The set difference <var>S1</var> minus <var>S2</var> is the empty set, and
<var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.
</span></div>
<div class="clnumber">5.2 <span class="p">
<var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b> and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is
the non-empty set difference <var>S1</var> minus <var>S2</var>.
</span></div>
</div>
</div>
</div>
</div><div class="p">
The <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property of <var>O</var> is consistent with <var>O</var> being
the wildcard union of <var>O1</var> and
<var>O2</var> if and only if <var>O</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> includes
all and only the
following:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> members of
<var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> that are not allowed by
<var>O2</var>, as
defined in
<a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <span class="p"><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members of <var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> that are not
allowed by <var>O1</var>.
</span></div>
<div class="clnumber">3 <span class="p">
The keyword <b><i>defined</i></b> if it is contained in both
<var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> and
<var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.
</span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> When one of the wildcards has
<b><i>defined</i></b> in <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> and the other does not, then
<b><i>defined</i></b> is <em>not</em> included in the union. This may allow
QNames that are not allowed by either wildcard. This is to ensure
that all unions are expressible. If <b><i>defined</i></b> is intended to be
included, then it is necessary to have it in both wildcards.</div></div><div class="p">In the case where there are more than two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s to be combined, the wildcard
union is determined by identifying the wildcard union of two
of them as above, then the wildcard union of the result with
the third, and so on as required.
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-aw-intersect" id="sec-cos-aw-intersect" shape="rect"></a>3.10.6.4 Attribute Wildcard Intersection</h5><div class="constraintnote"><a id="cos-aw-intersect" name="cos-aw-intersect" shape="rect"></a><b>Schema Component Constraint: Attribute Wildcard Intersection</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-wc_intersect" id="key-wc_intersect" title="" shape="rect">[Definition:]&#160;&#160;</a>
Given three <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s
<var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is the
<b>wildcard intersection</b>
of <var>O1</var> and <var>O2</var> if and only if
both its <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> properties, on the
one hand, and its <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property, on the other, are
consistent with <var>O</var> being the intersection
of <var>O1</var> and <var>O2</var>, as that is defined below.</span></div><div class="p">
The <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O</var> are consistent
with <var>O</var> being the wildcard
intersection of <var>O1</var> and <var>O2</var> if and only if
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> have
the same <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.
</span></div>
<div class="clnumber">2 <span class="p">Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>
and <var>O</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> identical
to those of the other.</span></div>
<div class="clnumber">3 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b>,
and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
is the intersection of the
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var>.</span></div>
<div class="clnumber">4 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>,
and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
is the union of the
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var>.</span></div>
<div class="clnumber">5 <span class="p">Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>
and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S1</var> and the other has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S2</var>,
and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and
<var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = the
set difference <var>S2</var> minus <var>S1</var>.</span></div>
</div>
</div><div class="p">
The <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property of <var>O</var> is consistent
with <var>O</var> being the wildcard
intersection of <var>O1</var> and <var>O2</var> if and only if
<var>O</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
includes all and only the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members of <var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
whose namespace names
are allowed by <var>O2</var>, as defined in
<a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members of <var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
whose namespace names
are allowed by <var>O1</var>.
</span></div>
<div class="clnumber">3 <span class="p">
The keyword <b><i>defined</i></b> if it is a member of either
<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.
</span></div>
</div></div><div class="p">In the case where there are more than two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s to be combined, the wildcard
intersection is determined by identifying the wildcard intersection of two
of them as above, then the wildcard intersection of the result with
the third, and so on as required.
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Wildcards" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cTypeAlternative" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cIdentity-constraint_Definitions" id="cIdentity-constraint_Definitions" shape="rect"></a>3.11 Identity-constraint Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.1 <a href="#Identity-constraint_Definition_details" shape="rect">The Identity-constraint Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.2 <a href="#declare-key" shape="rect">XML Representation of Identity-constraint Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.3 <a href="#sec-src-identity-constraint" shape="rect">Constraints on XML Representations of Identity-constraint Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.4 <a href="#sec-cvc-identity-constraint" shape="rect">Identity-constraint Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.5 <a href="#sec-sic-key" shape="rect">Identity-constraint Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6 <a href="#coss-identity-constraint" shape="rect">Constraints on Identity-constraint Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.1 <a href="#sec-c-props-correct" shape="rect">Identity-constraint Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.2 <a href="#sec-c-selector-xpath" shape="rect">Selector Value OK</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.3 <a href="#sec-c-fields-xpaths" shape="rect">Fields Value OK</a><br clear="none" />
</div><p>Identity-constraint definition components provide for uniqueness and
reference constraints with respect to the contents of multiple elements and attributes.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:key name="fullName"&gt;
&lt;xs:selector xpath=".//person"/&gt;
&lt;xs:field xpath="forename"/&gt;
&lt;xs:field xpath="surname"/&gt;
&lt;/xs:key&gt;
&lt;xs:keyref name="personRef" refer="fullName"&gt;
&lt;xs:selector xpath=".//personPointer"/&gt;
&lt;xs:field xpath="@first"/&gt;
&lt;xs:field xpath="@last"/&gt;
&lt;/xs:keyref&gt;
&lt;xs:unique name="nearlyID"&gt;
&lt;xs:selector xpath=".//*"/&gt;
&lt;xs:field xpath="@id"/&gt;
&lt;/xs:unique&gt;</pre></div><div class="exampleWrapper">
<div class="p">XML representations for the three kinds of identity-constraint definitions.</div></div></div><div class="div3">
<h4><a name="Identity-constraint_Definition_details" id="Identity-constraint_Definition_details" shape="rect"></a>3.11.1 The Identity-constraint Definition Schema Component</h4><p>The identity-constraint definition schema component has the following
properties:
</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="icd" id="icd" shape="rect">Identity-Constraint Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="icd-annotations" shape="rect" id="icd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="icd-name" shape="rect" id="icd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="icd-target_namespace" shape="rect" id="icd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="icd-identity-constraint_category" shape="rect" id="icd-identity-constraint_category"></a><div class="pdName"><span class="propdef">{identity-constraint category}</span></div>
<div class="pdDef">
One of {<span class="enumval">key</span>, <span class="enumval">keyref</span>, <span class="enumval">unique</span>}. Required.</div>
</div>
<div class="propDefn"><a name="icd-selector" shape="rect" id="icd-selector"></a><div class="pdName"><span class="propdef">{selector}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="icd-fields" shape="rect" id="icd-fields"></a><div class="pdName"><span class="propdef">{fields}</span></div>
<div class="pdDef">
A sequence of <a href="#x" class="compref" shape="rect">XPath Expression</a> property records. </div>
</div>
<div class="propDefn"><a name="icd-referenced_key" shape="rect" id="icd-referenced_key"></a><div class="pdName"><span class="propdef">{referenced key}</span></div>
<div class="pdDef">
An <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> component.
Required if <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
is <b><i>keyref</i></b>,
otherwise (<a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
is <b><i>key</i></b> or <b><i>unique</i></b>) <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>If a value is present, its <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> must be
<b><i>key</i></b> or <b><i>unique</i></b>.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Identity-constraint definitions are identified by their <a href="#icd-name" class="propref" shape="rect">{name}</a> and <a href="#icd-target_namespace" class="propref" shape="rect">{target namespace}</a>;
identity-constraint
definition identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="block">Informally, <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> identifies the
identity-constraint
definition as playing one of
three roles:
<ul><li><div class="p">(<b><i>unique</i></b>) the
identity-constraint
definition asserts uniqueness, with respect to the content
identified by <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, of the tuples resulting from
evaluation of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> XPath expression(s). </div></li><li><div class="p">(<b><i>key</i></b>) the
identity-constraint
definition asserts uniqueness as for
<b><i>unique</i></b>. <b><i>key</i></b> further asserts that all selected content
actually has such tuples.</div></li><li><div class="p">(<b><i>keyref</i></b>) the
identity-constraint
definition asserts a correspondence, with respect to the content
identified by <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, of the tuples resulting from
evaluation of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> XPath expression(s), with those of the <a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a>. </div></li></ul>
</div><p>These constraints are specified alongside the specification of types for the
attributes and elements involved, i.e. something declared as of type integer
can also serve as a key. Each constraint declaration has a name, which exists in a
single symbol space for constraints. The
equality and inequality
conditions
appealed to in checking these constraints apply to the
<em>values</em> of
the fields selected, not their
lexical representation, so that for example <code>3.0</code> and <code>3</code>
would be conflicting keys if they were both
decimal, but non-conflicting if
they were both strings, or one was a string and one a decimal.
When equality and
identity differ for the simple types involved, all three
forms of identity-constraint test for
<em>either</em> equality
<em>or</em> identity
of values.
</p><p>Overall the augmentations to XML's <code>ID/IDREF</code> mechanism are:</p><ul><li><div class="p">Functioning as a part of an identity-constraint is in addition to, not instead of,
having a type;</div></li><li><div class="p">Not just attribute values, but also element content and combinations
of values and content can be declared to be unique;</div></li><li><div class="p">Identity-constraints are specified to hold within the scope of particular elements;</div></li><li><div class="p">(Combinations of) attribute values and/or element content can be
declared to be keys, that is, not only unique, but always present and non-nillable;</div></li><li><div class="p">The comparison between <b><i>keyref</i></b> <a href="#icd-fields" class="propref" shape="rect">{fields}</a> and
<b><i>key</i></b> or <b><i>unique</i></b> <a href="#icd-fields" class="propref" shape="rect">{fields}</a> is
performed
on typed values, not on the lexical representations of those values.</div></li></ul><p><a href="#icd-selector" class="propref" shape="rect">{selector}</a> specifies a restricted XPath
(<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) expression relative to
instances of the element being declared. This <span class="rfc2119">must</span> identify a
sequence of element nodes that are
contained within the declared element
to which the constraint applies.</p><p><a href="#icd-fields" class="propref" shape="rect">{fields}</a> specifies XPath expressions relative to each
element selected by a <a href="#icd-selector" class="propref" shape="rect">{selector}</a>.
Each
XPath expression in the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> property
<span class="rfc2119">must</span> identify
a single node (element or attribute),
whose content or value, which <span class="rfc2119">must</span> be
of a simple type, is used in the constraint. It is possible to specify an
ordered list of <a href="#icd-fields" class="propref" shape="rect">{fields}</a>s, to cater to multi-field keys,
keyrefs, and uniqueness constraints.
</p><p>In order to reduce the burden on implementers, in particular
implementers of streaming processors, only restricted subsets of XPath
expressions are allowed in <a href="#icd-selector" class="propref" shape="rect">{selector}</a> and <a href="#icd-fields" class="propref" shape="rect">{fields}</a>. The details are given in <a href="#coss-identity-constraint" shape="rect">Constraints on Identity-constraint Definition Schema Components (&#167;3.11.6)</a>.</p><div class="note"><div class="p"><b>Note:</b> Provision for multi-field keys etc. goes beyond what is supported by <code>xsl:key</code>.</div></div><div class="note"><div class="p"><b>Note:</b>
In version 1.0 of this specification, identity constraints used
<a href="#bib-xpath1" shape="rect">[XPath 1.0]</a>.
They now use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
</div></div><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#icd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-key" id="declare-key" shape="rect"></a>3.11.2 XML Representation of Identity-constraint Definition Schema Components</h4><p>The XML representation for an identity-constraint definition schema
component is either a <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, a <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> or a <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element information
item. The correspondences between the properties of those
information items
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component they
correspond to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>unique</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-unique" name="element-unique" shape="rect">&lt;unique</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/unique&gt;</p><p class="element-syntax"><a id="element-key" name="element-key" shape="rect">&lt;key</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/key&gt;</p><p class="element-syntax"><a id="element-keyref" name="element-keyref" shape="rect">&lt;keyref</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;refer = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/keyref&gt;</p><p class="element-syntax"><a id="element-selector" name="element-selector" shape="rect">&lt;selector</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>xpath</b> = <em>a subset of XPath expression, see below</em><br clear="none" />&#160;&#160;xpathDefaultNamespace =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/selector&gt;</p><p class="element-syntax"><a id="element-field" name="element-field" shape="rect">&lt;field</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>xpath</b> = <em>a subset of XPath expression, see below</em><br clear="none" />&#160;&#160;xpathDefaultNamespace =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/field&gt;</p></div></div><p id="xr.idc5.bis">
If the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent,
the corresponding schema
component is as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Identity-constraint_Definition_details" shape="rect">Identity-constraint Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
ancestor
element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity- constraint category}</a></div><div class="mapRepr">One of <b><i>key</i></b>,
<b><i>keyref</i></b> or
<b><i>unique</i></b>, depending on the item.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-selector" class="propref" shape="rect">{selector}</a></div><div class="mapRepr">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described in
section <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>, with
<a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> as the "host element" and
<code>xpath</code> as the designated
expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-fields" class="propref" shape="rect">{fields}</a></div><div class="mapRepr">
A sequence of <a href="#x" class="compref" shape="rect">XPath Expression</a> property records, corresponding to the
<a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a> element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order,
following the rules given in <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>,
with <a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a> as the "host element"
and <code>xpath</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a></div><div class="mapRepr">If the item is a <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, the
identity-constraint definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>refer</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
<a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, or <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element,
whichever is present, and the <a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> and <a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div><p id="xr.idc7.bis">
Otherwise (the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
present), the corresponding schema component is the identity-constraint definition
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="vehicle"&gt;
&lt;xs:complexType&gt;
. . .
&lt;xs:attribute name="plateNumber" type="xs:integer"/&gt;
&lt;xs:attribute name="state" type="twoLetterCode"/&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="state"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="code" type="twoLetterCode"/&gt;
&lt;xs:element ref="vehicle" maxOccurs="unbounded"/&gt;
&lt;xs:element ref="person" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;!-- vehicles are keyed by their plate within states --&gt;
&lt;xs:key name="reg"&gt;
&lt;xs:selector xpath=".//vehicle"/&gt;
&lt;xs:field xpath="@plateNumber"/&gt;
&lt;/xs:key&gt;
&lt;/xs:element&gt;
&lt;xs:element name="root"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
. . .
&lt;xs:element ref="state" maxOccurs="unbounded"/&gt;
. . .
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;!-- states are keyed by their code --&gt;
&lt;xs:key name="state"&gt;
&lt;xs:selector xpath=".//state"/&gt;
&lt;xs:field xpath="code"/&gt;
&lt;/xs:key&gt;
&lt;xs:keyref name="vehicleState" refer="state"&gt;
&lt;!-- every vehicle refers to its state --&gt;
&lt;xs:selector xpath=".//vehicle"/&gt;
&lt;xs:field xpath="@state"/&gt;
&lt;/xs:keyref&gt;
&lt;!-- vehicles are keyed by a pair of state and plate --&gt;
&lt;xs:key name="regKey"&gt;
&lt;xs:selector xpath=".//vehicle"/&gt;
&lt;xs:field xpath="@state"/&gt;
&lt;xs:field xpath="@plateNumber"/&gt;
&lt;/xs:key&gt;
&lt;!-- people's cars are a reference --&gt;
&lt;xs:keyref name="carRef" refer="regKey"&gt;
&lt;xs:selector xpath=".//car"/&gt;
&lt;xs:field xpath="@regState"/&gt;
&lt;xs:field xpath="@regPlate"/&gt;
&lt;/xs:keyref&gt;
&lt;/xs:element&gt;
&lt;xs:element name="person"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
. . .
&lt;xs:element name="car"&gt;
&lt;xs:complexType&gt;
&lt;xs:attribute name="regState" type="twoLetterCode"/&gt;
&lt;xs:attribute name="regPlate" type="xs:integer"/&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">A <code>state</code> element is defined, which
contains a <code>code</code> child and some <code>vehicle</code> and <code>person</code>
children. A <code>vehicle</code> in turn has a <code>plateNumber</code> attribute,
which is an integer, and a <code>state</code> attribute. State's
<code>code</code>s are a key for them within the document. Vehicle's
<code>plateNumber</code>s are a key for them within states, and
<code>state</code> and
<code>plateNumber</code> is asserted to be a <b><i>key</i></b> for
<code>vehicle</code> within the document as a whole. Furthermore, a <code>person</code> element has
an empty <code>car</code> child, with <code>regState</code> and
<code>regPlate</code> attributes, which are then asserted together to refer to
<code>vehicle</code>s via the <code>carRef</code> constraint. The requirement
that a <code>vehicle</code>'s <code>state</code> match its containing
<code>state</code>'s <code>code</code> is not expressed here.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="stateList"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
. . .
&lt;xs:element name="state" maxOccurs="unbounded"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
. . .
&lt;xs:element name="code" type="twoLetterCode"/&gt;
. . .
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
. . .
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:key ref="state"/&gt; &lt;!-- reuse the key constraint from the above example --&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">A list of <code>state</code> elements can appear as child elements
under <code>stateList</code>. A <b><i>key</i></b> constraint can be used to
ensure that there is no duplicate state <code>code</code>. We already
defined a <b><i>key</i></b> in the above example for the exact same purpose
(the key constraint is named "<code>state</code>"). We can reuse it
directly via the <code>ref</code> attribute on the <code>key</code>
element.</div></div></div></div><div class="div3">
<h4><a name="sec-src-identity-constraint" id="sec-src-identity-constraint" shape="rect"></a>3.11.3 Constraints on XML Representations of Identity-constraint Definitions</h4><div class="constraintnote"><a id="src-identity-constraint" name="src-identity-constraint" shape="rect"></a><b>Schema Representation Constraint: Identity-constraint Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> and <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element
information items by the schema for schema documents,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
One of <code>ref</code> or <code>name</code> is present, but not both.
</span></div>
<div class="clnumber">2 <span class="p">
If <code>name</code> is present, then <a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> appears in
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.
</span></div>
<div class="clnumber">3 <span class="p">
If <code>name</code> is present on <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, then
<code>refer</code> is also present.
</span></div>
<div class="clnumber">4 <span class="p">
If <code>ref</code> is present, then only <code>id</code>
and <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> are
allowed to appear together with <code>ref</code>.
</span></div>
<div class="clnumber">5 <span class="p">
If <code>ref</code> is present, then the
<a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> of the identity-constraint
definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> matches the name of the
element information item.
</span></div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-identity-constraint" id="sec-cvc-identity-constraint" shape="rect"></a>3.11.4 Identity-constraint Definition Validation Rules</h4><div class="constraintnote"><a id="cvc-identity-constraint" name="cvc-identity-constraint" shape="rect"></a><b>Validation Rule: Identity-constraint Satisfied</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an identity-constraint
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">A data model instance is constructed
from the input information set, as described in <a href="#bib-xdm" shape="rect">[XDM]</a>.
The <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, with
the element node corresponding to <var>E</var> as the
context node, evaluates to a
sequence of element nodes, as defined in
<a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>.
<span class="termdef"><a name="key-tns" id="key-tns" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>target node set</b> is the
set of nodes in that sequence, after omitting
all element nodes corresponding to element
information items that are
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.</span></span></div>
<div class="clnumber">2 <span class="p">Each node in the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> is
either the context node
or an
element node among its descendants.</span></div>
<div class="clnumber">3 <span class="p"><a name="anchor11716" id="anchor11716" shape="rect"></a> For each node <var>N</var>
in the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> and each field <var>F</var> in <a href="#icd-fields" class="propref" shape="rect">{fields}</a>, when <var>N</var> is taken as the context node
<var>F</var> evaluates (as defined in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>) to a
sequence of nodes <var>S</var>. <var>S</var> contains zero or more <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> nodes, at most one node whose <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type
definition is either a simple type definition or a complex type
definition with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>,
and no other nodes.
As a consequence, for each field <var>F</var> the sequence <var>S</var> contains at most
one node with a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> <span class="anonRef">[schema actual
value]</span>. Call that one node's <span class="anonRef">[schema actual value]</span> <var>V</var>(<var>N</var>,<var>F</var>). <span class="termdef"><a name="key-ks" id="key-ks" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>key-sequence</b> of <var>N</var></span> is the sequence
consisting of the values <var>V</var>(<var>N</var>,<var>F</var>), in the order of
the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> property.</span><div class="note"><div class="p"><b>Note:</b> The use of <span class="anonRef">[schema actual value]</span> in the definition of
<a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key sequence<span class="arrow">&#183;</span></a> above means that
<b><i>default</i></b> or <b><i>fixed</i></b> value constraints <span class="rfc2119">may</span> play
a part in <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key sequence<span class="arrow">&#183;</span></a>s.</div></div><div class="note"><div class="p"><b>Note:</b> In some cases, the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of node <var>N</var> will be
shorter than <a href="#icd-fields" class="propref" shape="rect">{fields}</a> in length,
for example whenever any field evaluates to the empty sequence or to a
sequence consisting only of <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> or
<a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> nodes. In
such a case, the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of <var>N</var> does not
participate in value comparison, because <var>N</var> is not a member of the
<a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a>. See below.</div></div></div>
<div class="clnumber">4 <!--* no span class='p' possible here *-->
<span class="termdef"><a name="key-qns" id="key-qns" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>qualified node set</b> is the subset
of the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> consisting of those nodes
whose <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a>
has the same length as the <a href="#icd-fields" class="propref" shape="rect">{fields}</a></span>.
The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">4.1<a id="c-u" name="c-u" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>unique</i></b>, <b>then </b>no two members of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> have
<a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequences<span class="arrow">&#183;</span></a> whose members
are pairwise equal or identical,
as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div><div class="clnumber">4.2<a id="c-k" name="c-k" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>key</i></b>, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.2.1 <span class="p">The <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> and the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> are equal, that is, every
member of the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> is also a member of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> and
<em>vice versa</em>.</span></div>
<div class="clnumber">4.2.2 <span class="p">No two members of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> have <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequences<span class="arrow">&#183;</span></a> whose members
are pairwise equal or identical,
as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">4.2.3<a id="c-nlbl" name="c-nlbl" shape="rect"> </a><span class="p">No element member of the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of any
member of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> was assessed as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> by reference to an element
declaration whose <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> is <b><i>true</i></b>.</span></div>
</div>
</div><div class="clnumber">4.3<a id="cl-krv" name="cl-krv" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>keyref</i></b>, <b>then </b>for each member of the
<a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> (call this
the <b>keyref member</b>), there is a
<a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node table<span class="arrow">&#183;</span></a> associated
with the
<a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a> in the <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a> of <var>E</var>
(see <a href="#sic-key" shape="rect">Identity-constraint Table (&#167;3.11.5)</a>, which is understood
as logically prior to this clause of this constraint,
below) and there is an entry in that table whose
<a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> is
equal or identical
to the <b>keyref member's</b>
<a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> member for member,
as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div></div>
</div>
</div>
</div><div class="note"><div class="p"><b>Note:</b>
For <b><i>unique</i></b> identity constraints, the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> is
allowed to be different from the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a>. That is, a
selected unique node may have fields that do not have corresponding
<span class="anonRef">[schema actual value]</span>s.
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> Because the validation of <b><i>keyref</i></b> (see clause <a href="#cl-krv" shape="rect">4.3</a>) depends on finding appropriate entries in a
element information item's <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
table<span class="arrow">&#183;</span></a>, and <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
tables<span class="arrow">&#183;</span></a> are assembled strictly recursively from the
node tables of descendants, only element information items
within the sub-tree rooted at the element information item
being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> can be referenced successfully.</div></div><div class="note"><div class="p"><b>Note:</b> Although this specification defines a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contribution
which would enable schema-aware processors to implement
clause <a href="#c-nlbl" shape="rect">4.2.3</a> above (<a href="#sic-elt-decl" shape="rect">Element Declaration (&#167;3.3.5.3)</a>), processors are not required to provide
it. This clause can be read as if in the absence of this
infoset contribution, the value of the relevant <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a>
property <span class="rfc2119">must</span> be available.</div></div><p>For purposes of checking
identity-constraints, single atomic values are not distinguished
from lists with single items. An atomic value <var>V</var> and a list
<var>L</var> with a single item are treated as equal, for
purposes of this specification, if <var>V</var> is equal
to the atomic value which is the single item of <var>L</var>.
And similarly for identity.
</p></div><div class="div3">
<h4><a name="sec-sic-key" id="sec-sic-key" shape="rect"></a>3.11.5 Identity-constraint Definition Information Set Contributions</h4><div class="constraintnote"><a id="sic-key" name="sic-key" shape="rect"></a><b>Schema Information Set Contribution: Identity-constraint Table</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-ec" id="key-ec" title="" shape="rect">[Definition:]&#160;&#160;</a>An
<b>eligible identity-constraint</b> of an element information item is
one such that clause <a href="#c-u" shape="rect">4.1</a> or clause <a href="#c-k" shape="rect">4.2</a> of
<a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a> is satisfied with respect to that
item and that constraint, or such that any of the element information
item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that item have an <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a> property whose value has an entry for
that constraint</span>.</div><div class="p"><span class="termdef"><a name="key-nt" id="key-nt" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>node
table</b> is a set of pairs each consisting of a <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> and an element node</span>.</div><div class="p">Whenever an element information item has one or more <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraints<span class="arrow">&#183;</span></a>, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> that
element information item has a property as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-id_constraint_table" name="e-id_constraint_table" shape="rect"><span class="propdef">[identity-constraint table]</span></a></dt><dd>
one
<b>Identity-constraint Binding</b>
information item for each <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraint<span class="arrow">&#183;</span></a>, with
properties as follows:
<div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;Identity-constraint Binding&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="cb-definition" name="cb-definition" shape="rect"><span class="propdef">[definition]</span></a></dt><dd>The <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraint<span class="arrow">&#183;</span></a>.</dd><dt><a id="cb-node_table" name="cb-node_table" shape="rect"><span class="propdef">[node table]</span></a></dt><dd>A <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node table<span class="arrow">&#183;</span></a> with one entry for every <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> (call it <b>k</b>) and
node (call it <b>n</b>) such that
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1<a id="c-kc" name="c-kc" shape="rect"> </a><span class="p">There is an entry in one of the <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
tables<span class="arrow">&#183;</span></a> associated with the <a href="#cb-definition" class="propref" shape="rect">[definition]</a> in an <b>Identity-constraint Binding</b>
information item in at least one of the <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a>s of the element information item
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the element information item whose <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> is <b>k</b> and whose node
is <b>n</b>;</span></div>
<div class="clnumber">2 <span class="p"><b>n</b> appears with <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> <b>k</b> in the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> for the <a href="#cb-definition" class="propref" shape="rect">[definition]</a>.</span></div>
</div> provided no two entries have the same <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> but distinct nodes. Potential
conflicts are resolved by not including any conflicting entries which
would have owed their inclusion to clause <a href="#c-kc" shape="rect">1</a> above. Note
that if all the conflicting entries arose under clause <a href="#c-kc" shape="rect">1</a> above, this means no entry at all will appear for the
offending <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a>.</dd></dl>
</div>
</div>
</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The complexity of the above arises from the fact that
<b><i>keyref</i></b> identity-constraints can be defined on domains distinct from the
embedded domain of the identity-constraint they reference, or on domains which are the
same but self-embedding at some depth. In either case the <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
table<span class="arrow">&#183;</span></a> for the referenced identity-constraint needs to propagate upwards, with
conflict resolution.</div><div class="p">The <b>Identity-constraint Binding</b> information item, unlike
others in this specification, is essentially an internal bookkeeping
mechanism. It is introduced to support the definition of <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>
above.
</div></div></div></div></div><div class="div3">
<h4><a name="coss-identity-constraint" id="coss-identity-constraint" shape="rect"></a>3.11.6 Constraints on Identity-constraint Definition Schema Components</h4><div class="div4">
<h5><a name="sec-c-props-correct" id="sec-c-props-correct" shape="rect"></a>3.11.6.1 Identity-constraint Definition Properties Correct</h5><p>All identity-constraint definitions (see <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>) <span class="rfc2119">must</span> satisfy the
following constraint.</p><div class="constraintnote"><a id="c-props-correct" name="c-props-correct" shape="rect"></a><b>Schema Component Constraint: Identity-constraint Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an identity-constraint definition
are as described in the property tableau in
<a href="#Identity-constraint_Definition_details" shape="rect">The Identity-constraint Definition Schema Component (&#167;3.11.1)</a>, modulo the
impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
is <b><i>keyref</i></b>, the cardinality of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> is equal
to that of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a>
of the <a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-c-selector-xpath" id="sec-c-selector-xpath" shape="rect"></a>3.11.6.2 Selector Value OK</h5><div class="constraintnote"><a id="c-selector-xpath" name="c-selector-xpath" shape="rect"></a><b>Schema Component Constraint: Selector Value OK</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#icd-selector" class="propref" shape="rect">{selector}</a>
satisfies the constraint
<a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
</span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->Its
<a href="#x-expression" class="propref" shape="rect">{expression}</a>
conforms to the following extended BNF:
<table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Selector XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Selector" id="Selector" shape="rect"></a>[1]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Selector</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#Path" shape="rect"><i>Path</i></a> ( '|' <a href="#Path" shape="rect"><i>Path</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Path" id="Path" shape="rect"></a>[2]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Path</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a name="anchor8454" id="anchor8454" shape="rect"></a>('.' '//')? <a href="#Step" shape="rect"><i>Step</i></a> ( '/' <a href="#Step" shape="rect"><i>Step</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Step" id="Step" shape="rect"></a>[3]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Step</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'.' | <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="NameTest" id="NameTest" shape="rect"></a>[4]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>NameTest</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a> | '*' | <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a>
':*'</code></td></tr></tbody></table></td></tr></tbody></table>
</div>
<div class="clnumber">2.2 <span class="p">Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> is an XPath expression
involving the <code>child</code> axis whose abbreviated
form is as given above.</span></div>
</div></div>
</div><div class="p">For readability, whitespace <span class="rfc2119">may</span> be used in selector XPath
expressions even though not explicitly allowed by the grammar:
<a href="#whitespace" shape="rect"><i>whitespace</i></a> <span class="rfc2119">may</span> be freely added
within patterns before or after any <a href="#token" shape="rect"><i>token</i></a>.
<table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Lexical productions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="token" id="token" shape="rect"></a>[5]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>token</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'.' | '/' | '//' | '|' | '@' | <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="whitespace" id="whitespace" shape="rect"></a>[6]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>whitespace</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml11/#NT-S" shape="rect">S</a></code></td></tr></tbody></table></td></tr></tbody></table></div><div class="p">When tokenizing, the longest possible token is always returned.</div></div></div><p>
<span class="termdef"><a name="key-selector-subset" id="key-selector-subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
The subset of XPath defined in
<a href="#c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a> is called the
<b>selector subset</b> of XPath.
</span></p></div><div class="div4">
<h5><a name="sec-c-fields-xpaths" id="sec-c-fields-xpaths" shape="rect"></a>3.11.6.3 Fields Value OK</h5><div class="constraintnote"><a id="c-fields-xpaths" name="c-fields-xpaths" shape="rect"></a><b>Schema Component Constraint: Fields Value OK</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Each member of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a>
satisfies the constraint
<a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->For each member of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> conforms to the extended BNF given
above for <a href="#Selector" shape="rect"><i>Selector</i></a>, with the following modification:
<table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Path in Field XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="fPath" id="fPath" shape="rect"></a>[7]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Path</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>('.' '//')?
( <a href="#Step" shape="rect"><i>Step</i></a> '/' )* ( <a href="#Step" shape="rect"><i>Step</i></a> | '@' <a href="#NameTest" shape="rect"><i>NameTest</i></a> )</code></td></tr></tbody></table></td></tr></tbody></table>
This production differs from the one above in allowing the final
step to match an attribute node.
</div>
<div class="clnumber">2.2 <span class="p">Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> is an XPath expression involving the <code>child</code> and/or <code>attribute</code> axes whose abbreviated form is
as given above.</span></div>
</div></div>
</div><div class="p">For readability, whitespace <span class="rfc2119">may</span> be used in field XPath expressions even though not
explicitly allowed by the grammar: <a href="#whitespace" shape="rect"><i>whitespace</i></a> <span class="rfc2119">may</span> be freely added within patterns before or after any <a href="#token" shape="rect"><i>token</i></a>.
</div><div class="p">When tokenizing, the longest possible token is always returned.</div></div></div><p>
<span class="termdef"><a name="key-field-subset" id="key-field-subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
The subset of XPath defined in
<a href="#c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a> is called the
<b>field subset</b> of XPath.
</span></p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cIdentity-constraint_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAssertions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cTypeAlternative" id="cTypeAlternative" shape="rect"></a>3.12 Type Alternatives</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.1 <a href="#TA_details" shape="rect">The Type Alternative Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.2 <a href="#declare-ta" shape="rect">XML Representation of Type Alternative Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.3 <a href="#sec-src-ta" shape="rect">Constraints on XML Representations of Type Alternatives</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.4 <a href="#sec-cvc-ta" shape="rect">Type Alternative Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.5 <a href="#sec-sic-ta" shape="rect">Type Alternative Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.6 <a href="#coss-ta" shape="rect">Constraints on Type Alternative Schema Components</a><br clear="none" />
</div><p>Type Alternative components provide associations between boolean
conditions (as XPath expressions) and <a href="#td" class="compref" shape="rect">Type Definition</a>s.
They are used in conditional type assignment.
</p><div class="div3">
<h4><a name="TA_details" id="TA_details" shape="rect"></a>3.12.1 The Type Alternative Schema Component</h4><p>The type alternative schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="tac" id="tac" shape="rect">Type Alternative</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="tac-annotations" shape="rect" id="tac-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="tac-test" shape="rect" id="tac-test"></a><div class="pdName"><span class="propdef">{test}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="tac-type_definition" shape="rect" id="tac-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A <a href="#td" class="compref" shape="rect">Type Definition</a> component. Required.</div>
</div>
</div></div>
</div>
</div>
<p>Type alternatives can be used by an <a href="#ed" class="compref" shape="rect">Element Declaration</a> to specify a
condition (<a href="#tac-test" class="propref" shape="rect">{test}</a>) under which a particular type (<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>) is used
as the
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> for element information items governed by that
<a href="#ed" class="compref" shape="rect">Element Declaration</a>. Each <a href="#ed" class="compref" shape="rect">Element Declaration</a> <span class="rfc2119">may</span> have multiple
<a href="#tac" class="compref" shape="rect">Type Alternative</a>s in its <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.</p></div><div class="div3">
<h4><a name="declare-ta" id="declare-ta" shape="rect"></a>3.12.2 XML Representation of Type Alternative Schema Components</h4><p>The XML representation for a type
alternative schema component is an
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element information item. The correspondences
between the properties of that information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the
component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>alternative</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-alternative" name="element-alternative" shape="rect">&lt;alternative</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;test = <i>an XPath expression</i><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;xpathDefaultNamespace =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a>)?)<br clear="none" />&lt;/alternative&gt;</p></div></div><p>Each <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element
maps to a <a href="#tac" class="compref" shape="rect">Type Alternative</a> component as follows.
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#TA_details" shape="rect">Type Alternative</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-test" class="propref" shape="rect">{test}</a></div><div class="mapRepr">
If the <code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
otherwise an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described in
section
<a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>, with
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> as the "host element"
and <code>test</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">
The type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>type</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if one is present, otherwise the type definition corresponding
to the <code>complexType</code> or <code>simpleType</code> among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div3">
<h4><a name="sec-src-ta" id="sec-src-ta" shape="rect"></a>3.12.3 Constraints on XML Representations of Type Alternatives</h4><div class="constraintnote"><a id="src-ta" name="src-ta" shape="rect"></a><b>Schema Representation Constraint: Type
Alternative Representation OK</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor11230" id="anchor11230" shape="rect"></a>In addition to the conditions imposed
on <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>
element information items by the schema for schema documents,
each
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element <span class="rfc2119">must</span> have
one (and only one)
of the following:
a <code>type</code>
attribute, or a <code>complexType</code> child element, or a
<code>simpleType</code> child element.
</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-ta" id="sec-cvc-ta" shape="rect"></a>3.12.4 Type Alternative Validation Rules</h4><div class="block"><span class="termdef"><a name="key-cta-ta-select" id="key-cta-ta-select" title="" shape="rect">[Definition:]&#160;&#160;</a>A <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>A</var>
<b>successfully selects</b> a <a href="#td" class="compref" shape="rect">Type Definition</a> <var>T</var> for an
element information item <var>E</var> if and only if <var>A</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> evaluates to
<code>true</code> and <var>A</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> = <var>T</var>.</span>
<a name="anchor6465" id="anchor6465" shape="rect"></a>
The <a href="#tac-test" class="propref" shape="rect">{test}</a> is evaluated in the following way:<div class="constraintlist"><div class="clnumber">1<a id="hack0810-20" name="hack0810-20" shape="rect"> </a><!--* no span class='p' possible here *-->
An instance of the <a href="#bib-xdm" shape="rect">[XDM]</a> data model is constructed as
follows: <div class="constraintlist"><div class="clnumber">1.1<a id="hack0810-21" name="hack0810-21" shape="rect"> </a><!--* no span class='p' possible here *-->
An information set is constructed by copying
the base information set properties
(and not any of the properties specific to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>) of the following
information items:
<div class="constraintlist"><div class="clnumber">1.1.1<a id="hack0810-22" name="hack0810-22" shape="rect"> </a><span class="p">
<var>E</var> itself.
</span></div>
<div class="clnumber">1.1.2 <span class="p">
<var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> (but not its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>).
</span></div>
<div class="clnumber">1.1.3 <span class="p">
<var>E</var>'s <a href="#e-inherited_attributes" class="propref" shape="rect">[inherited attributes]</a> which do not
have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> as any of <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
They are copied as if they were among <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and had
<var>E</var> as their <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a>.
When an attribute with a non-empty
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a> is copied, <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> may need to be performed on the
resulting information set to ensure that a prefix <var>P</var> is bound to
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a> and the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a> of
the copied attribute is set to <var>P</var>.
</span></div>
</div>
<span class="termdef"><a name="key-base-infoset-props" id="key-base-infoset-props" title="" shape="rect">[Definition:]&#160;&#160;</a>By <b>base information set properties</b>
are meant the properties listed in
<a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a>.
</span>
</div>
<div class="clnumber">1.2 <span class="p">
In the copy of <var>E</var>, the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a> property
is modified to have no value.
The <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> property
is modified to have the empty list as its value.
</span></div>
<div class="clnumber">1.3 <span class="p">
An <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance is constructed from
that information set, following the rules given in
<a href="#bib-xdm" shape="rect">[XDM]</a>.
</span></div>
</div>
</div>
<div class="clnumber">2 <span class="p">
The XPath expression
which is the value of the <a href="#tac-test" class="propref" shape="rect">{test}</a>, is evaluated
as described in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>.
If a
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">dynamic error</a> or a
<a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type error</a> is raised during
evaluation, then the <a href="#tac-test" class="propref" shape="rect">{test}</a> is
treated as if it had evaluated (without
error) to <code>false</code>.
</span><div class="note"><a name="anchor11073a" id="anchor11073a" shape="rect"></a><div class="p"><b>Note:</b>
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">Dynamic errors</a>
and <a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type errors</a> in
the evaluation of <a href="#tac-test" class="propref" shape="rect">{test}</a> expressions cause neither the
schema nor the document instance to be invalid. But
conforming processors <span class="rfc2119">may</span> issue a warning if they occur.
However,
if type errors are
detected statically by the XPath processor, the effect is
the same as for other static errors in the XPath
expression.
</div></div></div>
</div></div><div class="note"><div class="p"><b>Note:</b>
As a consequence of the rules just given, the root node of the
<a href="#bib-xdm" shape="rect">[XDM]</a> instance is necessarily constructed from
<var>E</var>;
the ancestors,
siblings, children, and descendants of <var>E</var> are
not represented in the data model instance, and they are thus
not accessible to the tests expressed in the <a href="#tac-test" class="propref" shape="rect">{test}</a>s in the
<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>. The element <var>E</var> and its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> will be
represented in the data model instance by nodes labeled as
untyped. If the <a href="#tac-test" class="propref" shape="rect">{test}</a> expressions being evaluated include
comparisons which require type information, then explicit casts
will sometimes be necessary.
</div></div></div><div class="div3">
<h4><a name="sec-sic-ta" id="sec-sic-ta" shape="rect"></a>3.12.5 Type Alternative Information Set Contributions</h4><p>None.</p></div><div class="div3">
<h4><a name="coss-ta" id="coss-ta" shape="rect"></a>3.12.6 Constraints on Type Alternative Schema Components</h4><p>All type alternatives (see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>) <span class="rfc2119">must</span>
satisfy the following constraints.</p><div class="constraintnote"><a id="ta-props-correct" name="ta-props-correct" shape="rect"></a><b>Schema Component Constraint: Type Alternative Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
The values of the properties of a type alternatives
are as
described in the property tableau in <a href="#TA_details" shape="rect">The Type Alternative Schema Component (&#167;3.12.1)</a>,
modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
</span></div>
<div class="clnumber">2<a id="c-cta-static" name="c-cta-static" shape="rect"> </a><!--* no span class='p' possible here *-->
If the <a href="#tac-test" class="propref" shape="rect">{test}</a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then it satisfies the constraint
<a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
signatures</a> in the <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
<span class="rfc2119">must</span> include signatures for
<b>all</b> of the following:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">The <a href="http://www.w3.org/TR/xpath-functions/#func-not" shape="rect">fn:not</a> function
defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
</span></div>
<div class="clnumber">2.2 <span class="p">Constructor functions for the built-in datatypes.</span></div>
</div>
The further contents of <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
signatures</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
</div>
</div><div class="p">
A conforming processor <span class="rfc2119">must</span> accept and process any XPath expression
conforming to the "required subset" of <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> defined
by the following grammar.
</div><div class="note"><a name="anchor11073b" id="anchor11073b" shape="rect"></a><div class="p"><b>Note:</b>
Any XPath expression containing no static errors as defined in
<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> may
appear in a conforming schema. Conforming processors <span class="rfc2119">may</span> but are not
required to support XPath expressions not belonging to the required
subset of XPath.
</div></div><div class="p">
An XPath expression belongs to the required subset of XPath if and only
if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="anchor11073c" name="anchor11073c" shape="rect"> </a><span class="p">
The <a href="#x-expression" class="propref" shape="rect">{expression}</a> property of the
<a href="#x" class="compref" shape="rect">XPath Expression</a> is an XPath expression containing
no static errors, as defined in
<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
</span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->
It conforms to the following extended BNF:
<table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Test XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-Test" id="ta-Test" shape="rect"></a>[8]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Test</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-OrExpr" id="ta-OrExpr" shape="rect"></a>[9]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>OrExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-AndExpr" shape="rect"><i>AndExpr</i></a>
( 'or' <a href="#ta-AndExpr" shape="rect"><i>AndExpr</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-AndExpr" id="ta-AndExpr" shape="rect"></a>[10]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>AndExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-BooleanExpr" shape="rect"><i>BooleanExpr</i></a>
( 'and' <a href="#ta-BooleanExpr" shape="rect"><i>BooleanExpr</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-BooleanExpr" id="ta-BooleanExpr" shape="rect"></a>[11]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>BooleanExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'(' <a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a> ')' |</code></td></tr><tr valign="baseline"><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"><code><a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a> |</code></td></tr><tr valign="baseline"><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"><code>
<a href="#ta-ValueExpr" shape="rect"><i>ValueExpr</i></a>
( <a href="#ta-Comparator" shape="rect"><i>Comparator</i></a>
<a href="#ta-ValueExpr" shape="rect"><i>ValueExpr</i></a>
)?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-BooleanFunction" id="ta-BooleanFunction" shape="rect"></a>[12]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>BooleanFunction</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a>
'(' <a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a> ')'</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-Comparator" id="ta-Comparator" shape="rect"></a>[13]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Comparator</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'=' | '!=' | '&lt;' | '&lt;=' | '&gt;' | '&gt;='</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-ValueExpr" id="ta-ValueExpr" shape="rect"></a>[14]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>ValueExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
<a href="#ta-CastExpr" shape="rect"><i>CastExpr</i></a>
|
<a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>
</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-CastExpr" id="ta-CastExpr" shape="rect"></a>[15]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>CastExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
<a href="#ta-SimpleValue" shape="rect"><i>SimpleValue</i></a>
( 'cast' 'as' QName '?'? )?
</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-SimpleValue" id="ta-SimpleValue" shape="rect"></a>[16]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>SimpleValue</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-AttrName" shape="rect"><i>AttrName</i></a>
|
<a href="http://www.w3.org/TR/xpath20/#doc-xpath-Literal" shape="rect">Literal</a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-AttrName" id="ta-AttrName" shape="rect"></a>[17]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>AttrName</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'@' <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-ConstructorFunction" id="ta-ConstructorFunction" shape="rect"></a>[18]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>ConstructorFunction</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a>
'(' <a href="#ta-SimpleValue" shape="rect"><i>SimpleValue</i></a> ')'</code></td></tr></tbody></table></td></tr></tbody></table>
</div>
<div class="clnumber">2.2 <span class="p">
It is an XPath expression involving the <code>attribute</code> axis
whose abbreviated form is as given above.
</span></div>
</div><div class="note"><div class="p"><b>Note:</b>
For readability, <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> allows whitespace to be
used between tokens in XPath expressions, even though this is not
explicitly shown in the grammar. For details of whitespace handling,
consult <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
</div></div></div>
<div class="clnumber">3 <span class="p">
Any strings matching the <a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a>
production are function calls to <a href="http://www.w3.org/TR/xpath-functions/#func-not" shape="rect">fn:not</a>
defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
Any strings matching the <a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>
production are function calls to constructor functions for the built-in
datatypes.
</span><div class="note"><div class="p"><b>Note:</b> The minimal content of the <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
signatures</a> in the <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
is given in clause <a href="#c-cta-static" shape="rect">2</a>
of <a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct (&#167;3.12.6)</a>: <code>fn:not</code> and
constructors for the built-in datatypes.
</div></div><div class="note"><div class="p"><b>Note:</b>
The above extended BNF is ambiguous. For example, the string
"<code>a:b('123')</code>" has 2 paths in the grammar, by matching either
<a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a> or
<a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>. The rules given
here require different function names for the productions. As a result, the
ambiguity can be resolved based on the function name.
</div></div></div>
<div class="clnumber">4 <span class="p">
Any explicit casts (i.e. any strings which match
the optional "<code>cast as</code>" <em>QName</em> in the
<a href="#ta-CastExpr" shape="rect"><i>CastExpr</i></a> production)
are casts to built-in datatypes.
</span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b>
Implementations <span class="rfc2119">may</span> choose to support a bigger subset of
<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
</div></div><div class="note"><div class="p"><b>Note:</b> The rule given above for the construction of the data model
instance has as a consequence that even when implementations
support full <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions, it is not
possible to refer successfully to the children, siblings,
ancestors, etc. of the element whose type is being selected.
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cTypeAlternative" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cNotation_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAssertions" id="cAssertions" shape="rect"></a>3.13 Assertions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.1 <a href="#Assertion_details" shape="rect">The Assertion Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.2 <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.3 <a href="#sec-src-assertion" shape="rect">Constraints on XML Representations of Assertions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4 <a href="#assertion-validation" shape="rect">Assertion Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4.1 <a href="#sec-cvc-assertion" shape="rect">Assertion Satisfied</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4.2 <a href="#sec-cvc-xpath" shape="rect">XPath Evaluation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.5 <a href="#sec-sic-assertion" shape="rect">Assertion Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6 <a href="#coss-assertion" shape="rect">Constraints on Assertion Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6.1 <a href="#sec-as-props-correct" shape="rect">Assertion Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6.2 <a href="#sec-xpath-valid" shape="rect">XPath Valid</a><br clear="none" />
</div><p>Assertion components constrain the existence and values of related
elements and attributes.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:assert test="@min le @max"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation
for assertions.</div></div><div class="exampleWrapper">
<div class="p">The <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element requires that the
value of the <code>min</code> attribute be less than or equal to that of the
<code>max</code> attribute, and fails if that is not the case.
</div></div></div><div class="div3">
<h4><a name="Assertion_details" id="Assertion_details" shape="rect"></a>3.13.1 The Assertion Schema Component</h4><p>The assertion schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="as" id="as" shape="rect">Assertion</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="as-annotations" shape="rect" id="as-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="as-test" shape="rect" id="as-test"></a><div class="pdName"><span class="propdef">{test}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="x" id="x" shape="rect">XPath Expression</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="x-namespace_bindings" shape="rect" id="x-namespace_bindings"></a><div class="pdName"><span class="propdef">{namespace bindings}</span></div>
<div class="pdDef">
A set of <a href="#nb" class="compref" shape="rect">Namespace Binding</a> property records. </div>
</div>
<div class="propDefn"><a name="x-default_namespace" shape="rect" id="x-default_namespace"></a><div class="pdName"><span class="propdef">{default namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="x-base_URI" shape="rect" id="x-base_URI"></a><div class="pdName"><span class="propdef">{base URI}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="x-expression" shape="rect" id="x-expression"></a><div class="pdName"><span class="propdef">{expression}</span></div>
<div class="pdDef">
An <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expression. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="nb" id="nb" shape="rect">Namespace Binding</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nb-prefix" shape="rect" id="nb-prefix"></a><div class="pdName"><span class="propdef">{prefix}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="nb-namespace" shape="rect" id="nb-namespace"></a><div class="pdName"><span class="propdef">{namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Required.</div>
</div>
</div></div>
</div>
</div>
<p>To check an assertion,
an instance of the XPath 2.0 data
model (<a href="#bib-xdm" shape="rect">[XDM]</a>) is constructed,
<a name="anchor12127" id="anchor12127" shape="rect"></a>
in which the element
information item being <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>
is the (parentless) root node,
and
elements and attributes are assigned types and values according to
XPath 2.0 data model construction rules, with some exceptions. See
<a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a> for details about how the data model is
constructed.
When evaluated against this data model
instance, <a href="#as-test" class="propref" shape="rect">{test}</a> evaluates to either
<code>true</code>
or <code>false</code> (if any other value is returned, it's converted to
either <code>true</code> or <code>false</code> as if by a call to the XPath
<a href="http://www.w3.org/TR/xpath-functions/#func-boolean" shape="rect">fn:boolean</a> function).</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of
the <a href="#as-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-assertion" id="declare-assertion" shape="rect"></a>3.13.2 XML Representation of Assertion Schema Components</h4><p>The XML representation for an assertion schema component
is
an <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a>
element information item.
The correspondences between the properties of
that information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component
it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>assert</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-assert" name="element-assert" shape="rect">&lt;assert</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>test</b> = <i>an XPath expression</i><br clear="none" />&#160;&#160;xpathDefaultNamespace =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/assert&gt;</p></div></div><p>The <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element
maps to an <a href="#as" class="compref" shape="rect">Assertion</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Assertion_details" shape="rect">Assertion</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#as-test" class="propref" shape="rect">{test}</a></div><div class="mapRepr">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described below,
with <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> as the "host element"
and <code>test</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#as-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>
Assertions, like identity constraints and conditional type
assignment, use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions.
The expression itself is recorded, together with relevant parts
of the context, in an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record.
The mapping is as described below; in each case, the XPath
expression itself is given in a <b>designated attribute</b> of
the appropriate "<b>host element</b>".
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#x" shape="rect">XPath Expression</a> <strong>Property Record</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a></div><div class="mapRepr">
A set of <a href="#nb" class="compref" shape="rect">Namespace Binding</a> property records. Each member
corresponds to an entry in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of
the host element, with
<a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> being the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a>
and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace
name]</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a></div><div class="mapRepr">
Let <b>D</b> be the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>xpathDefaultNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if
present on the host
element, otherwise that of the
<code>xpathDefaultNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor. Then
the value is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b><b>D</b> is
<code>##defaultNamespace</code>, <b>then </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>there is an entry in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of the host element whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a>
is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the corresponding <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace
name]</a>;</div><div class="clnumber">1.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div></div></div><div class="clnumber">2 <b>If </b><b>D</b> is
<code>##targetNamespace</code>, <b>then </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present on the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
ancestor, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div></div></div><div class="clnumber">3 <b>If </b><b>D</b> is <code>##local</code>, <b>then </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div><div class="clnumber">4 <b>otherwise </b>(<b>D</b> is an xs:anyURI
value) <b>D</b>.</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-base_URI" class="propref" shape="rect">{base URI}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base
URI]</a> of the host element.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-expression" class="propref" shape="rect">{expression}</a></div><div class="mapRepr">
An XPath expression corresponding to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
designated <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the host element.
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="intRange"&gt;
&lt;xs:attribute name="min" type="xs:int"/&gt;
&lt;xs:attribute name="max" type="xs:int"/&gt;
&lt;xs:assert test="@min le @max"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The value of the <code>min</code> attribute must be less than or equal to
that of the <code>max</code> attribute.
Note that the attributes are validated before the assertion
on the parent element is checked, so the typed values of the attributes
are available for comparison; it is not necessary to cast the values
to <code>int</code> or some other numeric type before comparing them.
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="arrayType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="entry" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="length" type="xs:int"/&gt;
&lt;xs:assert test="@length eq fn:count(./entry)"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The value of the <code>length</code> attribute must be the same as
the number of occurrences of <code>entry</code> sub-elements.</div></div></div></div><div class="div3">
<h4><a name="sec-src-assertion" id="sec-src-assertion" shape="rect"></a>3.13.3 Constraints on XML Representations of Assertions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="assertion-validation" id="assertion-validation" shape="rect"></a>3.13.4 Assertion Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-assertion" id="sec-cvc-assertion" shape="rect"></a>3.13.4.1 Assertion Satisfied</h5><div class="constraintnote"><a id="cvc-assertion" name="cvc-assertion" shape="rect"></a><b>Validation Rule: Assertion Satisfied</b><br clear="none" /><div class="constraint"><div class="p">An element information item
<var>E</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an
assertion if
and only if the <a href="#as-test" class="propref" shape="rect">{test}</a>
evaluates to <code>true</code> (see below) without raising
any <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">dynamic error</a>
or <a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type
error</a>.
</div><div class="p">
Evaluation of <a href="#as-test" class="propref" shape="rect">{test}</a> is performed as defined
in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>, with the following conditions:</div><div class="constraintlist"><div class="clnumber">1<a id="c-buildxdm" name="c-buildxdm" shape="rect"> </a><!--* no span class='p' possible here *-->
A data model
instance (see <a href="#bib-xdm" shape="rect">[XDM]</a>)
is constructed in the following way:
<div class="constraintlist"><div class="clnumber">1.1 <span class="p"><var>E</var> is validated
with respect to its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, as defined
in <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>, if the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> exists, otherwise
against
its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>, as defined in <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>,
except that for <var>E</var> itself (though not for its element
information item descendents), clause <a href="#c-as" shape="rect">6</a>
of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>
is skipped. (Informally,
the element is validated normally,
except that assertions are not checked.)
</span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
of <var>E</var> will be validated in the usual way.</div></div></div>
<div class="clnumber">1.2<a id="c-as-partialpsvi" name="c-as-partialpsvi" shape="rect"> </a><span class="p">A "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> describing the results
of this partial validation
of <var>E</var> is constructed. The <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> properties
of <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> are defined in the
usual way. On <var>E</var> itself, all <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
properties are supplied as described elsewhere in this specification
if their values are known. The element's
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property is given
the value <b><i>invalid</i></b> if and only if the element is known
to be invalid; otherwise it is given the value <b><i>notKnown</i></b>.
The element's <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property
is given the value <b><i>partial</i></b>.</span><div class="note"><div class="p"><b>Note:</b> Since the assertions of its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> have not been
checked, <var>E</var> has been only partially
validated, and can be known to be invalid, but not known to be
valid. The values of the <a href="#e-validity" class="propref" shape="rect">[validity]</a>
and <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> properties
are set accordingly.</div></div></div>
<div class="clnumber">1.3 <span class="p">From the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, a data model
instance is constructed as described in <a href="#bib-xdm" shape="rect">[XDM]</a>.
The root node of the <a href="#bib-xdm" shape="rect">[XDM]</a> instance is
constructed from <var>E</var>; the data model instance contains only
that node and nodes constructed from the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and descendants of <var>E</var>.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this construction that attempts
to refer, in an assertion, to the siblings or ancestors of
<var>E</var>, or to any part of the input document outside of <var>E</var>
itself, will be unsuccessful.
Such attempted references
are not in themselves errors, but the data model instance
used to evaluate them does not include any representation
of any parts of the document outside of <var>E</var>, so they
cannot be referred to.
</div></div></div>
</div>
</div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
The XPath expression <a href="#as-test" class="propref" shape="rect">{test}</a> is evaluated, following the rules
given in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>, with the
following
conditions and modifications:
<div class="constraintlist"><div class="clnumber">2.1 <span class="p">The root node of the <a href="#bib-xdm" shape="rect">[XDM]</a> instance
described in clause <a href="#c-buildxdm" shape="rect">1</a> serves as the <a href="http://www.w3.org/TR/xpath20/#dt-context-node" shape="rect">context
node</a> for evaluation of the XPath
expression.</span></div>
<div class="clnumber">2.2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
is augmented with the variable "<code>$value</code>",
as described in
<a href="#as-props-correct" shape="rect">Assertion Properties Correct (&#167;3.13.6.1)</a>.
</span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->
The variable "<code>$value</code>" appears as a member
of the <a href="http://www.w3.org/TR/xpath20/#dt-variable-values" shape="rect">variable values</a> in
the <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>. The
<code>expanded QName</code> of that member has no namespace URI and has
"<code>value</code>" as the local name.
The <code>value</code> of the member is determined by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.3.1 <b>If </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1.1 <span class="p">
<var>E</var>'s <a href="#e-validity" class="propref" shape="rect">[validity]</a> in the "partial"
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is not <b><i>invalid</i></b>;
</span></div>
<div class="clnumber">2.3.1.2 <span class="p">
<var>E</var>'s <a href="#e-nil" class="propref" shape="rect">[nil]</a> in the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
does not exist or has value <b><i>false</i></b>;
</span></div>
<div class="clnumber">2.3.1.3 <span class="p">
the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of <var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>,
</span></div>
</div>
<b>then </b>
the <code>value</code> is the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-xdmrep" shape="rect">XDM representation</a> of
<var>E</var>.<a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>
under the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
. <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
of <var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>.
<div class="note"><div class="p"><b>Note:</b>
This clause provides type information to simple contents
of elements, to make type-aware comparisons and
operations possible without explicit casting in the
XPath expressions.
</div></div><div class="note"><div class="p"><b>Note:</b> For complex types with simple content, the element node
may be referred to as "<code>.</code>", while
its content may be referred to as
"<code>$value</code>". Since the element node,
as a consequence of clause <a href="#c-as-partialpsvi" shape="rect">1.2</a>, will normally have the type
annotation <code>anyType</code>, its <a href="http://www.w3.org/TR/xpath20/#dt-atomization" shape="rect">atomized</a>
value will be a single atomic value of type
<code>untypedAtomic</code>. By contrast,
<code>$value</code> will be a sequence of one or more
atomic values, whose types are the most specific
(narrowest) built-in types available.</div></div></div><div class="clnumber">2.3.2 <b>otherwise </b>(in the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>,
<var>E</var>.<a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>
or
<var>E</var>.<a href="#e-nil" class="propref" shape="rect">[nil]</a> = <b><i>true</i></b>
or
<var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> does not have
<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
. <a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>)
the <code>value</code> is the empty sequence.
</div></div>
</div>
</div>
</div>
<div class="clnumber">3 <span class="p">
The evaluation result
is converted to either <code>true</code>
or <code>false</code> as if by a call to the XPath
<a href="http://www.w3.org/TR/xpath-functions/#func-boolean" shape="rect">fn:boolean</a> function.</span></div>
</div></div></div><div class="note"><div class="p"><b>Note:</b>
Although the rules
just given describe
how an <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> and a <a href="#bib-xdm" shape="rect">[XDM]</a>
instance are constructed, processors are not required
to construct
actual data structures representing them.
However, the result of XPath evaluation <span class="rfc2119">must</span> be the same as if such
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> and <a href="#bib-xdm" shape="rect">[XDM]</a> instance
data structures were
constructed.
</div></div></div><div class="div4">
<h5><a name="sec-cvc-xpath" id="sec-cvc-xpath" shape="rect"></a>3.13.4.2 XPath Evaluation</h5><div class="constraintnote"><a id="cvc-xpath" name="cvc-xpath" shape="rect"></a><b>Validation Rule: XPath Evaluation</b><br clear="none" /><div class="constraint"><div class="p">An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record <var>X</var>, with a context node <var>E</var>,
is evaluated as defined in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>,
with a
<a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
as described in <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>
(unless otherwise specified
elsewhere)
and with the following
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>
(again, unless otherwise specified
elsewhere):
<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-item" shape="rect">context item</a> is
<var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-position" shape="rect">context position</a>
is 1.</span></div>
<div class="clnumber">3 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-size" shape="rect">context size</a> is
1.</span></div>
<div class="clnumber">4 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-variable-values" shape="rect">variable values</a> is
the empty set.</span></div>
<div class="clnumber">5 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-function-implementation" shape="rect">function
implementations</a> include an implementation of every function
in the
<a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
signatures</a> of the
<a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>.
See <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.</span></div>
<div class="clnumber">6 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-date-time" shape="rect">current dateTime</a> is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but is constant during an
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</span></div>
<div class="clnumber">7 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-timezone" shape="rect">implicit timezone</a> is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but is constant during an
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</span></div>
<div class="clnumber">8 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-available-docs" shape="rect">available documents</a> is
the empty set.</span></div>
<div class="clnumber">9 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-available-collections" shape="rect">available collections</a> is
<a name="anchor6540" id="anchor6540" shape="rect"></a>
the empty set.</span></div>
<div class="clnumber">10 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-default-collection" shape="rect">default collection</a> is
the empty sequence.</span></div>
</div>
</div></div></div><p id="anchor11073d">
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> (both in this specification and in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) when type errors are detected and whether,
when detected, they are treated as static or dynamic errors.
</p><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that a conforming processor which
treats a type error in an XPath expression as a dynamic error will
treat the expression as having evaluated to false, while a conforming
processor which treats type errors as static errors will report an
error in the schema.
</div></div><div class="note"><div class="p"><b>Note:</b> <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> does not currently require support
for the
precisionDecimal datatype,
but conforming XPath processors are allowed to support additional primitive
data types, including precisionDecimal.
</div><div class="p">
For interoperability, it is recommended that XPath processors
intending to support precisionDecimal as an additional
primitive data type follow the recommendations in <a href="#bib-chamberlin-2006" shape="rect">[Chamberlin 2006]</a>. If the XPath processor used to
evaluate XPath expressions supports precisionDecimal, then any
precisionDecimal values in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be labeled as
<code>xs:precisionDecimal</code> in the data model instance
and handled accordingly in XPath.
</div><div class="p">
If the XPath processor does not support precisionDecimal,
then any precisionDecimal
values in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be mapped into
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#decimal" shape="rect">decimal</a>, unless the
numericalValue
is not a decimal number (for example, it is
<b>positiveInfinity</b>,
<b>negativeInfinity</b>, or <b>notANumber</b>),
in which case
they <span class="rfc2119">should</span> be mapped to
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#float" shape="rect">float</a>.
Whether this is done by altering the type information in the
partial <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, or by altering the usual rules for mapping
from a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> to an <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance,
or by treating precisionDecimal as an unknown type which is
coerced as appropriate into decimal or float by the XPath
processor, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> and out of scope for this
specification.
</div><div class="p">As a consequence of the above variability, it is possible
that XPath expressions that perform various kinds of type
introspections will produce different results when different
XPath processors are used. If the schema author wishes to
ensure interoperable results, such introspections will need to
be avoided.</div></div></div></div><div class="div3">
<h4><a name="sec-sic-assertion" id="sec-sic-assertion" shape="rect"></a>3.13.5 Assertion Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-assertion" id="coss-assertion" shape="rect"></a>3.13.6 Constraints on Assertion Schema Components</h4><p>All assertions (see <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>) <span class="rfc2119">must</span>
satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-as-props-correct" id="sec-as-props-correct" shape="rect"></a>3.13.6.1 Assertion Properties Correct</h5><div class="constraintnote"><a id="as-props-correct" name="as-props-correct" shape="rect"></a><b>Schema Component Constraint: Assertion Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
The values of the properties of an assertion are as
described in the property tableau in <a href="#Assertion_details" shape="rect">The Assertion Schema Component (&#167;3.13.1)</a>,
modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *--><a name="anchor6541" id="anchor6541" shape="rect"></a>
The <a href="#as-test" class="propref" shape="rect">{test}</a> satisfies the constraint
<a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>,
with the following modifications to the
<a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>:
<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
The <a href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables" shape="rect">in-scope variables</a>
is a set with a single member. The <code>expanded QName</code> of that
member has no namespace URI and has <code>value</code> as the local
name. The (static) <code>type</code> of the member is
<code>anyAtomicType*</code>.
</span></div>
<div class="clnumber">2.2 <!--* no span class='p' possible here *-->
The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function signatures</a>
includes signatures for <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p">
Functions in the <code>http://www.w3.org/2005/xpath-functions</code>
namespace as defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
</span></div>
<div class="clnumber">2.2.2 <span class="p">
Constructor functions for the built-in datatypes.
</span></div>
</div>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The XDM type label <code>anyAtomicType*</code> simply says
that for static typing purposes the variable <code>$value</code>
will have a value consisting of a sequence of zero or more
atomic values.</div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-xpath-valid" id="sec-xpath-valid" shape="rect"></a>3.13.6.2 XPath Valid</h5><div class="constraintnote"><a id="xpath-valid" name="xpath-valid" shape="rect"></a><b>Schema Component Constraint: XPath Valid</b><br clear="none" /><div class="constraint"><div class="p">For an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record <var>X</var>
to be valid,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
The <a href="#x-expression" class="propref" shape="rect">{expression}</a> of <var>X</var> is a valid XPath
expression, as defined in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
<var>X</var> does not produce any <a href="http://www.w3.org/TR/xpath20/#dt-static-error" shape="rect">static
error</a>, under the following conditions
(except as specified elsewhere):<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
The <a href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature" shape="rect">Static Typing
Feature</a> is disabled.
</span></div>
<div class="clnumber">2.2 <!--* no span class='p' possible here *-->
The <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a> is
given as follows:
<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><a href="http://www.w3.org/TR/xpath20/#dt-xpath-compat-mode" shape="rect">XPath 1.0
compatibility mode</a> is <b><i>false</i></b>.</span></div>
<div class="clnumber">2.2.2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-namespaces" shape="rect">statically
known namespaces</a> is the
<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a> of <var>X</var>.</span></div>
<div class="clnumber">2.2.3 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-def-elemtype-ns" shape="rect">default element/type
namespace</a> is the <a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
of <var>X</var>.</span></div>
<div class="clnumber">2.2.4 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-def-fn-ns" shape="rect">default function
namespace</a> is <code>http://www.w3.org/2005/xpath-functions</code>.</span></div>
<div class="clnumber">2.2.5 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-issd" shape="rect">in-scope schema definitions</a>
are those components that are present in every schema by definition,
as defined in <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>,
<a href="#builtin-ctd" shape="rect">Built-in Complex Type Definition (&#167;3.4.7)</a> and <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;3.16.7)</a>.</span></div>
<div class="clnumber">2.2.6 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables" shape="rect">in-scope variables</a>
is the empty set.</span></div>
<div class="clnumber">2.2.7 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-item-static-type" shape="rect">context item
static type</a> is not applicable, because the
<a href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature" shape="rect">Static Typing
Feature</a> is disabled.</span></div>
<div class="clnumber">2.2.8 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
signatures</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
</span><div class="note"><div class="p"><b>Note:</b>
If <var>X</var> belongs to an <a href="#as" class="compref" shape="rect">Assertion</a> or a <a href="#tac" class="compref" shape="rect">Type Alternative</a>,
<a href="#as-props-correct" shape="rect">Assertion Properties Correct (&#167;3.13.6.1)</a> and <a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct (&#167;3.12.6)</a>
impose additional constraints on the set of required functions.
</div></div></div>
<div class="clnumber">2.2.9 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-collations" shape="rect">statically known
collations</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but always include the
<a href="http://www.w3.org/TR/xquery-operators/#collations" shape="rect">Unicode
codepoint collation</a>
(<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>)
defined by <a href="#bib-fno" shape="rect">[Functions and Operators]</a>.</span></div>
<div class="clnumber">2.2.10 <span class="p">
The <a href="http://www.w3.org/TR/xpath20/#dt-def-collation" shape="rect">default collation</a>
is the Unicode codepoint collation.
</span></div>
<div class="clnumber">2.2.11 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-base-uri" shape="rect">base URI</a> is the
<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a> of <var>X</var>.</span></div>
<div class="clnumber">2.2.12 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-docs" shape="rect">statically known
documents</a> is
the empty set.</span></div>
<div class="clnumber">2.2.13 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-collections" shape="rect">statically known
collections</a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2.14 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-default-collection" shape="rect">statically
known default collection type</a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
</div>
</div>
</div>
</div>
</div></div></div></div><p>
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> (both in this specification and in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) when type errors are detected and whether,
when detected, they are treated as static or dynamic errors.
</p><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that a conforming processor which
treats a type error in an XPath expression as a dynamic error will
treat the expression as having evaluated to false, while a conforming
processor which treats type errors as static errors will report an
error in the schema.
</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAssertions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAnnotations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cNotation_Declarations" id="cNotation_Declarations" shape="rect"></a>3.14 Notation Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.1 <a href="#Notation_Declaration_details" shape="rect">The Notation Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.2 <a href="#declare-notation" shape="rect">XML Representation of Notation Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.3 <a href="#sec-src-notation" shape="rect">Constraints on XML Representations of Notation Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.4 <a href="#sec-cvc-notation" shape="rect">Notation Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.5 <a href="#sec-sic-notation" shape="rect">Notation Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.6 <a href="#coss-notation" shape="rect">Constraints on Notation Declaration Schema Components</a><br clear="none" />
</div><p>Notation declarations reconstruct XML NOTATION declarations.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:notation name="jpeg" public="image/jpeg" system="viewer.exe"&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a notation declaration.</div></div></div><div class="div3">
<h4><a name="Notation_Declaration_details" id="Notation_Declaration_details" shape="rect"></a>3.14.1 The Notation Declaration Schema Component</h4><p>The notation declaration schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="nd" id="nd" shape="rect">Notation Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nd-annotations" shape="rect" id="nd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="nd-name" shape="rect" id="nd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Required.</div>
</div>
<div class="propDefn"><a name="nd-target_namespace" shape="rect" id="nd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a name="nd-system_identifier" shape="rect" id="nd-system_identifier"></a><div class="pdName"><span class="propdef">{system identifier}</span></div>
<div class="pdDef">
An xs:anyURI value. Required if <a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (<a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> is present) optional.</div>
</div>
<div class="propDefn"><a name="nd-public_identifier" shape="rect" id="nd-public_identifier"></a><div class="pdName"><span class="propdef">{public identifier}</span></div>
<div class="pdDef">
A publicID value. Required if <a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (<a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> is present) optional.<div class="ownDesc">
<p>As defined in
<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> or <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
</p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Notation declarations do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such. They are referenced in the
course of <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a> strings as
members of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> simple type. An element or attribute information item with
its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition or its
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>
derived from the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>
simple type is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> only if its
value was among the enumerations of such simple type.
As a consequence such a value is required to be the
<a href="#nd-name" class="propref" shape="rect">{name}</a>
of a notation declaration.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#nd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-notation" id="declare-notation" shape="rect"></a>3.14.2 XML Representation of Notation Declaration Schema Components</h4><p>The XML representation for a notation declaration schema component is
a
<a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a>
element information item. The correspondences between the
properties of that information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>notation</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-notation" name="element-notation" shape="rect">&lt;notation</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>name</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;public = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#token" shape="rect">token</a><br clear="none" />&#160;&#160;system = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/notation&gt;</p></div></div><p>The <a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element
maps to a <a href="#nd" class="compref" shape="rect">Notation Declaration</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Notation_Declaration_details" shape="rect">Notation Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>system</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>public</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
<a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:notation name="jpeg"
public="image/jpeg" system="viewer.exe" /&gt;
&lt;xs:element name="picture"&gt;
&lt;xs:complexType&gt;
&lt;xs:simpleContent&gt;
&lt;xs:extension base="xs:hexBinary"&gt;
&lt;xs:attribute name="pictype"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NOTATION"&gt;
&lt;xs:enumeration value="jpeg"/&gt;
&lt;xs:enumeration value="png"/&gt;
. . .
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;/xs:extension&gt;
&lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;picture pictype="jpeg"&gt;...&lt;/picture&gt;</pre></div></div></div><div class="div3">
<h4><a name="sec-src-notation" id="sec-src-notation" shape="rect"></a>3.14.3 Constraints on XML Representations of Notation Declarations</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-notation" id="sec-cvc-notation" shape="rect"></a>3.14.4 Notation Declaration Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-notation" id="sec-sic-notation" shape="rect"></a>3.14.5 Notation Declaration Information Set Contributions</h4><div class="constraintnote"><a id="sic-notation-used" name="sic-notation-used" shape="rect"></a><b>Schema Information Set Contribution: Validated with Notation</b><br clear="none" /><div class="constraint"><div class="p">Whenever an attribute information item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> its
parent element information item has the following
properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-notation" name="e-notation" shape="rect"><span class="propdef">[notation]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the notation declaration
<a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
attribute item's <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a></dd><dt><a id="e-notation_system" name="e-notation_system" shape="rect"><span class="propdef">[notation system]</span></a></dt><dd>The value of the <a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> of that notation
declaration.</dd><dt><a id="e-notation_public" name="e-notation_public" shape="rect"><span class="propdef">[notation public]</span></a></dt><dd>The value of the <a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> of that notation
declaration.</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> For compatibility, only one such attribute <span class="rfc2119">should</span> appear
on any given element. If more than one such attribute
<em>does</em> appear, which one supplies the infoset property or
properties above is not defined.</div></div></div></div><div class="note"><div class="p"><b>Note:</b> Element as well as attribute information items may be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>, but only attribute
information items cause a notation declaration to appear in the
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> as a property of their parent.</div></div></div><div class="div3">
<h4><a name="coss-notation" id="coss-notation" shape="rect"></a>3.14.6 Constraints on Notation Declaration Schema Components</h4><p>All notation declarations (see <a href="#cNotation_Declarations" shape="rect">Notation Declarations (&#167;3.14)</a>) <span class="rfc2119">must</span> satisfy the following
constraint.</p><div class="constraintnote"><a id="n-props-correct" name="n-props-correct" shape="rect"></a><b>Schema Component Constraint: Notation Declaration Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of a notation declaration <span class="rfc2119">must</span>
be as described in the property tableau in
<a href="#Notation_Declaration_details" shape="rect">The Notation Declaration Schema Component (&#167;3.14.1)</a>, modulo the impact of
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cNotation_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Simple_Type_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAnnotations" id="cAnnotations" shape="rect"></a>3.15 Annotations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.1 <a href="#Annotation_details" shape="rect">The Annotation Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.2 <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.3 <a href="#sec-src-annotation" shape="rect">Constraints on XML Representations of Annotations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.4 <a href="#sec-cvc-annotation" shape="rect">Annotation Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.5 <a href="#sec-sic-annotation" shape="rect">Annotation Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.6 <a href="#coss-annotation" shape="rect">Constraints on Annotation Schema Components</a><br clear="none" />
</div><p>Annotations provide for human- and machine-targeted annotations
of schema components.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:simpleType
fn:note="special"&gt; &lt;xs:annotation&gt; &lt;xs:documentation&gt;A type for
experts only&lt;/xs:documentation&gt; &lt;xs:appinfo&gt;
&lt;fn:specialHandling&gt;checkForPrimes&lt;/fn:specialHandling&gt;
&lt;/xs:appinfo&gt; &lt;/xs:annotation&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations of three kinds of annotation.</div></div></div><div class="div3">
<h4><a name="Annotation_details" id="Annotation_details" shape="rect"></a>3.15.1 The Annotation Schema Component</h4><p>The annotation schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="a" id="a" shape="rect">Annotation</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="a-application_information" shape="rect" id="a-application_information"></a><div class="pdName"><span class="propdef">{application information}</span></div>
<div class="pdDef">
A sequence of Element information items. </div>
</div>
<div class="propDefn"><a name="a-user_information" shape="rect" id="a-user_information"></a><div class="pdName"><span class="propdef">{user information}</span></div>
<div class="pdDef">
A sequence of Element information items. </div>
</div>
<div class="propDefn"><a name="a-attributes" shape="rect" id="a-attributes"></a><div class="pdName"><span class="propdef">{attributes}</span></div>
<div class="pdDef">
A set of Attribute information items. </div>
</div>
</div></div>
</div>
</div>
<p><a href="#a-user_information" class="propref" shape="rect">{user information}</a> is intended for
human consumption, <a href="#a-application_information" class="propref" shape="rect">{application information}</a> for automatic processing. In both cases,
provision is made for an optional URI reference to supplement the
local information, as the value of the <code>source</code>
attribute of the respective element information items.
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> does <em>not</em> involve dereferencing these
URIs, when present. In the case of <a href="#a-user_information" class="propref" shape="rect">{user information}</a>, indication <span class="rfc2119">should</span> be given as
to the identity of the (human) language used in the contents,
using the <code>xml:lang</code> attribute.</p><p><a href="#a-attributes" class="propref" shape="rect">{attributes}</a> ensures that when
schema authors take advantage of the provision for adding
attributes from namespaces other than the XSD
namespace to schema documents, they are available within the
components corresponding to the element items where such
attributes appear.</p><p>Annotations do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such. Provided
an annotation itself satisfies all relevant <a href="#gloss-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Component Constraints<span class="arrow">&#183;</span></a> it
<em>cannot</em> affect the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of element information
items.</p><p>
The mapping defined in this specification from XML representations to
components does not apply to XML elements contained within an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element; such elements do not correspond to
components, when the mapping defined here is used.
</p><p>
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect, if any, the invalidity of
a descendant of <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> has on the
construction of schema components from the enclosing
schema document.
</p><p>The name <span class="termdef"><a name="ac" id="ac" title="Annotated Component" shape="rect">[Definition:]&#160;&#160;</a><b>Annotated Component</b> covers all the different kinds of component which may
have annotations.</span></p></div><div class="div3">
<h4><a name="declare-annotation" id="declare-annotation" shape="rect"></a>3.15.2 XML Representation of Annotation Schema Components</h4><p>Annotation of schemas and schema components, with material for human or
computer consumption, is provided for by allowing application information and
human information at the beginning of most major schema elements, and anywhere
at the top level of schemas. The XML representation for an annotation schema component is
an
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>
element information item. The correspondences between the
properties of that information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>annotation</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-annotation" name="element-annotation" shape="rect">&lt;annotation</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-appinfo" class="eltref" shape="rect">appinfo</a> | <a href="#element-documentation" class="eltref" shape="rect">documentation</a>)*<br clear="none" />&lt;/annotation&gt;</p><p class="element-syntax"><a id="element-appinfo" name="element-appinfo" shape="rect">&lt;appinfo</a><br clear="none" />&#160;&#160;source = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<em>{any}</em>)*<br clear="none" />&lt;/appinfo&gt;</p><p class="element-syntax"><a id="element-documentation" name="element-documentation" shape="rect">&lt;documentation</a><br clear="none" />&#160;&#160;source = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;xml:lang = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#language" shape="rect">language</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<em>{any}</em>)*<br clear="none" />&lt;/documentation&gt;</p></div></div><p>The <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element and its
descendants map to an <a href="#a" class="compref" shape="rect">Annotation</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Annotation_details" shape="rect">Annotation</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-application_information" class="propref" shape="rect">{application information}</a></div><div class="mapRepr">A sequence of
the <a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> element information items from
among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order, if any, otherwise the empty
sequence.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-user_information" class="propref" shape="rect">{user information}</a></div><div class="mapRepr">A sequence of the
<a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> element information items from
among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order, if any, otherwise the empty
sequence.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-attributes" class="propref" shape="rect">{attributes}</a></div><div class="mapRepr">A set of attribute information items,
namely those allowed by the attribute wildcard in the type
definition for the <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> item itself or
for the
enclosing items which correspond to the component within which
the annotation component is located.</div></div></div><p>The annotation component corresponding to the <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element in the example above will have one
element item in each of its <a href="#a-user_information" class="propref" shape="rect">{user information}</a> and <a href="#a-application_information" class="propref" shape="rect">{application information}</a> and one attribute
item in its <a href="#a-attributes" class="propref" shape="rect">{attributes}</a>.</p><p>
Virtually every kind of schema component defined in this specification
has an <span class="anonRef">{annotations}</span> property. When
the component is described in a schema document, the mapping from
the XML representation of the component to the <a href="#a" class="compref" shape="rect">Annotation</a>
components in the appropriate <span class="anonRef">{annotations}</span>
property follows the rules described in the next paragraph.</p><div class="p">
<div class="termdef"><a name="key-am-set" id="key-am-set" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>annotation
mapping</b> of a set of element information items <var>ES</var>
is a sequence of annotations <var>AS</var>, with the following properties:
<div class="constraintlist"><div class="clnumber">1<a id="am-set-exp.ann" name="am-set-exp.ann" shape="rect"> </a><span class="p">
For every <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element information item among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of any element information item in <var>ES</var>, there
is a corresponding <a href="#a" class="compref" shape="rect">Annotation</a> component in <var>AS</var>.
</span><div class="note"><div class="p"><b>Note:</b> As noted above,
the <a href="#a-attributes" class="propref" shape="rect">{attributes}</a> property of
each <a href="#a" class="compref" shape="rect">Annotation</a> component includes
all
the attribute information items on the
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element itself, on the
XML element which represents (and maps to) the
component being annotated, and on any intervening
XML elements, if those attribute information items
have <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>s
different from the XSD namespace.</div></div></div>
<div class="clnumber">2<a id="am-set-imp.ann" name="am-set-imp.ann" shape="rect"> </a><!--* no span class='p' possible here *-->
If any element information item <var>E</var> in <var>ES</var> has any attribute information items
<var>A</var> such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>A</var> is in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>A</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>
is present and not the XSD namespace.</span></div>
<div class="clnumber">2.3 <span class="p"><var>A</var> is not included in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> property
of any annotation component described in
clause <a href="#am-set-exp.ann" shape="rect">1</a>.
</span></div>
</div>
then for each such <var>E</var>, an <a href="#a" class="compref" shape="rect">Annotation</a> component
<var>C</var> will appear in <var>AS</var>, with
<var>C</var>.<a href="#a-application_information" class="propref" shape="rect">{application information}</a>
and
<var>C</var>.<a href="#a-user_information" class="propref" shape="rect">{user information}</a>
each being the empty sequence and
<var>C</var>.<a href="#a-attributes" class="propref" shape="rect">{attributes}</a>
containing all and only those attribute information
items <var>A</var> among <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div>
<div class="clnumber">3 <span class="p">
<var>AS</var> contains no other <a href="#a" class="compref" shape="rect">Annotation</a> components.</span></div>
</div>
</div>
<span class="termdef"><a name="key-am-one" id="key-am-one" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>annotation
mapping</b> of a single element information item is the
<a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the singleton set containing that
element.</span>
</div><div class="note"><div class="p"><b>Note:</b>
The order of <a href="#a" class="compref" shape="rect">Annotation</a> components within the sequence
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b>
When the input set has more than one
member, the <a href="#a" class="compref" shape="rect">Annotation</a> components in the resulting sequence
do not record which element in the set they
correspond to. The attribute information items in the
<a href="#a-attributes" class="propref" shape="rect">{attributes}</a> of any <a href="#a" class="compref" shape="rect">Annotation</a>
similarly do not indicate which element information item in the
schema document was their parent.
</div></div></div><div class="div3">
<h4><a name="sec-src-annotation" id="sec-src-annotation" shape="rect"></a>3.15.3 Constraints on XML Representations of Annotations</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-annotation" id="sec-cvc-annotation" shape="rect"></a>3.15.4 Annotation Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-annotation" id="sec-sic-annotation" shape="rect"></a>3.15.5 Annotation Information Set Contributions</h4><p>None as such:
the addition of annotations to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is
covered by the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contributions of the enclosing components.</p></div><div class="div3">
<h4><a name="coss-annotation" id="coss-annotation" shape="rect"></a>3.15.6 Constraints on Annotation Schema Components</h4><p>All annotations (see <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="an-props-correct" name="an-props-correct" shape="rect"></a><b>Schema Component Constraint: Annotation Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of an annotation <span class="rfc2119">must</span> be as described in
the property tableau in
<a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAnnotations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Schemas" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Simple_Type_Definitions" id="Simple_Type_Definitions" shape="rect"></a>3.16 Simple Type Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.1 <a href="#Simple_Type_Definition_details" shape="rect">The Simple Type Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2 <a href="#declare-datatype" shape="rect">XML Representation of Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.1 <a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.2 <a href="#map.std.atomic" shape="rect">Mapping Rules for Atomic Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.3 <a href="#map.std.list" shape="rect">Mapping Rules for Lists</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.4 <a href="#map.std.union" shape="rect">Mapping Rules for Unions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.3 <a href="#sec-src-simple-type" shape="rect">Constraints on XML Representations of Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.4 <a href="#sec-cvc-simple-type" shape="rect">Simple Type Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.5 <a href="#sec-sic-simple-type" shape="rect">Simple Type Definition Information Set
Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6 <a href="#coss-st" shape="rect">Constraints on Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.1 <a href="#sec-st-props-correct" shape="rect">Simple Type Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.2 <a href="#sec-cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.3 <a href="#sec-cos-st-derived-ok" shape="rect">Type Derivation OK (Simple)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.4 <a href="#sec-st-restrict-facets" shape="rect">Simple Type Restriction (Facets)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7 <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.1 <a href="#sec-anySimpleType" shape="rect">xs:anySimpleType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.2 <a href="#sec-anyAtomicType" shape="rect">xs:anyAtomicType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.3 <a href="#xsd-error" shape="rect">xs:error</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.4 <a href="#sec-builtin-primitives" shape="rect">Built-in primitive datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.5 <a href="#sec-other-builtins" shape="rect">Other built-in datatypes</a><br clear="none" />
</div><div class="note"><div class="p"><b>Note:</b> This section consists of a combination of copies of
normative material from <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, for local cross-reference
purposes, and material
unique to this specification, relating to the interface between schema
components defined in this specification and the simple type definition component.</div></div><p>Simple type definitions provide for constraining character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element and attribute
information items.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:simpleType name="celsiusWaterTemp"&gt;
&lt;xs:restriction base="xs:decimal"&gt;
&lt;xs:fractionDigits value="2"/&gt;
&lt;xs:minExclusive value="0.00"/&gt;
&lt;xs:maxExclusive value="100.00"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a simple type definition.</div></div></div><div class="div3">
<h4><a name="Simple_Type_Definition_details" id="Simple_Type_Definition_details" shape="rect"></a>3.16.1 The Simple Type Definition Schema Component</h4><p><a name="anchor11103" id="anchor11103" shape="rect"></a>The simple type definition schema component has the following properties:
</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="std" id="std" shape="rect">Simple Type Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="std-annotations" shape="rect" id="std-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="std-name" shape="rect" id="std-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value. Optional.</div>
</div>
<div class="propDefn"><a name="std-target_namespace" shape="rect" id="std-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value. Optional.</div>
</div>
<div class="propDefn"><a id="std-final" name="std-final" shape="rect"></a><div class="pdName"><span class="propdef">{final}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
A subset of {<em>extension</em>, <em>restriction</em>, <em>list</em>, <em>union</em>}.
</p></div>
</div>
</div>
<div class="propDefn"><a name="std-context" shape="rect" id="std-context"></a><div class="pdName"><span class="propdef">{context}</span></div>
<div class="pdDef">
Required if <a href="#std-name" class="propref" shape="rect">{name}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>Either an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>,
an <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
or a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="std-base_type_definition" shape="rect" id="std-base_type_definition"></a><div class="pdName"><span class="propdef">{base type definition}</span></div>
<div class="pdDef">
A <a href="#td" class="compref" shape="rect">Type Definition</a> component. Required.<div class="ownDesc">
<p>With one exception, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of any <a href="#std" class="compref" shape="rect">Simple Type Definition</a> is a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>. The exception is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which has
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, a
<a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>, as its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</p></div>
</div>
</div>
<div class="propDefn"><a name="std-facets" shape="rect" id="std-facets"></a><div class="pdName"><span class="propdef">{facets}</span></div>
<div class="pdDef">
A set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Constraining Facet</a> components. </div>
</div>
<div class="propDefn"><a name="std-fundamental_facets" shape="rect" id="std-fundamental_facets"></a><div class="pdName"><span class="propdef">{fundamental facets}</span></div>
<div class="pdDef">
A set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Fundamental Facet</a> components. </div>
</div>
<div class="propDefn"><a name="std-variety" shape="rect" id="std-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">atomic</span>, <span class="enumval">list</span>, <span class="enumval">union</span>}. Required for all <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s
except <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>,
in which it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="std-primitive_type_definition" shape="rect" id="std-primitive_type_definition"></a><div class="pdName"><span class="propdef">{primitive type definition}</span></div>
<div class="pdDef">
A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component. With one exception, required if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. The exception
is
<a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>, whose
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>If
non-<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <span class="rfc2119">must</span> be a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-primitive" shape="rect">primitive</a> definition.</p></div>
</div>
</div>
<div class="propDefn"><a name="std-item_type_definition" shape="rect" id="std-item_type_definition"></a><div class="pdName"><span class="propdef">{item type definition}</span></div>
<div class="pdDef">
A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component. Required if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>
The value of this property
<span class="rfc2119">must</span> be
a primitive or ordinary simple type definition
with <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>,
or
an ordinary simple type definition
with <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>
whose basic members are all atomic;
the value <span class="rfc2119">must not</span> itself be
a list type
(have <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>)
or have any basic members which are list types.
</p></div>
</div>
</div>
<div class="propDefn"><a name="std-member_type_definitions" shape="rect" id="std-member_type_definitions"></a><div class="pdName"><span class="propdef">{member type definitions}</span></div>
<div class="pdDef">
A sequence of primitive or ordinary <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components. <div class="ownDesc">
<p>
<span class="rfc2119">Must</span> be present
(but <span class="rfc2119">may</span> be empty)
if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>,
otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</p><p>The sequence may contain any primitive or ordinary simple type definition, but
<span class="rfc2119">must not</span> contain any special type definitions.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Simple types are identified by their <a href="#std-name" class="propref" shape="rect">{name}</a> and <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a>. Except
for anonymous simple types (those with no <a href="#std-name" class="propref" shape="rect">{name}</a>), since
type definitions (i.e. both simple and complex type definitions taken together) <span class="rfc2119">must</span> be uniquely identified within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>, no simple type definition can have the same name as another
simple or complex type definition. Simple type <a href="#std-name" class="propref" shape="rect">{name}</a>s and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>s
are provided for reference from
instances (see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>), and for use in the XML
representation of schema components
(specifically in <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> and <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>). See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="note"><div class="p"><b>Note:</b> The <a href="#std-name" class="propref" shape="rect">{name}</a> of a simple type is not <em>ipso
facto</em> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[(local) name]</a> of the
element or attribute information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by that definition. The connection between a
name and a type definition is described in <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a> and <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>. </div></div><p>A simple type definition with an empty specification for <a href="#std-final" class="propref" shape="rect">{final}</a> can be used as the
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> for other types <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by either of
extension or restriction, or as the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> in
the definition of a list, or in the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> of
a union; the explicit values <b><i>extension</i></b>, <b><i>restriction</i></b>,
<b><i>list</i></b> and <b><i>union</i></b> prevent further
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> by extension (to yield a complex type) and restriction (to yield a
simple type) and use in <a href="#key-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructing<span class="arrow">&#183;</span></a> lists and unions respectively.</p><p><a href="#std-variety" class="propref" shape="rect">{variety}</a> determines whether the simple type corresponds to
an <b><i>atomic</i></b>, <b><i>list</i></b> or <b><i>union</i></b> type as defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</p><p>As described in <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>, every simple type definition is
a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of some other simple
type (the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>), which is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> if and only if the type
definition in question is <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> or a list or
union type definition which is not itself <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from a
list or union respectively.
A type definition
has <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> as its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if it is one of the primitive datatypes. Each
<em>atomic</em> type is ultimately a restriction of exactly one such
primitive datatype, which is its <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>.</p><p>The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property
contains a set of constraining facets which are used to specify
constraints on the datatype described by the simple type definition.
For <b><i>atomic</i></b> definitions, these are restricted
to those appropriate for the corresponding <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>. Therefore, the value space
and lexical space (i.e. what is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by any atomic simple
type) is determined by the pair (<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>).
</p><p>
Constraining facets are defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>. All conforming
implementations of this specification <span class="rfc2119">must</span> support all of the
facets defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>. It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional
facets are supported; if they are, the implementation <span class="rfc2119">must</span>
satisfy the rules for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets
described in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
</p><p>As specified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, <b><i>list</i></b> simple type definitions <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> space separated tokens, each of
which conforms to a specified simple type definition, the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>. The item type specified
<span class="rfc2119">must not</span> itself be a <b><i>list</i></b> type, and <span class="rfc2119">must</span> be one of the types identified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> as a
suitable item type for a list simple type. In this case the <a href="#std-facets" class="propref" shape="rect">{facets}</a>
apply to the list itself, and are restricted to those appropriate for lists.</p><p>A <b><i>union</i></b> simple type definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> strings which satisfy at
least one of its <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>. As in the case of
<b><i>list</i></b>, the <a href="#std-facets" class="propref" shape="rect">{facets}</a>
apply to the union itself, and are restricted to those appropriate for unions.</p><p><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span> <em>not</em> be named as the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of any user-defined
atomic simple type definitions:
as they allow no constraining facets, this
would be incoherent.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#std-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-datatype" id="declare-datatype" shape="rect"></a>3.16.2 XML Representation of Simple Type Definition Schema Components</h4><p>As always, the mapping rules
given in this section apply after, not before, the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> This section reproduces a version of material from <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, for
local cross-reference purposes.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>simpleType</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-simpleType" name="element-simpleType" shape="rect">&lt;simpleType</a><br clear="none" />&#160;&#160;final =
(<var>#all</var> | List of (<var>list</var> | <var>union</var> | <var>restriction</var> | <var>extension</var>))
<br clear="none" />&#160;&#160;id =
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-restriction" class="eltref" shape="rect">restriction</a> | <a href="#element-list" class="eltref" shape="rect">list</a> | <a href="#element-union" class="eltref" shape="rect">union</a>))
<br clear="none" />&lt;/simpleType&gt;</p><p class="element-syntax"><a id="element-restriction" name="element-restriction" shape="rect">&lt;restriction</a>
<br clear="none" />&#160;&#160;base = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?,
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minExclusive" class="eltref" shape="rect">minExclusive</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minInclusive" class="eltref" shape="rect">minInclusive</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxExclusive" class="eltref" shape="rect">maxExclusive</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxInclusive" class="eltref" shape="rect">maxInclusive</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-totalDigits" class="eltref" shape="rect">totalDigits</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-fractionDigits" class="eltref" shape="rect">fractionDigits</a> | <!--*
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxScale" class="eltref" shape="rect">maxScale</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minScale" class="eltref" shape="rect">minScale</a> | *-->
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-length" class="eltref" shape="rect">length</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minLength" class="eltref" shape="rect">minLength</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxLength" class="eltref" shape="rect">maxLength</a> |
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration" class="eltref" shape="rect">enumeration</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-whiteSpace" class="eltref" shape="rect">whiteSpace</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern" class="eltref" shape="rect">pattern</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-assertion" class="eltref" shape="rect">assertion</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-explicitTimezone" class="eltref" shape="rect">explicitTimezone</a> | <em>{any with namespace: ##other}</em>)*))
<br clear="none" />&lt;/restriction&gt;</p><p class="element-syntax"><a id="element-list" name="element-list" shape="rect">&lt;list</a>
<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;itemType = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?)<br clear="none" />&lt;/list&gt;</p><p class="element-syntax"><a id="element-union" name="element-union" shape="rect">&lt;union</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;memberTypes = List of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>*)<br clear="none" />&lt;/union&gt;</p></div></div><p>
The <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element and its descendants
normally, when there are no errors, map to a
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> component. The case in which
an <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facet is used in the definition of a simple type
definition is handled specially: the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
in question is not in error, but it does not map to any component at all.
</p><div class="note"><div class="p"><b>Note:</b> The effect of the special handling of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facets is to
ensure (1) that <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets which are not supported by
a particular implementation result in the types which depend upon them
not being present in the schema, and (2) that the presence of
references to <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facets in a schema document does not prevent
the rest of the schema document being processed and used.</div></div><div class="block">
The following subsections define one set of common mapping
rules for simple type definitions, and three specialized
sets of mapping rules for atomic, list, and union datatypes,
respectively.
<ul><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element among its children,
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>,
then the mapping rules in
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.atomic" shape="rect">Mapping Rules for Atomic Simple Type Definitions (&#167;3.16.2.2)</a>
apply.
</div></li><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> element among its children,
or if it has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> child
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>,
then the mapping rules in
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.list" shape="rect">Mapping Rules for Lists (&#167;3.16.2.3)</a>
apply.
</div></li><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> element among its children,
or if it has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> child
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>,
then the mapping rules in
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.union" shape="rect">Mapping Rules for Unions (&#167;3.16.2.4)</a>
apply.
</div></li></ul>
</div><div class="div4">
<h5><a name="map.std.common" id="map.std.common" shape="rect"></a>3.16.2.1 Common mapping rules for Simple Type Definitions</h5><p>The following rules apply to all
simple type definitions.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
if present on the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information item if present,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen, <b>then </b>the type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, if present, otherwise the
type definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>.</div><div class="clnumber">2 <b>If </b>the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is chosen, <b>then </b><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="mapRepr">
A subset of
<code>{</code><b><i>restriction</i></b>, <b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b><code>}</code>, determined as follows.
<span class="termdef"><a name="lt-vs" id="lt-vs" title="" shape="rect">[Definition:]&#160;&#160;</a>Let
<b>FS</b> be
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>final</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
if present, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>finalDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
<code>schema</code> element,
if present, otherwise the empty string.</span> Then the property value is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b><a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b><a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> is
"<code>#all</code>", <b>then </b><code>{</code><b><i>restriction</i></b>, <b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>Consider <a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> as
a space-separated list, and include <b><i>restriction</i></b> if
"<code>restriction</code>" is in that list, and similarly for
<b><i>extension</i></b>, <b><i>list</i></b> and <b><i>union</i></b>.
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="mapRepr">
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, <b>then </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div><div class="clnumber">2 <b>otherwise </b>
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>the parent element information item is <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, <b>then </b>the corresponding <a href="#ad" class="compref" shape="rect">Attribute Declaration</a></div><div class="clnumber">2.2 <b>If </b>the parent element information item is <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, <b>then </b>the corresponding <a href="#ed" class="compref" shape="rect">Element Declaration</a></div><div class="clnumber">2.3 <b>If </b>the parent element information item is <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
corresponding to the grandparent <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element information item</div><div class="clnumber">2.4 <b>If </b><a name="anchor11290a" id="anchor11290a" shape="rect"></a>the parent element information item
is <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>, <b>then </b>
the <a href="#ed" class="compref" shape="rect">Element Declaration</a> corresponding to the
nearest enclosing <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item</div><div class="clnumber">2.5 <b>otherwise </b>(the parent element information item is <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>),
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.5.1 <b>If </b>the grandparent element information item is <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
corresponding to the grandparent</div><div class="clnumber">2.5.2 <b>otherwise </b>(the grandparent element information item
is <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>), the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> which is the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> of the
<a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
corresponding to the great-grandparent <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item.</div></div>
</div></div>
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="mapRepr">If the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen,
then <b><i>list</i></b>, otherwise if the <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is
chosen, then <b><i>union</i></b>, otherwise (the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
alternative is chosen), then the <a href="#std-variety" class="propref" shape="rect">{variety}</a>
of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="mapRepr">The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen
<b>and</b>
the children of the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element are all
either <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> elements,
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements,
or elements which specify constraining facets
supported by the processor, <b>then </b>
the set of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a> components
obtained by
<a href="#key-facets-overlay" class="termref" shape="rect"><span class="arrow">&#183;</span>overlaying<span class="arrow">&#183;</span></a>
the <a href="#std-facets" class="propref" shape="rect">{facets}</a> of the
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> with the
set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a> components
corresponding to those <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
which specify facets, as defined in <a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>.</div><div class="clnumber">2 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen
<b>and</b>
the children of the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element
include at least one element of which the processor has no
prior knowledge (i.e. not a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element,
an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element, or an element
denoting a constraining facet known to and
supported by the processor), <b>then </b>the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
maps to no component at all (but is not in error solely on account of
the presence of the unknown element).</div><div class="clnumber">3 <b>If </b>the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen, <b>then </b>a set with one member, a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w" class="compref" shape="rect">whiteSpace</a> facet with
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">{value}</a> = <b><i>collapse</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">{fixed}</a> = <b><i>true</i></b>.</div><div class="clnumber">4 <b>otherwise </b>the empty set</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="mapRepr">Based on
<a href="#std-variety" class="propref" shape="rect">{variety}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>,
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, a set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ff" class="compref" shape="rect">Fundamental Facet</a> components, one
each as specified in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-ordered" shape="rect">The ordered Schema Component </a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-bounded" shape="rect">The bounded Schema Component </a>,
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-cardinality" shape="rect">The cardinality Schema Component </a> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-numeric" shape="rect">The numeric Schema Component </a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, and one of
the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>,
<a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
whichever is present,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div></div><div class="div4">
<h5><a name="map.std.atomic" id="map.std.atomic" shape="rect"></a>3.16.2.2 Mapping Rules for Atomic Simple Type Definitions</h5><p id="std.atomic.p">
The following rule applies if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b></p><p>
<span class="termdef"><a name="std-ancestor" id="std-ancestor" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>ancestors</b> of a
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> are its
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and the
<a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of its
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span>
(The ancestors of a
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>T</var> in the type hierarchy are themselves
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definitions<span class="arrow">&#183;</span></a>; they are distinct from
the XML elements which may be ancestors, in the XML document
hierarchy, of the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element which
declares <var>T</var>.)
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Atomic Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="mapRepr">From among the <a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of this <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, that <a href="#std" class="compref" shape="rect">Simple Type Definition</a> which corresponds to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-primitive" shape="rect">primitive</a> datatype.<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="map.std.list" id="map.std.list" shape="rect"></a>3.16.2.3 Mapping Rules for Lists</h5><p id="std.list.p">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>, the following additional
property mapping
applies:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">List Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="mapRepr">
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> (a) <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>
to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a>,
or (b), corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a>, whichever is present.
<div class="note"><div class="p"><b>Note:</b> In
this case, a <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> element will invariably be present; it will
invariably have either an <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, but not both.</div></div>
</div><div class="clnumber">2 <b>otherwise </b>(that is, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
<div class="note"><div class="p"><b>Note:</b> In this case, a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element will invariably
be present.</div></div>
</div></div>
</div></div></div></div><div class="div4">
<h5><a name="map.std.union" id="map.std.union" shape="rect"></a>3.16.2.4 Mapping Rules for Unions</h5><p id="std.union.p">If the
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>, the following
additional property mapping applies:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Union Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="mapRepr">The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, <b>then </b>the sequence of
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>s (a)
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the items in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>,
if any, and (b)
corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>s among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>, if any, in order.
<div class="note"><div class="p"><b>Note:</b> In
this case, a <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> element will invariably be present; it will
invariably have either a <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or one or more <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, or both.</div></div>
</div><div class="clnumber">2 <b>otherwise </b>(that is, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
<div class="note"><div class="p"><b>Note:</b> In this case, a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element will invariably
be present.</div></div></div></div>
</div></div></div></div></div><div class="div3">
<h4><a name="sec-src-simple-type" id="sec-src-simple-type" shape="rect"></a>3.16.3 Constraints on XML Representations of Simple Type Definitions</h4><div class="constraintnote"><a id="src-simple-type" name="src-simple-type" shape="rect"></a><b>Schema Representation Constraint: Simple Type Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element information items by the schema for schema documents,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
No two elements among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> have the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> in the Schema (<code>xs</code>) namespace,
unless that
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is one of
<code>xs:enumeration</code>,
<code>xs:pattern</code>, or
<code>xs:assert</code>.
</span><div class="note"><div class="p"><b>Note:</b> That is, most of the facets for simple types defined
by this specification are forbidden to occur more than once.
But <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a>,
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a>, and
<a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> may occur multiple times,
and facets defined in other namespaces and
made available as extensions to this specification
may occur multiple times.
</div></div></div>
<div class="clnumber">2 <span class="p">If the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen,
it has
either a <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but not
both.</span></div>
<div class="clnumber">3 <span class="p">If the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen,
it has
either an <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
but not both.</span></div>
<div class="clnumber">4 <span class="p">
If the <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is chosen, either it
has a non-empty <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or it
has at least one <code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.</span></div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-simple-type" id="sec-cvc-simple-type" shape="rect"></a>3.16.4 Simple Type Definition Validation Rules</h4><div class="constraintnote"><a id="cvc-simple-type" name="cvc-simple-type" shape="rect"></a><b>Validation Rule: String Valid</b><br clear="none" /><div class="constraint"><div class="p">For a string <var>S</var>
to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a simple type definition
<var>T</var>
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of <var>S</var>, <var>N</var>, is calculated using
the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a> associated with <var>T</var>, as described in the definition
of the term "<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>".</span></div>
<div class="clnumber">2 <span class="p"><var>N</var> is schema-valid with respect to
<var>T</var> as
defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
Valid</a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">3 <span class="p">Let <var>V</var> be the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <var>N</var> with respect to <var>T</var>. Then:</span><div class="p">Every
<a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>ENTITY value<span class="arrow">&#183;</span></a>
in <var>V</var>
is a <a href="#key-vde" class="termref" shape="rect"><span class="arrow">&#183;</span>declared entity name<span class="arrow">&#183;</span></a>.</div></div>
</div>
</div><div class="p"><div class="termdef"><a name="key-vtype" id="key-vtype" title="" shape="rect">[Definition:]&#160;&#160;</a>
When a string <var>N</var> is schema-valid with respect to a simple type definition
<var>T</var> as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
Valid</a> with the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>V</var>,
<div class="constraintlist"><div class="clnumber">1 <span class="p">
The <b>validating type</b> of <var>V</var> is <var>T</var> if <var>T</var> is not a union type,
otherwise the validating type is the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic
member</a> of <var>T</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <var>N</var>.
</span></div>
<div class="clnumber">2 <span class="p">
If the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of <var>V</var> is a list type <var>L</var> and the
<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of <var>L</var> is <var>I</var>, then the
<b>validating type</b> of an (atomic) item value <var>A</var> occurring in <var>V</var> is
<var>I</var> if <var>I</var> is not a union type, otherwise the validating type is the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic member</a> of
<var>I</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> the substring in <var>N</var>
that corresponds to <var>A</var>.
</span></div>
</div></div>
<span class="termdef"><a name="key-TYPE-value" id="key-TYPE-value" title="" shape="rect">[Definition:]&#160;&#160;</a>
When the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is
or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a simple type definition <var>T</var>, the value is also
referred to as a <b><var>T</var> value</b>.
</span>
For example, an <b>ENTITY value</b>
is an
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> whose <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is or is derived from the
built-in simple type definition <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITY" shape="rect">ENTITY</a>,
and an <b>ID value</b> is one whose <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>
is or is derived from <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>.
</div><div class="p"><span class="termdef"><a name="key-vde" id="key-vde" title="" shape="rect">[Definition:]&#160;&#160;</a>A string is a
<b>declared entity name</b> if and only if it is equal to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a>
of some unparsed entity information item in the value of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsedEntities]</a>
property of the document information item at the root of the infoset
containing the element or attribute information item whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
the string is.</span></div></div></div></div><div class="div3">
<h4><a name="sec-sic-simple-type" id="sec-sic-simple-type" shape="rect"></a>3.16.5 Simple Type Definition Information Set
Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-st" id="coss-st" shape="rect"></a>3.16.6 Constraints on Simple Type Definition Schema Components</h4><div class="div4">
<h5><a name="sec-st-props-correct" id="sec-st-props-correct" shape="rect"></a>3.16.6.1 Simple Type Definition Properties Correct</h5><p>All simple type definitions <span class="rfc2119">must</span> satisfy both
the following constraints.</p><div class="constraintnote"><a id="st-props-correct" name="st-props-correct" shape="rect"></a><b>Schema Component Constraint: Simple Type Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a simple type
definition are as described in the property tableau in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-defn" shape="rect">The Simple Type Definition
Schema Component</a>, modulo the impact of
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">All simple type definitions are, or are <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
ultimately from, <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> (so circular
definitions are disallowed). That is, it is possible
to reach a primitive datatype or <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> by
following the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> zero or more
times.</span></div>
<div class="clnumber">3 <span class="p">The <a href="#std-final" class="propref" shape="rect">{final}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> does not
contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">4 <span class="p">There is not
more than one member of <a href="#std-facets" class="propref" shape="rect">{facets}</a>
of the same kind.</span></div>
<div class="clnumber">5 <span class="p">Each member of <a href="#std-facets" class="propref" shape="rect">{facets}</a> is
supported by the processor.</span><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, all conforming
processors <span class="rfc2119">must</span> support the facets defined by
<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>; support for additional facets is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
If a schema document applies an <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facet,
the immediate result will be a violation of this constraint,
so that the simple type defined by means of that facet
will be excluded from the schema, and any references to it
will be treated as undischarged references.
</div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-st-restricts" id="sec-cos-st-restricts" shape="rect"></a>3.16.6.2 Derivation Valid (Restriction, Simple)</h5><div class="constraintnote"><a id="cos-st-restricts" name="cos-st-restricts" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Restriction, Simple)</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor11103a" id="anchor11103a" shape="rect"></a>
For any <a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>D</var> whose
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is some
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>B</var>,
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>atomic</i></b>, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-base_atomic" name="c-base_atomic" shape="rect"> </a><span class="p">Either <var>D</var> is
<a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>, or else <var>B</var> is an atomic simple type
definition. </span><div class="note"><div class="p"><b>Note:</b>
The type
<a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> is an exception because its
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, whose
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div></div>
<div class="clnumber">1.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a>
does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">1.3 <!--* no span class='p' possible here *-->For each facet in <var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a>
(call this <b>DF</b>)
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.3.1 <span class="p"><b>DF</b> is applicable to
<var>D</var>, as specified in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
Facets</a> of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">1.3.2 <span class="p"><b>DF</b> satisfies the constraints
on facet components given in the appropriate subsection of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>
in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
</span></div>
</div>
</div>
</div></div><div class="clnumber">2 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
= <b><i>list</i></b>, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
is not a special type definition and either
<var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
=
<b><i>atomic</i></b> or <var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>union</i></b>
and
there
are no
types whose <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b> among
the union's <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a>.</span></div>
<div class="clnumber">2.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.2.1 <b>If </b><var>B</var>
is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1.1 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-final" class="propref" shape="rect">{final}</a>
does not contain <b><i>list</i></b>.</span></div>
<div class="clnumber">2.2.1.2 <span class="p"><a name="anchor6735" id="anchor6735" shape="rect"></a>
<var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a>
contains only the
<b><i>whiteSpace</i></b> facet component
with <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">{value}</a>
= <b><i>collapse</i></b> and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">{fixed}</a>
= <b><i>true</i></b>.</span></div>
</div>
</div><div class="clnumber">2.2.2 <b>otherwise </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.2.1 <span class="p"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
= <b><i>list</i></b>.</span></div>
<div class="clnumber">2.2.2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a>
does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">2.2.2.3 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<var>B</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>, as defined in
<a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">2.2.2.4 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
are applicable to <var>D</var>, as specified in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
Facets</a>.</span></div>
<div class="clnumber">2.2.2.5 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
satisfy the constraints on facet components given in the appropriate subsection
of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>.
</span></div>
</div>
</div></div><div class="p">The first case above will apply when a list is <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-constructed" shape="rect">constructed</a> by
specifying an item type, the second when <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from another list.</div></div>
</div></div><div class="clnumber">3 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
is <b><i>union</i></b>, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>D</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>
does not contain a special type definition.</span></div>
<div class="clnumber">3.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.2.1 <b>If </b><var>B</var> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.1.1 <span class="p">All of the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> have a
<a href="#std-final" class="propref" shape="rect">{final}</a> which does not contain <b><i>union</i></b>.</span></div>
<div class="clnumber">3.2.1.2 <span class="p"><var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a>
is empty.</span></div>
</div>
</div><div class="clnumber">3.2.2 <b>otherwise </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.2.1 <span class="p"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
= <b><i>union</i></b>.</span></div>
<div class="clnumber">3.2.2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a>
does not contain
<b><i>restriction</i></b>.</span></div>
<div class="clnumber">3.2.2.3 <span class="p">Each type definition in
<var>D</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>
is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the corresponding type definition in
<var>B</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, as
defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">3.2.2.4 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
are applicable to <var>D</var>, as specified in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
Facets</a>.</span></div>
<div class="clnumber">3.2.2.5 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
satisfy the constraints on facet components given in the appropriate subsection
of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>.
</span></div>
</div>
</div></div><div class="p">The first case above will apply when a union is
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-constructed" shape="rect">constructed</a> by specifying one or more member types, the second
when <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from another union.</div></div>
<div class="clnumber">3.3<a id="no-self-membership" name="no-self-membership" shape="rect"> </a><span class="p">
Neither
<var>D</var>
nor any type
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from it is a member of its
own <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a>.</span></div>
</div></div></div></div></div></div><p><span class="termdef"><a name="cd-st-restriction" id="cd-st-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
simple type definition <b>T</b> is a
<b>valid restriction</b> of its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
if and only if <b>T</b> satisfies constraint
<a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a></span>.</p></div><div class="div4">
<h5><a name="sec-cos-st-derived-ok" id="sec-cos-st-derived-ok" shape="rect"></a>3.16.6.3 Type Derivation OK (Simple)</h5><p>The following constraint defines relations appealed to elsewhere in
this specification.</p><div class="constraintnote"><a id="cos-st-derived-ok" name="cos-st-derived-ok" shape="rect"></a><b>Schema Component Constraint: Type Derivation OK (Simple)</b><br clear="none" /><div class="constraint"><div class="p">For a simple type definition (call it <b>D</b>, for
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>) to be validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition (call this
<b>B</b>, for base) subject to a set of blocking keywords
drawn from the set {<b><i>extension</i></b>,
<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} (of which only
<b><i>restriction</i></b> is actually relevant; call this set <var>S</var>)
<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-stid" name="c-stid" shape="rect"> </a><span class="p">They are the same type definition.</span></div>
<div class="clnumber">2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><b><i>restriction</i></b> is not in <var>S</var>, or in
<b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.<a href="#std-final" class="propref" shape="rect">{final}</a>;</span></div>
<div class="clnumber">2.2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> = <b>B</b>.</span></div>
<div class="clnumber">2.2.2 <span class="p"><b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> and is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
given <var>S</var>,
as defined by this constraint.</span></div>
<div class="clnumber">2.2.3 <span class="p"><b>D</b>.<a href="#std-variety" class="propref" shape="rect">{variety}</a>
= <b><i>list</i></b> or <b><i>union</i></b> and <b>B</b> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2.4<a id="member_as_derived" name="member_as_derived" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.4.1 <span class="p"><b>B</b>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>union</i></b>.</span></div>
<div class="clnumber">2.2.4.2 <span class="p"><b>D</b> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition <b>M</b> in <b>B</b>'s
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> given <var>S</var>, as defined by this
constraint.</span></div>
<div class="clnumber">2.2.4.3 <span class="p">The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property of <b>B</b>
and of any <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-interveningunion" shape="rect">intervening
union</a> datatypes is empty.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this requirement that the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-value-space" shape="rect">value space</a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-space" shape="rect">lexical space</a>, and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical
mapping</a> of <b>D</b> will be subsets of those of
<b>B</b>.
</div></div></div>
</div></div>
</div></div>
</div></div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> With respect to clause <a href="#c-stid" shape="rect">1</a>, see the Note on identity at
the end of <a href="#no-identity" shape="rect"> (&#167;3.4.6.5)</a> above.</div></div><div class="note"><div class="p"><b>Note:</b> When a simple type definition <var>S</var> is said to be
"validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>" from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of clause <a href="#member_as_derived" shape="rect">2.2.4</a> that
the constraint <a href="#cd-st-restriction" shape="rect"> (&#167;3.16.6.2)</a> can hold between
a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> in the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive membership</a> of a union type, and the union type,
even though neither is actually <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the other. The
slightly misleading terminology is retained for historical reasons
and for compatibility with version 1.0 of this specification.
</div></div></div><div class="div4">
<h5><a name="sec-st-restrict-facets" id="sec-st-restrict-facets" shape="rect"></a>3.16.6.4 Simple Type Restriction (Facets)</h5><div class="constraintnote"><a id="st-restrict-facets" name="st-restrict-facets" shape="rect"></a><b>Schema Component Constraint: Simple Type Restriction (Facets)</b><br clear="none" /><div class="constraint"><div class="p">For a simple type definition (call it <b>R</b>) to restrict another simple type
definition (call it <b>B</b>) with a
set of facets (call this <b>S</b>)
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <b>R</b> is the same as that of <b>B</b>.</span></div>
<div class="clnumber">2 <span class="p">If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>, the
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of <b>R</b> is the same as that of <b>B</b>.</span></div>
<div class="clnumber">3<a id="c-fr" name="c-fr" shape="rect"> </a><span class="p">The <a href="#std-facets" class="propref" shape="rect">{facets}</a> of <b>R</b>
are the <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<var>B</var> <a href="#key-facets-overlay" class="termref" shape="rect"><span class="arrow">&#183;</span>overlaid<span class="arrow">&#183;</span></a>
with <var>S</var>.</span><div class="p">Additional constraint(s) sometimes apply depending on the kind of
facet, see the appropriate sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">4.3 Constraining
Facets</a>.</div></div>
</div>
</div><div class="p">
<div class="termdef"><a name="key-facets-overlay" id="key-facets-overlay" title="" shape="rect">[Definition:]&#160;&#160;</a>
Given two sets of facets <var>B</var> and <var>S</var>,
the result of <b>overlaying</b> <var>B</var> with <var>S</var> is the set of facets <var>R</var>
for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="fr1" name="fr1" shape="rect"> </a><span class="p">Every facet in <b>S</b> is in <b>R</b>.</span></div>
<div class="clnumber">2<a id="fr2" name="fr2" shape="rect"> </a><span class="p">
Every facet in <b>B</b> is in <b>R</b>,
unless
it is of the same kind as some
facet in <b>S</b>,
in which case it is not included in <b>R</b>.
</span></div>
<div class="clnumber">3 <span class="p">Every facet in <b>R</b> is required by clause <a href="#fr1" shape="rect">1</a>
or clause <a href="#fr2" shape="rect">2</a> above.</span></div>
</div>
</div>
</div></div></div></div></div><div class="div3">
<h4><a name="builtin-stds" id="builtin-stds" shape="rect"></a>3.16.7 Built-in Simple Type Definitions</h4><div class="div4">
<h5><a name="sec-anySimpleType" id="sec-anySimpleType" shape="rect"></a>3.16.7.1 <code>xs:anySimpleType</code></h5><p>
The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anySimpleType" shape="rect">anySimpleType</a>
is
present in every schema.
It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="simple-ur-type-itself" name="simple-ur-type-itself" shape="rect">Simple Type Definition of anySimpleType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>anySimpleType</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#any-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><p>The definition
of <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> is the
root of the simple type definition
hierarchy, and as such mediates between the other simple type
definitions, which all eventually trace back to it via their
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> properties,
and
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, which is
<em>its</em> <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div><div class="div4">
<h5><a name="sec-anyAtomicType" id="sec-anyAtomicType" shape="rect"></a>3.16.7.2 <code>xs:anyAtomicType</code></h5><p>
The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyAtomicType" shape="rect">anyAtomicType</a>
is present in every schema.
It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="aat-def" name="aat-def" shape="rect">Simple Type Definition of anyAtomicType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>anyAtomicType</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#simple-ur-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>atomic</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div></div><div class="div4">
<h5><a name="xsd-error" id="xsd-error" shape="rect"></a>3.16.7.3 <code>xs:error</code></h5><p>A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> for <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a> is present in every schema
by definition. It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="xsd-error-tableau" name="xsd-error-tableau" shape="rect">Simple Type Definition of <code>xs:error</code></a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>error</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">{<b><i>extension</i></b>, <b><i>restriction</i></b>,
<b><i>list</i></b>, <b><i>union</i></b>}</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#simple-ur-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>union</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal">The empty sequence</div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><div class="note"><div class="p"><b>Note:</b> The datatype <code>xs:error</code> has no valid instances
(i.e. it has an empty value space and an empty lexical space).
This is a natural consequence of its construction: a value is
a value of a union type if and only if it is a value of at
least one member of the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> of the union. Since <code>xs:error</code> has
no member type definitions, there can be no values which are
values of at least one of its member types. And since the value
space is empty, the lexical space is also empty.</div><div class="p">The type <code>xs:error</code> is expected to be used
mostly in conditional type assignment. Whenever it serves as the
<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition for an attribute or element information
item, that item will be invalid.</div></div></div><div class="div4">
<h5><a name="sec-builtin-primitives" id="sec-builtin-primitives" shape="rect"></a>3.16.7.4 Built-in primitive datatypes</h5><p>Simple type definitions corresponding to all the built-in
primitive datatypes, namely <b><i>string</i></b>, <b><i>boolean</i></b>,
<b><i>float</i></b>, <b><i>double</i></b>, <b><i>decimal</i></b>, <b><i>precisionDecimal</i></b>,
<b><i>dateTime</i></b>, <b><i>duration</i></b>, <b><i>time</i></b>,
<b><i>date</i></b>, <b><i>gMonth</i></b>, <b><i>gMonthDay</i></b>,
<b><i>gDay</i></b>, <b><i>gYear</i></b>, <b><i>gYearMonth</i></b>,
<b><i>hexBinary</i></b>, <b><i>base64Binary</i></b>,
<b><i>anyURI</i></b>,
<b><i>QName</i></b> and <b><i>NOTATION</i></b> (see the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#built-in-primitive-datatypes" shape="rect">Primitive
Datatypes</a> section of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) are present by
definition in
every schema
as follows:</p><div class="scInstance"><div class="scHead"><a id="dummy-def" name="dummy-def" shape="rect">Simple Type Definition corresponding to the built-in primitive datatypes</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">[as appropriate]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#aat-def" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>atomic</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal">[this simple type
definition itself]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">{a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w" class="compref" shape="rect">whitespace</a> facet with
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">[value]</a> =
<b><i>collapse</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">[fixed]</a> = <b><i>true</i></b> in all cases except
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a>, which has
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">[value]</a> =
<b><i>preserve</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">[fixed]</a> = <b><i>false</i></b>}</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal"><p>[as appropriate]</p></div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><p>
All conforming implementations of this specification
<span class="rfc2119">must</span> support all the primitive datatypes defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional primitive datatypes
are supported, and whether, if so, they are automatically
incorporated in every schema or not. If <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
primitives are supported, the implementation <span class="rfc2119">must</span>
satisfy the rules for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes
described in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
</p><p><span class="termdef"><a name="key-automatic" id="key-automatic" title="" shape="rect">[Definition:]&#160;&#160;</a>
A type about which a processor possesses prior knowledge, and
which the processor can support without any declaration of the
type being supplied by the user, is said to be <b>automatically known</b>
to the processor.
</span></p><div class="note"><div class="p"><b>Note:</b> By their nature, primitive types can be supported by a
processor only if <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to that processor.</div><div class="p">Types <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to a processor, whether primitive or
derived, can be included automatically by that processor in
all schemas, but need not be. It is possible, for example,
for a processor to have built-in prior knowledge of a set of
primitive and derived types, but to include them in the schema
only when the relevant namespace is explicitly imported, or a
given run-time option is selected, or on some other
conditions; such conditions are not defined by this
specification.
</div></div><div class="note"><div class="p"><b>Note:</b> The definition of "<a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a>" is not
intended to prevent implementations from allowing users
to specify new primitive types.
If an implementation defines a mechanism by which users can
define or supply an implementation of a primitive type, then
when those mechanisms are successfully used, such user-supplied
types are <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the implementation, as that term is
used in this specification.</div></div></div><div class="div4">
<h5><a name="sec-other-builtins" id="sec-other-builtins" shape="rect"></a>3.16.7.5 Other built-in datatypes</h5><p>Similarly, simple type definitions corresponding to all the other built-in datatypes (see the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a> section
of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) are present by definition in
every schema, with properties as specified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> and as
represented in XML in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions</a>.</p><div class="scInstance"><div class="scHead"><a id="dummy-ddef" name="dummy-ddef" shape="rect">Simple Type Definition corresponding to the built-in ordinary datatypes</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">[as appropriate]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">[<b><i>atomic</i></b> or <b><i>list</i></b>, as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal">[if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>, then the <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal">if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">As shown in the XML representations
of the ordinary built-in datatypes in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions</a></div></div></div></div><p>
All conforming implementations of this specification
<span class="rfc2119">must</span> support all the built-in datatypes defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional derived types
are <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the implementation without declaration
and whether, if so, they are automatically
incorporated in every schema or not.
</p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Simple_Type_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="Schemas" id="Schemas" shape="rect"></a>3.17 Schemas as a Whole</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.1 <a href="#Schema_details" shape="rect">The Schema Itself</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2 <a href="#declare-schema" shape="rect">XML Representations of Schemas</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2.1 <a href="#refSchemaConstructs" shape="rect">References to Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2.2 <a href="#sec-refs-from-elsewhere" shape="rect">References to Schema Components from Elsewhere</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.3 <a href="#coxr.schemas" shape="rect">Constraints on XML Representations of Schemas</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.4 <a href="#sec-del-cvc-resolve-instance" shape="rect">Validation Rules for Schemas as a Whole</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5 <a href="#sec-sic-schema-all" shape="rect">Schema Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5.1 <a href="#sec-sic-schema" shape="rect">Schema Information</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5.2 <a href="#sec-sic-id" shape="rect">ID/IDREF Table</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6 <a href="#coss-schema" shape="rect">Constraints on Schemas as a Whole</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.1 <a href="#sec-sch-props-correct" shape="rect">Schema Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.2 <a href="#sec-src-resolve" shape="rect">QName resolution (Schema Document)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.3 <a href="#sec-cvc-resolve-instance" shape="rect">QName resolution (Instance)</a><br clear="none" />
</div><p>A schema consists of a set of schema components.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com/example"&gt;
. . .
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of the skeleton of a schema.</div></div></div><div class="div3">
<h4><a name="Schema_details" id="Schema_details" shape="rect"></a>3.17.1 The Schema Itself</h4><p>At the abstract level, the schema itself is just a container
for its components.</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="s" id="s" shape="rect">Schema</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="s-annotations" shape="rect" id="s-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of <a href="#a" class="compref" shape="rect">Annotation</a> components. </div>
</div>
<div class="propDefn"><a name="s-type_definitions" shape="rect" id="s-type_definitions"></a><div class="pdName"><span class="propdef">{type definitions}</span></div>
<div class="pdDef">
A set of <a href="#td" class="compref" shape="rect">Type Definition</a> components. </div>
</div>
<div class="propDefn"><a name="s-attribute_declarations" shape="rect" id="s-attribute_declarations"></a><div class="pdName"><span class="propdef">{attribute declarations}</span></div>
<div class="pdDef">
A set of <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> components. </div>
</div>
<div class="propDefn"><a name="s-element_declarations" shape="rect" id="s-element_declarations"></a><div class="pdName"><span class="propdef">{element declarations}</span></div>
<div class="pdDef">
A set of <a href="#ed" class="compref" shape="rect">Element Declaration</a> components. </div>
</div>
<div class="propDefn"><a name="s-attribute_group_definitions" shape="rect" id="s-attribute_group_definitions"></a><div class="pdName"><span class="propdef">{attribute group definitions}</span></div>
<div class="pdDef">
A set of <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> components. </div>
</div>
<div class="propDefn"><a name="s-model_group_definitions" shape="rect" id="s-model_group_definitions"></a><div class="pdName"><span class="propdef">{model group definitions}</span></div>
<div class="pdDef">
A set of <a href="#mgd" class="compref" shape="rect">Model Group Definition</a> components. </div>
</div>
<div class="propDefn"><a name="s-notation_declarations" shape="rect" id="s-notation_declarations"></a><div class="pdName"><span class="propdef">{notation declarations}</span></div>
<div class="pdDef">
A set of <a href="#nd" class="compref" shape="rect">Notation Declaration</a> components. </div>
</div>
<div class="propDefn"><a name="s-identity-constraint_definitions" shape="rect" id="s-identity-constraint_definitions"></a><div class="pdName"><span class="propdef">{identity-constraint definitions}</span></div>
<div class="pdDef">
A set of <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> components. </div>
</div>
</div></div>
</div>
</div>
</div><div class="div3">
<h4><a name="declare-schema" id="declare-schema" shape="rect"></a>3.17.2 XML Representations of Schemas</h4><p>A schema is represented in XML by one or more
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is, one or more <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information items. A <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> contains
representations for a collection of schema components, e.g. type
definitions and element declarations, which have a common
<span class="anonRef">{target namespace}</span>. A
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> which has one or more <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>
element information items corresponds to a schema with components
with more than one <span class="anonRef">{target
namespace}</span>, see <a href="#src-import" shape="rect">Import Constraints and Semantics (&#167;4.2.6.2)</a>.</p><p>As always, the mapping rules
given in this section apply after, not before, the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>schema</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-schema" name="element-schema" shape="rect">&lt;schema</a><br clear="none" />&#160;&#160;attributeFormDefault = (<var>qualified</var> | <var>unqualified</var>)&#160;:&#160;unqualified<br clear="none" />&#160;&#160;blockDefault =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>substitution</var>))
&#160;:&#160;''<br clear="none" />&#160;&#160;defaultAttributes = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;xpathDefaultNamespace =
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
&#160;:&#160;##local<br clear="none" />&#160;&#160;elementFormDefault = (<var>qualified</var> | <var>unqualified</var>)&#160;:&#160;unqualified<br clear="none" />&#160;&#160;finalDefault =
(<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>list</var> | <var>union</var>))
&#160;:&#160;''<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;version = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#token" shape="rect">token</a><br clear="none" />&#160;&#160;xml:lang = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#language" shape="rect">language</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>((<a href="#element-include" class="eltref" shape="rect">include</a> | <a href="#element-import" class="eltref" shape="rect">import</a> | <a href="#element-redefine" class="eltref" shape="rect">redefine</a> | <a href="#element-override" class="eltref" shape="rect">override</a> | <a href="#element-annotation" class="eltref" shape="rect">annotation</a>)*, (<a href="#element-defaultOpenContent" class="eltref" shape="rect">defaultOpenContent</a>, <a href="#element-annotation" class="eltref" shape="rect">annotation</a>*)?, ((<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a> | <a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-notation" class="eltref" shape="rect">notation</a>), <a href="#element-annotation" class="eltref" shape="rect">annotation</a>*)*)<br clear="none" />&lt;/schema&gt;</p><p class="element-syntax"><a id="element-defaultOpenContent" name="element-defaultOpenContent" shape="rect">&lt;defaultOpenContent</a><br clear="none" />&#160;&#160;appliesToEmpty = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mode = (<var>interleave</var> | <var>suffix</var>)&#160;:&#160;interleave<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-any" class="eltref" shape="rect">any</a>)<br clear="none" />&lt;/defaultOpenContent&gt;</p></div></div><p>The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item
maps to a <a href="#s" class="compref" shape="rect">Schema</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#key-schema" shape="rect">Schema</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a></div><div class="mapRepr"><a name="anchor5918" id="anchor5918" shape="rect"></a>The simple and complex type definitions
corresponding to all the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> and
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information items
in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
definitions brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> (see <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>),
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
(see <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a>),
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
(see <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>),
and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>
(see <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>).
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a></div><div class="mapRepr">
The (top-level) attribute declarations corresponding to all
the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information items in
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
declarations brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a></div><div class="mapRepr">The (top-level)
element declarations corresponding to all the
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
declarations brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a></div><div class="mapRepr">The attribute group definitions
corresponding to all the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
definitions brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a></div><div class="mapRepr">The model group definitions
corresponding to all the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
definitions brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a></div><div class="mapRepr">The notation declarations
corresponding to all the <a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
declarations brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity- constraint definitions}</a></div><div class="mapRepr">
The identity-constraint definitions corresponding to all the
<a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, and
<a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element information items anywhere
within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any
definitions brought in via
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> and all the <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>,
and <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any,
as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
</div></div></div><p>Note that none of the attribute information items displayed
above correspond directly to properties of schemas. The
<code>blockDefault</code>, <code>finalDefault</code>,
<code>attributeFormDefault</code>,
<code>elementFormDefault</code> and <code>targetNamespace</code>
attributes are appealed to in the sub-sections above, as they
provide global information applicable to many
representation/component correspondences. The other attributes
(<code>id</code> and <code>version</code>) are for user
convenience, and this specification defines no semantics for
them.</p><p>The definition of the schema abstract data model in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a> makes clear that most components have a
<span class="anonRef">{target namespace}</span>. Most components
corresponding to representations within a given <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item will have a <span class="anonRef">{target namespace}</span> which corresponds to the
<code>targetNamespace</code> attribute. </p><p>Since the empty string is not a legal namespace name,
supplying an empty string for <code>targetNamespace</code> is
incoherent, and is <em>not</em> the same as not specifying it
at all. The appropriate form of schema document corresponding to
a <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>schema<span class="arrow">&#183;</span></a> whose components have no <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> is one which has no
<code>targetNamespace</code> attribute specified at all.</p><div class="note"><div class="p"><b>Note:</b> <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>
discusses only instance document syntax for
elements and attributes; it therefore provides no direct framework for managing
the names of type definitions, attribute group definitions, and so on.
Nevertheless, the specification applies the target namespace facility uniformly to all
schema components, i.e. not only declarations but also definitions have a <span class="anonRef">{target namespace}</span>.</div></div><p>Although the example schema at the beginning of this section might be a complete XML document, <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
need not be the document element, but can appear within other documents.
Indeed there is no requirement that a schema correspond to a (text) document
at all: it could correspond to an element information item constructed 'by
hand', for instance via a DOM-conformant API.</p><p>Aside from <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>,
which do not correspond directly to any schema component at all, each
of the element information items which <span class="rfc2119">may</span> appear in the content
of <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
corresponds to a schema component, and all except <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> are
named. The sections below present each such item in turn, setting out
the components to which it
corresponds.</p><div class="div4">
<h5><a name="refSchemaConstructs" id="refSchemaConstructs" shape="rect"></a>3.17.2.1 References to Schema Components</h5><p>Reference to schema components from a schema document is managed in
a uniform way, whether the component corresponds to an element
information item from the same schema document or is imported
(<a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>) from an external schema
(which <span class="rfc2119">may</span>, but need not, correspond to an actual schema
document). The form of all such references is a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="gloss-QName" id="gloss-QName" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>QName</b> is a
name with an optional namespace qualification, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>. When used in connection with the XML
representation of schema components or references to them, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></span>.
For brevity, the term <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
is also used to refer to <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> in the value space of the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, which are
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> with a
<span class="termdef"><a name="q-local" id="q-local" title="" shape="rect">[Definition:]&#160;&#160;</a><b>local name</b></span>
and a
<span class="termdef"><a name="q-uri" id="q-uri" title="" shape="rect">[Definition:]&#160;&#160;</a><b>namespace name</b></span>.
</p><p><span class="termdef"><a name="gloss-NCName" id="gloss-NCName" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>NCName</b> is
a name with no colon, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>. When used in connection with the XML
representation of schema components in this specification, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a> as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></span>.</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a
schema processor supports the definitions of <a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a> and <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> found in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> or those found in <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a> or both.
</div></div><p><span class="termdef"><a name="key-resolve" id="key-resolve" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in a schema document
<b>resolves to</b> a component in a schema if and only if in the
context of that schema the QName and the component together satisfy the rule
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>. A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in
an input document, or a pair consisting of a local name and a namespace name,
<b>resolves to</b> a component in a schema if and only if in the
context of that schema the QName (or the name + namespace pair) and the
component together satisfy the rule <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
</span></p><p>In each of the XML
representation expositions in the following sections, an attribute is shown as
having type <code>QName</code> if and only if it is
interpreted as referencing a schema component.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.example.com"
targetNamespace="http://www.example.com"&gt;
. . .
&lt;xs:element name="elem1" type="Address"/&gt;
&lt;xs:element name="elem2" type="xhtml:blockquote"/&gt;
&lt;xs:attribute name="attr1"
type="xsl:quantity"/&gt;
. . .
&lt;/xs:schema&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The first of these is most probably a local reference, i.e. a reference
to a type
definition corresponding to a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item
located elsewhere in the schema document, the other two refer to type
definitions from schemas for other namespaces and assume that their namespaces
have been declared for import. See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for a discussion of importing.</div></div></div></div><div class="div4">
<h5><a name="sec-refs-from-elsewhere" id="sec-refs-from-elsewhere" shape="rect"></a>3.17.2.2 References to Schema Components from Elsewhere</h5><p><a name="anchor5167a1" id="anchor5167a1" shape="rect"></a>
The names of schema components such as type definitions and element
declarations are not of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>: they are not
unique within a schema, just within a symbol space. This means that simple
fragment identifiers using these names
will not work to reference schema components from outside
the context of schema documents.</p><p>The preferred way to refer to schema components
is to use <a href="#ref-scds" shape="rect">[XML Schema: Component Designators]</a>, which defines a mechanism to designate
schema components using the <code>xscd()</code> <a href="#ref-xpointer" shape="rect">[XPointer]</a>
scheme.</p><p>Alternatively, references to specific
element information items in the schema document can be interpreted as to their
corresponding schema documents. This can be done using mechanisms supported by
<a href="#ref-xpointer" shape="rect">[XPointer]</a>, for example, by using shorthand pointers.
It is a matter for applications to specify whether they interpret
these
references
as being to the relevant element information item (i.e. without
special recognition of the relation of schema documents to schema components) or as being to the
corresponding schema component.</p></div></div><div class="div3">
<h4><a name="coxr.schemas" id="coxr.schemas" shape="rect"></a>3.17.3 Constraints on XML Representations of Schemas</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-del-cvc-resolve-instance" id="sec-del-cvc-resolve-instance" shape="rect"></a>3.17.4 Validation Rules for Schemas as a Whole</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-schema-all" id="sec-sic-schema-all" shape="rect"></a>3.17.5 Schema Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-schema" id="sec-sic-schema" shape="rect"></a>3.17.5.1 Schema Information</h5><div class="constraintnote"><a id="sic-schema" name="sic-schema" shape="rect"></a><b>Schema Information Set Contribution: Schema Information</b><br clear="none" /><div class="constraint"><div class="p">Schema components provide a wealth of information about the
basis of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, which can often be useful for subsequent
processing. Reflecting component structure into a form suitable for
inclusion in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is the way this specification provides for
making this information available.</div><div class="p">Accordingly, <span class="termdef"><a name="key-iso" id="key-iso" title="" shape="rect">[Definition:]&#160;&#160;</a> by an <b>item isomorphic</b> to a component is meant
an information item whose type is equivalent to the component's, with
one property per property of the component, with the same name, and
value either the same atomic value, or an information item
corresponding in the same way to its component value, recursively, as
necessary</span>.</div><div class="p">The <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
has the following properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element or attribute&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_information" name="e-schema_information" shape="rect"><span class="propdef">[schema information]</span></a></dt><dd>A
set of <b>namespace schema information</b> information
items, one for each namespace name which appears as the <span class="anonRef">{target namespace}</span> of any schema component in the
schema used for that assessment, and one for <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if any schema component in the schema
had no <span class="anonRef">{target namespace}</span>. Each
<b>namespace schema information</b> information item has the
following properties and values:
<div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;namespace schema information&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="nsi-schema_namespace" name="nsi-schema_namespace" shape="rect"><span class="propdef">[schema namespace]</span></a></dt><dd>A
namespace name or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd><dt><a id="nsi-schema_components" name="nsi-schema_components" shape="rect"><span class="propdef">[schema components]</span></a></dt><dd>A (possibly empty) set of schema component information
items, each one an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
a component whose <span class="anonRef">{target namespace}</span> is
the sibling <a href="#nsi-schema_namespace" class="propref" shape="rect">[schema namespace]</a> property above, drawn from
the schema used for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.</dd><dt><a id="nsi-schema_documents" name="nsi-schema_documents" shape="rect"><span class="propdef">[schema documents]</span></a></dt><dd>A
(possibly empty) set of <b>schema document</b> information
items, with properties and values as follows, for each schema document
which contributed components to the schema, and whose
<code>targetNamespace</code> matches the sibling <a href="#nsi-schema_namespace" class="propref" shape="rect">[schema namespace]</a> property above (or whose
<code>targetNamespace</code> was <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> but that contributed components to
that namespace by being <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d by a schema document with that
<code>targetNamespace</code> as per
<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>):
<div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;schema document&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="sd-document_location" name="sd-document_location" shape="rect"><span class="propdef">[document location]</span></a></dt><dd>Either a URI reference, if available,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
</dd><dt><a id="sd-document" name="sd-document" shape="rect"><span class="propdef">[document]</span></a></dt><dd>A document
information item, if available, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd></dl>
</div>
</div>
</dd></dl>
</div>
</div>
</dd></dl>
</div>
</div>
<div class="p">The <a href="#nsi-schema_components" class="propref" shape="rect">[schema components]</a> property is provided for
processors which wish to provide a single access point to the
components of the schema which was used during <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Lightweight processors are free to leave it empty, but if it <em>is</em> provided, it <span class="rfc2119">must</span> contain at a minimum all the top-level (i.e. named) components which actually figured in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, either directly or (because an anonymous component which figured is contained within) indirectly.</div></div></div></div><div class="div4">
<h5><a name="sec-sic-id" id="sec-sic-id" shape="rect"></a>3.17.5.2 ID/IDREF Table</h5><div class="constraintnote"><a id="sic-id" name="sic-id" shape="rect"></a><b>Schema Information Set Contribution: ID/IDREF Table</b><br clear="none" /><div class="constraint"><div class="p">In the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> a set of <b>ID/IDREF binding</b> information items
is
associated with the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-ii_table" name="e-ii_table" shape="rect"><span class="propdef">[ID/IDREF table]</span></a></dt><dd>A (possibly empty) set of
<b>ID/IDREF binding</b> information items, as specified below.</dd></dl>
</div>
</div>
<div class="p"><span class="termdef"><a name="key-eas" id="key-eas" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the
<b>eligible item set</b> be the set
consisting of every attribute or element
information item</span> for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">its <span class="anonRef">[validation context]</span> is the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p"><a name="anchor9923" id="anchor9923" shape="rect"></a>
its <span class="anonRef">[schema actual value]</span> is
not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
</span></div>
<div class="clnumber">3 <span class="p"><a name="anchor10235" id="anchor10235" shape="rect"></a>
its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition
is the built-in simple type definition for
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>,
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#IDREF" shape="rect">IDREF</a>, or
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#IDREFS" shape="rect">IDREFS</a>,
or a type definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> or <a href="#key-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
directly (in a single derivation step) or
indirectly (through one or more steps) from any
of these.
</span></div>
</div></div><div class="note"><div class="p"><b>Note:</b>
The use of <span class="anonRef">[schema actual value]</span>
in the definition of <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a> above means that
<b><i>default</i></b> or <b><i>fixed</i></b> value constraints <span class="rfc2119">may</span> play a
part in the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b>
Element information items that have complex types with simple content
can appear in the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.
</div></div><div class="p"><a name="anchor10662b" id="anchor10662b" shape="rect"></a>Then there is one <b>ID/IDREF binding</b> in the <a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a>
for every distinct string which is an
<a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>ID value<span class="arrow">&#183;</span></a>
or an
<a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>IDREF value<span class="arrow">&#183;</span></a>
in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of a member of the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.</div><div class="p">Each <b>ID/IDREF binding</b> has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;ID/IDREF binding&#160;information items
</div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="iib-id" name="iib-id" shape="rect"><span class="propdef">[id]</span></a></dt><dd>The string identified above.</dd><dt><a id="iib-binding" name="iib-binding" shape="rect"><span class="propdef">[binding]</span></a></dt><dd>A set consisting of every element information item for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">its <a href="#e-validation_context" class="propref" shape="rect">[validation context]</a> is the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p">it has an attribute information item in
its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> or an element information item in its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is or contains
the <a href="#iib-id" class="propref" shape="rect">[id]</a> of
this <b>ID/IDREF binding</b> and the
corresponding type definition is or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>.</span></div>
</div>
</dd></dl>
</div>
</div>
<div class="p">The net effect of the above is to have one entry for every string used as an
id, whether by declaration or by reference, associated with those elements, if
any, which actually purport to have that id. See <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a> above
for the validation rule which actually checks for errors here.</div><div class="note"><div class="p"><b>Note:</b> The <b>ID/IDREF binding</b>
information item, unlike most other aspects of this
specification, is essentially an internal bookkeeping mechanism. It is introduced to
support the definition of <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a> above.
</div></div></div></div></div></div><div class="div3">
<h4><a name="coss-schema" id="coss-schema" shape="rect"></a>3.17.6 Constraints on Schemas as a Whole</h4><div class="div4">
<h5><a name="sec-sch-props-correct" id="sec-sch-props-correct" shape="rect"></a>3.17.6.1 Schema Properties Correct</h5><p>All schemas (see <a href="#Schemas" shape="rect">Schemas as a Whole (&#167;3.17)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="sch-props-correct" name="sch-props-correct" shape="rect"></a><b>Schema Component Constraint: Schema Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a schema are as described in
the property tableau in
<a href="#Schema_details" shape="rect">The Schema Itself (&#167;3.17.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>;</span></div>
<div class="clnumber">2<a id="c-nmd" name="c-nmd" shape="rect"> </a><span class="p">None of the
<a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>,
<a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>,
<a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>,
<a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>,
<a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>,
<a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>, or
<a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>
properties contains two or more schema components with the
same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-src-resolve" id="sec-src-resolve" shape="rect"></a>3.17.6.2 QName resolution (Schema Document)</h5><div class="constraintnote"><a id="src-resolve" name="src-resolve" shape="rect"></a><b>Schema Representation Constraint: QName resolution (Schema Document)</b><br clear="none" /><div class="constraint"><div class="p">For a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
to resolve to a schema component of a specified kind
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->That component is a member of the value of the appropriate
property of the schema which corresponds to the schema
document within which the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
appears, that is
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>the kind specified is simple or complex type definition, <b>then </b>the property is the <a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>.</div><div class="clnumber">1.2 <b>If </b>the kind specified is attribute declaration, <b>then </b>the property is the <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>.</div><div class="clnumber">1.3 <b>If </b>the kind specified is element declaration, <b>then </b>the property is the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>.</div><div class="clnumber">1.4 <b>If </b>the kind specified
is attribute group, <b>then </b>the property is the <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>.</div><div class="clnumber">1.5 <b>If </b>the kind specified is
model group, <b>then </b>the property is the <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>.</div><div class="clnumber">1.6 <b>If </b>the kind specified is notation declaration, <b>then </b>the property is the <a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>.</div><div class="clnumber">1.7 <b>If </b>the kind specified is identity-constraint
definition, <b>then </b>the property is
the <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>.</div></div>
</div>
<div class="clnumber">2 <span class="p">The
component's <span class="anonRef">{name}</span> matches the <a href="#q-local" class="termref" shape="rect"><span class="arrow">&#183;</span>local
name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3 <span class="p">The component's <span class="anonRef">{target namespace}</span> is identical to the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">4<a id="cl.qnr.nsdeclared" name="cl.qnr.nsdeclared" shape="rect"> </a>The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">4.1 <b>If </b>the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">4.1.1 <span class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the schema document containing the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">4.1.2 <span class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the that schema document contains an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
information item with no <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
</div>
</div><div class="clnumber">4.2 <b>otherwise </b>
the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is
the same as
<b>one</b> of the following:<div class="constraintlist"><div class="clnumber">4.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the schema document containing the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">4.2.2 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of some
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item contained in the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of that schema document.</span></div>
<div class="clnumber">4.2.3 <span class="p">
<code>http://www.w3.org/2001/XMLSchema</code>.
</span></div>
<div class="clnumber">4.2.4 <span class="p">
<code>http://www.w3.org/2001/XMLSchema-instance</code>.
</span></div>
</div></div></div></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cvc-resolve-instance" id="sec-cvc-resolve-instance" shape="rect"></a>3.17.6.3 QName resolution (Instance)</h5><p>As the discussion above at <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> makes clear,
at the level of schema components and <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>,
reference to components by name is normally not involved. In a
few cases, however, qualified names appearing in information items being
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be resolved to schema
components by such lookup. The following
constraint is appealed to in these cases.</p><div class="constraintnote"><a id="cvc-resolve-instance" name="cvc-resolve-instance" shape="rect"></a><b>Validation Rule: QName resolution (Instance)</b><br clear="none" /><div class="constraint"><div class="p">A pair of a local name and a namespace name (or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>)
resolve to a schema component of a specified kind in the context of <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> by appeal to the appropriate
property of the schema being used for the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Each such property indexes components by name. The property to use is determined by the kind of component specified, that is,
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the kind specified is simple or complex type definition, <b>then </b>the property is the <a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>.</div><div class="clnumber">2 <b>If </b>the kind specified is attribute declaration, <b>then </b>the property is the <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>.</div><div class="clnumber">3 <b>If </b>the kind specified is element declaration, <b>then </b>the property is the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>.</div><div class="clnumber">4 <b>If </b>the kind specified
is attribute group, <b>then </b>the property is the <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>.</div><div class="clnumber">5 <b>If </b>the kind specified is
model group, <b>then </b>the property is the <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>.</div><div class="clnumber">6 <b>If </b>the kind specified is notation declaration, <b>then </b>the property is the <a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>.</div></div>
The component resolved to is the entry in the table whose <span class="anonRef">{name}</span> matches the local name of the pair and whose <span class="anonRef">{target namespace}</span> is identical to the namespace name of the pair.
</div></div></div></div></div></div></div><div class="div1">
<h2><a name="composition" id="composition" shape="rect"></a>4 Schemas and Namespaces: Access and Composition</h2><p>This chapter defines the mechanisms by which this specification establishes the necessary
precondition for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, namely access to
one or more schemas. This chapter also sets out in detail the relationship
between schemas and namespaces, as well as mechanisms for
modularization of schemas, including provision for incorporating definitions
and declarations from one schema in another, possibly with modifications.</p><p><a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a> describes three levels of conformance for schema
processors, and <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a> provides a formal definition of
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. This section sets out
in detail the 3-layer architecture implied by the three conformance levels.
The layers
are: </p><ol class="enumar"><li><div class="p">The <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core, relating schema components and instance
information items; </div></li><li><div class="p">Schema representation: the connections between XML
representations and schema components, including the
relationships between namespaces and schema components; </div></li><li><div class="p">XSD web-interoperability guidelines:
connections
from instance to schema (or schema document) and from schema document
to schema (or schema document) for the WWW. </div></li></ol><p>Layer 1 specifies the manner in which a schema composed of schema components
can be applied to in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an
element information item. Layer 2 specifies the use of <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
elements in XML documents as the standard XML representation for
schema information in a broad range of computer systems and execution
environments. To support interoperation over the World Wide Web in particular,
layer 3 provides a set of conventions for schema reference on the
Web. Additional details on each of the three layers
are
provided in the sections below.</p><div class="div2">
<h3><span class="nav"> <a href="#layer2" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="layer1" id="layer1" shape="rect"></a>4.1 Layer 1: Summary of the Schema-validity Assessment Core</h3><p>The fundamental purpose of the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core is to define <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> for a single
element information item and its descendants,
with respect to a
complex type
definition. All processors are required to implement this core predicate in a
manner which conforms exactly to this specification. </p><p><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>Assessment<span class="arrow">&#183;</span></a> is defined with reference to
an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a> (note <em>not</em> a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>).</p><p>As specified above, each schema component is associated directly or
indirectly with a target namespace, or explicitly with no namespace. In the case of multi-namespace documents,
components for more than one target namespace will co-exist in a schema.</p><p>Processors have the option to assemble (and perhaps to optimize or
pre-compile) the entire schema prior to the start of an
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, or to
gather the schema lazily as individual components are required. In all
cases it is required that:</p><ul><li><div class="p">The processor succeed in locating the <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a>
transitively required to complete an <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> (note that components derived
from <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> can be integrated
with components obtained through other means);</div></li><li><div class="p">no definition or declaration changes once it has been established;</div></li><li><div class="p">if the processor chooses to acquire declarations and definitions
dynamically, that there be no side effects of such dynamic acquisition that
would cause the results of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> to differ from that which would have
been obtained from the same schema components acquired in bulk.</div></li></ul><div class="note"><div class="p"><b>Note:</b> the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core is defined in terms of schema components at the
abstract level, and no mention is made of the schema definition
syntax (i.e. <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>). Although many processors will acquire
schemas in this format, others <span class="rfc2119">may</span> operate on compiled representations, on a
programmatic representation as exposed in some programming language, etc.
</div></div><p>The obligation of a schema-aware processor as far as the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
core is concerned is to implement one or more of the options for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> given below in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>. Neither the
choice of element information item for that <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, nor which of the
means of initiating <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> are used, is within the scope of this specification.</p><p>Although <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is defined recursively, it is also intended to be
implementable in streaming
processors. Such processors <span class="rfc2119">may</span> choose to incrementally assemble the schema during
processing in response, for example, to encountering new namespaces.
The implication of the
invariants expressed above is that such incremental assembly <span class="rfc2119">must</span>
result in an <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
outcome that is the
<em>same</em> as would
be given if <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> were
undertaken again
with the final, fully assembled schema. </p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#layer1" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#composition-instances" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="layer2" id="layer2" shape="rect"></a>4.2 Layer 2: Schema Documents, Namespaces and Composition</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.1 <a href="#composition-concepts" shape="rect">Basic concepts of schema construction and composition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.2 <a href="#cip" shape="rect">Conditional inclusion</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.3 <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(&lt;include&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.4 <a href="#modify-schema" shape="rect">Including modified component definitions (&lt;redefine&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.5 <a href="#override-schema" shape="rect">Overriding component definitions (&lt;override&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6 <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (&lt;import&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6.1 <a href="#composition-importLicenseReferences" shape="rect">Licensing References to Components Across Namespaces</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6.2 <a href="#schemaLocationHints" shape="rect">Providing Hints for Imported Schema Document Locations</a><br clear="none" />
</div><p>The sub-sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> define an
XML representation for type definitions and element declarations and so on,
specifying their target namespace and collecting them into schema documents.
The following sections describe how to
assemble a complete schema from multiple sources.</p><div class="note"><div class="p"><b>Note:</b> The core <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
architecture requires that a complete schema with all the necessary
declarations and definitions be available.
This will
sometimes involve resolving both instance &#8594; schema
(or schema document)
and schema-document &#8594; schema
(or schema document) references.
As observed earlier in <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>, the
precise mechanisms for resolving such references are expected to
evolve over time. In support of such evolution, this specification
observes the design principle that references from one schema document
to a schema use mechanisms that directly parallel those used to
reference a schema from an instance document.</div></div><div class="note"><div class="p"><b>Note:</b> In the sections below, "schemaLocation" really belongs at layer 3.
For convenience, it is documented with the layer 2 mechanisms of import and
include, with which it is closely associated.</div></div><div class="div3">
<h4><a name="composition-concepts" id="composition-concepts" shape="rect"></a>4.2.1 Basic concepts of schema construction and composition</h4><p>
When a schema is assembled from multiple sources, those sources
can include both <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> and other sources of
components. Several of the mechanisms described below
allow a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> to refer to a schema, either
by giving the target namespace of its components,
or indirectly, by referring to a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> (and
thus implicitly to the schema corresponding to that <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>).
</p><p>
The sections that follow appeal often to the following
concepts.</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-pre-processing" id="key-pre-processing" shape="rect"></a>pre-processing</div><div class="giDef"><div class="p">The pre-processing of a schema document before
attempting to map its contents into components,
or the pre-processing of a set of components
before they take their final form among the
components of a schema being constructed.
The following sections define several forms of
pre-processing, including:
conditional-inclusion pre-processing,
chameleon pre-processing,
redefinition pre-processing,
and
override pre-processing.
Conditional-inclusion pre-processing is always performed first;
the sequence in which other forms of pre-processing
are applied varies; details are given below.
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-vc-preprocessing" id="key-vc-preprocessing" shape="rect"></a>conditional-inclusion pre-processing</div><div class="giDef"><div class="p">The process of applying to a schema document the
filtering described in section <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a>.
This pre-processing is usually assumed silently; when
it is explicitly described, then
for a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>, the result of conditional-inclusion
pre-processing of <var>D</var> is written "<var>ci</var>(<var>D</var>)".
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-imm-components" id="key-imm-components" shape="rect"></a>immediate components</div><div class="giDef"><div class="p">The immediate components of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>
are the components corresponding to its definition and
declaration <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>; also written
"<var>immed</var>(<var>D</var>)".</div></div></div><div class="gitem"><div class="giLabel"><a name="key-inter-sc-ref" id="key-inter-sc-ref" shape="rect"></a>inter-schema-document references</div><div class="giDef"><div class="p">The
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, and
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> elements defined below.
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-corresponding-schema" id="key-corresponding-schema" shape="rect"></a>corresponding schema</div><div class="giDef"><div class="p">The schema corresponding to a given <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>
is the schema containing the built-in components,
the <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> components automatically included
in the schema by the schema processor,
<a href="#key-imm-components" class="termref" shape="rect"><span class="arrow">&#183;</span><var>immed</var>(<var>D</var>)<span class="arrow">&#183;</span></a>,
and the
components included by virtue of the inter-schema-document
references included in <var>D</var> (for which see the rules below),
and no other components.
Also written
"<var>schema</var>(<var>D</var>)".</div></div></div><div class="gitem"><div class="giLabel"><a name="key-tns-f" id="key-tns-f" shape="rect"></a>target namespace</div><div class="giDef"><div class="p">The target namespace specified in a schema document <var>D</var>;
also written
"<var>tns</var>(<var>D</var>)".
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-chameleon-pre-processing" id="key-chameleon-pre-processing" shape="rect"></a>chameleon pre-processing</div><div class="giDef"><div class="p">The application, to a schema document <var>D</var>, of the
transformation specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>,
with respect to some namespace <var>N</var>, so as to convert
it to use <var>N</var> as its target namespace;
also written
"<var>chameleon</var>(<var>N</var>,<var>D</var>)".
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-override-pre-processing" id="key-override-pre-processing" shape="rect"></a>override pre-processing</div><div class="giDef"><div class="p">The application, to a schema document <var>D</var>, of the
overrides specified in an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
element <var>E</var>, using the rules specified in detail
in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>;
also written
"<var>override</var>(<var>E</var>,<var>D</var>)".
</div></div></div><div class="gitem"><div class="giLabel"><a name="key-redefine-pre-processing" id="key-redefine-pre-processing" shape="rect"></a>redefine pre-processing</div><div class="giDef"><div class="p">The application, to a schema <var>S</var>, of the
redefinitions specified in an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
element <var>E</var>, using the rules specified in detail
in <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>;
also written
"<var>redefine</var>(<var>E</var>,<var>S</var>)".
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> This specification defines several attributes to allow
schema documents and XML instance documents to provide
information about the location of relevant schema components.
Experience has shown that the similarities and differences
among these attributes can be elusive for some readers; a
compact overview may be helpful.</div><div class="p">
The <code>xsi:schemaLocation</code> and
<code>xsi:noNamespaceSchemaLocation</code> attributes
may validly appear on elements in an XML instance
document. They are technically <b>hints</b>:
conforming schema-aware processors <span class="rfc2119">may</span> but need not
attempt to dereference the schema documents named
in these attributes and include the components described
there in the schema used for validation.
</div><div class="p">
The <code>schemaLocation</code> attribute on the
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element in a schema document is
similarly a hint: a conformaing schema-aware
processor <span class="rfc2119">may</span> but need not attempt to dereference
the schema document named by the attribute.
</div><div class="p">
The <code>schemaLocation</code> attributes on the
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, and
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements in a schema document, on the
other hand, are not hints: conforming processors <span class="rfc2119">must</span> attempt
to de-reference the schema document named by the attribute.
For non-empty <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements, it is
an error for the attempt to fail; otherwise, the
attempt <span class="rfc2119">must</span> be made but it is not an error for it
to fail.
</div><div class="p">In all cases, the use of the attribute in a document
indicates
the existence of a suitable schema document
at the location indicated. This is stated explicitly
below for some attributes, but not for all; where not
stated explicitly, the inference follows implicitly
from other rules.
</div></div></div><div class="div3">
<h4><a name="cip" id="cip" shape="rect"></a>4.2.2 Conditional inclusion</h4><p>Whenever a conforming XSD processor reads a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> in order to include the components defined
in it in a schema, it first performs on the schema document
the pre-processing described in this section.</p><p>Every element in the <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> is examined to
see whether any of
the attributes <code>vc:minVersion</code>,
<code>vc:maxVersion</code>,
<code>vc:typeAvailable</code>,
<code>vc:typeUnavailable</code>,
<code>vc:facetAvailable</code>, or
<code>vc:facetUnavailable</code>
appear among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
</p><p>
Where they appear, the
attributes <code>vc:minVersion</code>
and <code>vc:maxVersion</code> are treated as if declared
with type <code>xs:decimal</code>, and their <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> are compared to a decimal
value representing the version of XSD supported by the
processor (here represented as a variable <var>V</var>). For processors
conforming to this version of this specification, the value of
<var>V</var> is 1.1.
</p><p>
If <var>V</var> is less than the value of
<code>vc:minVersion</code>, or
if <var>V</var> is greater than or equal to the value of
<code>vc:maxVersion</code>,
then the element on which the attribute appears is
to be ignored, along with all its
attributes and
descendants.
The effect is that portions of the
schema document marked with <code>vc:minVersion</code> and/or
<code>vc:maxVersion</code> are retained if
<code>vc:minVersion</code> &#8804; <var>V</var> &lt; <code>vc:maxVersion</code>.
</p><p>
Where they appear, the attributes <code>vc:typeAvailable</code>
and <code>vc:typeUnavailable</code> are treated as if declared
with type <code>list of xs:QName</code>, and the items in their
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> are checked to see whether they name types
<a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the processor. The attributes
<code>vc:facetAvailable</code> and <code>vc:facetUnavailable</code>
are similarly typed, and checked to see if they name facets
supported by the processor.
</p><div class="block">
If an element in a schema document has any of the following:
<ol class="enumar"><li><div class="p"><code>vc:typeAvailable</code> = <var>T</var>, where any item in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>T</var> is <em>not</em> the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some type definition <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the
processor
</div></li><li><div class="p">
<code>vc:typeUnavailable</code> = <var>T</var>, where
every item in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>T</var> is the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some type
definition <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to and supported by the processor
</div></li><li><div class="p"><code>vc:facetAvailable</code> = <var>F</var>, where any item in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>F</var> is not the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some facet
known to and supported by the processor</div></li><li><div class="p">
<code>vc:facetUnavailable</code> = <var>F</var>, where
every item in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>F</var> is the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some facet known to and supported
by the processor</div></li></ol>
then the element on which the attribute appears is to be
ignored, along with all its attributes and descendants.</div><div class="note"><div class="p"><b>Note:</b> It is expected that <code>vc:typeAvailable</code> etc. will be
most useful in testing for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes
and facets, or for derived types for which the processor
supplies a definition automatically. The rules just given do
not, however, attempt to restrict their use to such tests. If
the <code>vc:typeAvailable</code> attribute is used with the
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
associated with one of the built-in primitive datatypes, the
datatype will (in a conforming processor) always be available,
so the test is unlikely to filter out any elements, ever, from
the schema document. But such a usage is not in itself an
error.
</div></div><div class="note"><div class="p"><b>Note:</b> The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the built-in datatypes are as specified
in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>; the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of any <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> datatype
is required by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> to be specified by the implementation.
</div></div><div class="note"><div class="p"><b>Note:</b> The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the facets (built-in or <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>)
are the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the elements used in XSD schema documents
to apply the facets, e.g. <code>xs:pattern</code> for the <b><i>pattern</i></b>
facet.
</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of the rules given above that
if the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>vc:typeAvailable</code> is the empty list
(i.e. <code>vc:typeAvailable=""</code>), then the corresponding element
is <em>not</em> ignored. (It does not list any type that is
not available.) Conversely, if the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
<code>vc:typeUnavailable</code> is the empty list, then the corresponding
element is ignored. Similar results hold for
<code>vc:facetAvailable</code> and <code>vc:facetUnavailable</code>.</div></div><p>
The pre-processing of a schema document <var>S1</var> results
in a second schema document <var>S2</var>, identical to <var>S1</var>
except that all elements and
attributes in <var>S1</var> which are to be ignored
are absent from <var>S2</var>.
We write <var>S2</var> = <var>ci</var>(<var>S1</var>).
If the <code>&lt;schema&gt;</code>
element information item in <var>S1</var> is to be ignored, then <var>S2</var> is identical
to <var>S1</var> except that any attributes other than <code>targetNamespace</code>,
<code>vc:minVersion</code> or <code>vc:maxVersion</code> are removed from its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, and its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> is the empty sequence.
It is <var>S2</var>, not <var>S1</var>, which
is required to conform to this specification.
</p><div class="note"><div class="p"><b>Note:</b> If <var>S1</var> contains no elements
or attributes to be ignored, then <var>S1</var> and
<var>S2</var> are identical.</div></div><p>Except where conditional-inclusion pre-processing is
explicitly mentioned, references to <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>
elsewhere in this specification invariably refer to
the result of the pre-processing step described here,
not to its input, which need not, and in the general
case will not, always conform to the rules for
schema documents laid out in this specification.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">Suppose some future version of XSD (say, version 3.2)
introduces a new form of element declaration. A schema author
might wish to exploit that new form of declaration if
possible, but wish also to ensure that the schema
document can be handled successfully by a processor
written for XSD 1.1. In such a case, a schema document
of the following form would be handled correctly by a
conforming XSD 1.1 processor:</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"&gt;
&lt;xs:element name="e" vc:minVersion="3.2"&gt;
&lt;!--* declaration suitable for 3.2
* and later processors *--&gt;
&lt;/xs:element&gt;
&lt;xs:element name="e"
vc:minVersion="1.1"
vc:maxVersion="3.2"&gt;
&lt;!--* declaration suitable for processors
* supporting versions 1.1 through versions
* up to (but not including) 3.2
*--&gt;
&lt;/xs:element&gt;
...
&lt;/xs:schema&gt;
</pre></div><div class="exampleWrapper">
<div class="p">
Even though the schema document as shown has two element
declarations for element <code>e</code> and thus
violates clause <a href="#c-nmd" shape="rect">2</a> of constraint
<a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, the pre-processing step
described in this section filters out the first element
declaration, making it possible for the resulting schema
document to be valid and to conform to this specification.
</div></div><div class="exampleWrapper">
<div class="p">
Note that the semantics of the <code>vc:maxVersion</code> attribute is
"exclusive". This makes it easier for schema authors to use this feature
without leaving gaps
in the numeric ranges used to select version numbers.
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<p>Suppose that a processor supports an <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive
named <code>xpath_expression</code> in namespace
"<code>http://example.org/extension_types</code>",
and is presented with the following schema document:
</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:tns="http://example.org/extension_types"
targetNamespace="http://example.org/extension_types" &gt;
&lt;xs:element vc:typeAvailable="tns:xpath_expression"
name="e" type="tns:xpath_expression" /&gt;
&lt;xs:element vc:typeUnavailable="tns:xpath_expression"
name="e" type="string" /&gt;
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<p>The effect of conditional inclusion is to include the
first declaration for <code>e</code> and omit the second, so
that the effective schema document, after pre-processing
for conditional inclusion, is:
</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:tns="http://example.org/extension_types"
targetNamespace="http://example.org/extension_types" &gt;
&lt;xs:element vc:typeAvailable="tns:xpath_expression"
name="e" type="tns:xpath_expression" /&gt;
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<p>A processor which does not support type "tns:xpath_expression",
by contrast, will use the other declaration for <code>e</code>:
type in the namespace in question</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:tns="http://example.org/extension_types"
targetNamespace="http://example.org/extension_types" &gt;
&lt;xs:element vc:typeUnavailable="tns:xpath_expression"
name="e" type="string" /&gt;
&lt;/xs:schema&gt;</pre></div></div><div class="constraintnote"><a id="src-cip" name="src-cip" shape="rect"></a><b>Schema Representation Constraint: Conditional Inclusion Constraints</b><br clear="none" /><div class="constraint"><div class="p">Whenever the attribute <code>vc:minVersion</code> or
<code>vc:maxVersion</code> appears on an element information item in a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>, its <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span>
be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to <code>xs:decimal</code> as per
<a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="p">Whenever any of the attributes
<code>vc:typeAvailable</code>,
<code>vc:typeUnavailable</code>,
<code>vc:facetAvailable</code>, or
<code>vc:facetUnavailable</code>,
appears on an element information item in a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>, its <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span>
be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
with respect to a simple type definition with
<a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>
and
<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> =
<code>xs:QName</code>, as per
<a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="p">
Any attribute from the <code>vc:</code> namespace that appears
on an element information item in a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be one of the attributes described
elsewhere in this document (i.e. one of
<code>vc:minVersion</code>, <code>vc:maxVersion</code>, <code>vc:typeAvailable</code>,
<code>vc:typeUnavailable</code>, <code>vc:facetAvailable</code>, or
<code>vc:facetUnavailable</code>).
<div class="note"><div class="p"><b>Note:</b>
Processors are encouraged to issue warnings about
<code>vc:</code> attributes other than those named,
but it is not an error for such
attributes to appear in a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>. The rule just
given is formulated with a "<span class="rfc2119">should</span>" and not
a "<span class="rfc2119">must</span>" in order to preserve the ability of
future versions of this specification to add new attributes
to the schema-versioning namespace.
</div></div>
</div></div></div></div><div class="div3">
<h4><a name="compound-schema" id="compound-schema" shape="rect"></a>4.2.3 Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>)</h4><p>Schema components for a single target namespace can be
assembled from several <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is several
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information items: </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>include</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-include" name="element-include" shape="rect">&lt;include</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/include&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any
number of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements. Their
<code>schemaLocation</code> attributes, consisting of a URI reference,
identify other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items.
</p><p>If two <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements
specify the same schema location (after resolving
relative URI references) then they refer to the same schema document. If
they specify different schema locations, then they refer to different schema
documents, unless the implementation is able to determine that the two URIs
are references to the same resource.</p><p>
If a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var><sub>1</sub>
contains one or more <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements,
then <var>schema</var>(<var>D</var><sub>1</sub>) contains not only
<var>immed</var>(<var>D</var><sub>1</sub>) but also all the components
of <var>schema</var>(<var>D</var><sub>2</sub>), for each <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>
<var>D</var><sub>2</sub> identified by an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element
child of <var>D</var><sub>1</sub>.
Such included schema
documents <var>D</var><sub>2</sub>
<span class="rfc2119">must</span> either (a) have the same
<code>targetNamespace</code> as <var>D</var><sub>1</sub>,
or (b) no <code>targetNamespace</code> at all,
in which case the
components included in <var>schema</var>(<var>D</var><sub>1</sub>) are
not those of <var>schema</var>(<var>D</var><sub>2</sub>) itself, but instead
those of <var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>)),
that is, the schema corresponding to the result of applying
chameleon pre-processing to <var>D</var><sub>2</sub> to convert it to
target namespace <var>tns</var>(<var>D</var><sub>1</sub>).
</p><div class="constraintnote"><a id="src-include" name="src-include" shape="rect"></a><b>Schema Representation Constraint: Inclusion Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element
information items by the schema for schema documents,
<b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="c-ins" name="c-ins" shape="rect"> </a><!--* no span class='p' possible here *-->If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> successfully resolves
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-vxd" name="c-vxd" shape="rect"> </a><span class="p">It resolves to (a fragment of) a resource which is an
XML document (of type <code>application/xml</code> or
<code>text/xml</code> with an XML declaration for
preference, but this is not required), which in turn
corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
information item in a well-formed information set.</span></div>
<div class="clnumber">1.2 <span class="p">It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
information item in a well-formed information set.</span></div>
</div>
In either case call the <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D1</b>.</div>
<div class="clnumber">2 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-normi" name="c-normi" shape="rect"> </a><span class="p"><b>D2</b> has a <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b> (which <span class="rfc2119">must</span> have such an
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).</span></div>
<div class="clnumber">2.2<a id="c-normi2" name="c-normi2" shape="rect"> </a><span class="p">Neither <b>D2</b> nor <b>D1</b> have a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">2.3<a id="c-chami" name="c-chami" shape="rect"> </a><span class="p"><b>D2</b> has no
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <b>D1</b>
does).</span></div>
<div class="clnumber">2.4 <span class="p"><b>D2</b> does not exist (e.g. because the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> does not
resolve successfully).</span></div>
</div></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>clause <a href="#c-normi" shape="rect">2.1</a> or clause <a href="#c-normi2" shape="rect">2.2</a> above is satisfied, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1.1 <span class="p">
<b>D2</b> corresponds to a conforming schema (call it <b>S2</b>).
</span></div>
<div class="clnumber">3.1.2<a id="c-incl-incl" name="c-incl-incl" shape="rect"> </a><span class="p">
The schema corresponding to <b>D1</b> includes not only definitions or
declarations corresponding to the appropriate members of its own
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of
<b>S2</b> (with the possible
exception of its <a href="#s" class="compref" shape="rect">Schema</a> component).
</span></div>
</div></div><div class="clnumber">3.2<a id="c-docham" name="c-docham" shape="rect"> </a><b>If </b>clause <a href="#c-chami" shape="rect">2.3</a> above is
satisfied, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.1<a id="c-chamvalidi" name="c-chamvalidi" shape="rect"> </a><span class="p">
Let <b>D2&#8242;</b> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item
obtained by performing on <b>D2</b> the transformation
specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>;
<b>D2&#8242;</b> corresponds to a conforming schema (call it <b>S2</b>).
</span><div class="note"><div class="p"><b>Note:</b> The transformation in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>
(a) adds a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to <b>D2</b>,
whose value is the same as that of the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b>, and (b) updates all unqualified
QName references so that their namespace names become the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
Implementations need not use the <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a>
stylesheet given in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>,
as long as an equivalent result
is produced.
In particular, different
algorithms for generating a unique namespace
prefix <span class="rfc2119">may</span> be used, even if they produce different
results.
</div></div></div>
<div class="clnumber">3.2.2<a id="c-incl-ns-capture" name="c-incl-ns-capture" shape="rect"> </a><span class="p">
The schema corresponding to <b>D1</b> includes not only definitions or
declarations corresponding to the appropriate members of its own
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b> (with the possible
exception of its <a href="#s" class="compref" shape="rect">Schema</a> component).
</span></div>
</div>
<div class="note"><div class="p"><b>Note:</b>
The above rule applies recursively. For example, if
<b>A</b> includes <b>B</b> and
<b>B</b> includes <b>C</b>, where
<b>A</b> has a <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, but neither <b>B</b> nor
<b>C</b> does, then the effect is as if
<b>A</b> included <b>B'</b> and
<b>B'</b> included <b>C'</b>, where
<b>B'</b> and <b>C'</b> are identical to
<b>B</b> and <b>C</b> respectively,
except that they both have a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> the same as
<b>A</b>'s.
</div></div>
<div class="note"><div class="p"><b>Note:</b> In this case, it is <b>D2&#8242;</b>, not <b>D2</b>, which is required
by clause <a href="#c-chamvalidi" shape="rect">3.2.1</a> to correspond to a conforming schema.
In particular, it is not an error for <b>D2</b> to
fail to satisfy
all of the constraints governing schema documents, while
it <em>is</em> an error if <b>D2&#8242;</b> fails to satisfy them.
</div></div>
<div class="note"><div class="p"><b>Note:</b>
If <b>D2</b> imports the target namespace of <b>D1</b>, then
the effect of clause <a href="#c-docham" shape="rect">3.2</a> will be to
cause an error owing to the violation of clause <a href="#src-import-noselfimport" shape="rect">1</a> of <a href="#src-import" shape="rect">Import Constraints and Semantics (&#167;4.2.6.2)</a> (which forbids a schema document to
import its own target namespace). Other constraint
violations may also be brought about; caution is
advised.
</div></div>
</div></div></div>
</div>
</div><div class="p">It is <em>not</em> an error for the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to fail to resolve
at all,
in which case the corresponding inclusion <span class="rfc2119">must not</span> be performed. It
<em>is</em> an error for it to resolve but the rest of clause 1
above to fail to be satisfied. Failure to resolve is likely
to cause less than complete <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> outcomes, of course.</div><div class="p">As discussed in <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>, <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>s in XML representations will
sometimes fail to <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>, rendering components incomplete
and unusable because of missing subcomponents. During schema
construction, implementations <span class="rfc2119">must</span> retain <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> values for such references, in case
an appropriately-named component becomes available to discharge the
reference by the time it is actually needed. <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> target <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace
name<span class="arrow">&#183;</span></a>s of such as-yet unresolved reference <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>s in <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d
components <span class="rfc2119">must</span> also be converted if clause <a href="#c-docham" shape="rect">3.2</a> is
satisfied.</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
multiple <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing of the same schema document will not
constitute a violation of
clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but
applications are allowed, indeed encouraged, to avoid <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing the
same schema document more than once to forestall the necessity
of establishing identity component by component.</div></div><p>If there is a sequence of schema documents <var>S1</var>, <var>S2</var>, ... <var>Sn</var>,
and a sequence of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements <var>E1</var>, <var>E2</var>, ... <var>En</var>,
such that each <var>S</var><sub><var>i</var></sub> contains the corresponding <var>E</var><sub><var>i</var></sub>, and each <var>E</var><sub><var>i</var></sub>
(where <var>i</var> &lt; <var>n</var>)
points to
schema document <var>S</var><sub><var>i</var> + 1</sub>, and
<var>En</var> points to <var>S1</var> (i.e. if there is a cycle in the relation defined by the
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element), then the same schema corresponds to all
of the schema documents <var>S1</var>, ... <var>Sn</var> in the cycle, and it includes the same
components as the schema corresponding
to <var>S1</var> in the similar case where
<var>Sn</var> has no
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing at <var>S1</var>.
</p><div class="note"><div class="p"><b>Note:</b> Informally:
cycles of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements are legal, and
processors should guard against infinite loops.
</div></div></div><div class="div3">
<h4><a name="modify-schema" id="modify-schema" shape="rect"></a>4.2.4 Including modified component definitions (<code>&lt;redefine&gt;</code>)</h4><div class="note"><div class="p"><b>Note:</b> The redefinition feature described in the remainder of this
section is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a> and may be removed from future versions of
this specification. Schema authors are encouraged to avoid its
use in cases where interoperability or compatibility with later
versions of this specification are important.
</div></div><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">The Working Group requests feedback from readers, schema
authors, implementors, and other users of this specification as
to the desirability of retaining, removing, deprecating, or not
deprecating the use of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>. Since the
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> facility provides similar
functionality but does not require a restriction or extension
relation between the new and the old definitions of redefined
components, the Working Group is particularly interested in
learning whether users of this specification find that
requirement useful or not.
</span></p></div><p>In order to provide some support for evolution and versioning, it is
possible to incorporate components corresponding to a schema document
<em>with modifications</em>. The modifications have a pervasive impact,
that is, only the redefined components are used, even when referenced from
other incorporated components, whether redefined themselves or not.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>redefine</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-redefine" name="element-redefine" shape="rect">&lt;redefine</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a> | (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>))*<br clear="none" />&lt;/redefine&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any number of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements. Their <code>schemaLocation</code> attributes, consisting of a URI reference, identify other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items.
</p><p>If a schema document <var>D</var><sub>1</sub>
contains a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element <var>E</var>
pointing to some schema document <var>D</var><sub>2</sub>, then
<var>schema</var>(<var>D</var><sub>1</sub>) contains not only the components in <var>immed</var>(<var>D</var><sub>1</sub>), but also
all the components (with the exception, in most cases,
of the schema-as-a-whole component) of
<var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)).
For any document <var>D</var><sub>2</sub> pointed at by a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element
in <var>D</var><sub>1</sub>, it <span class="rfc2119">must</span> be the case either (a) that <var>tns</var>(<var>D</var><sub>1</sub>) = <var>tns</var>(<var>D</var><sub>2</sub>)
or else (b) that <var>tns</var>(<var>D</var><sub>2</sub>) is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, in which case <var>schema</var>(<var>D</var><sub>1</sub>) includes not
<var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)) itself
but <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>))).
That is, the redefinition pre-processing is applied not to the
schema corresponding to <var>D</var><sub>2</sub> but instead to the schema corresponding
to the schema document <var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>),
which is the result of applying chameleon pre-processing to <var>D</var><sub>2</sub>
to convert it to target namespace <var>tns</var>(<var>D</var><sub>1</sub>).
</p><div class="block">The definitions within the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element itself are
restricted to be redefinitions of components from the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
schema document, <em>in terms of themselves</em>. That is,
<ul><li><div class="p">Type
definitions <span class="rfc2119">must</span> use themselves as their base type definition;</div></li><li><div class="p">
Attribute
group definitions and model group definitions <span class="rfc2119">must</span> be supersets or subsets of their original
definitions, either by including exactly one
reference to themselves or by containing only (possibly restricted) components
which appear in a corresponding way in their <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d selves.</div></li></ul>Not all the components of the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
schema document need be redefined.</div><p>This mechanism is intended to provide a declarative and modular approach to
schema modification, with functionality no different except in scope from what
would be achieved by wholesale text copying and redefinition by editing. In
particular redefining a type is not guaranteed to be side-effect free: it can
have unexpected impacts on other type definitions which are based
on the redefined one, even to the extent that some such definitions become
ill-formed.</p><div class="note"><div class="p"><b>Note:</b> The pervasive impact of redefinition reinforces the need for
implementations to adopt some form of lazy or 'just-in-time' approach to
component construction, which is also called for in order to avoid
inappropriate dependencies on the order in which definitions and references appear in (collections of) schema documents.</div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">v1.xsd:
&lt;xs:complexType name="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="title" minOccurs="0"/&gt;
&lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="addressee" type="personName"/&gt;
v2.xsd:
&lt;xs:redefine schemaLocation="v1.xsd"&gt;
&lt;xs:complexType name="personName"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="generation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:redefine&gt;
&lt;xs:element name="author" type="personName"/&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The schema corresponding to <code>v2.xsd</code> has everything specified
by <code>v1.xsd</code>, with the <code>personName</code> type redefined, as
well as everything it specifies itself. According to
this schema, elements constrained
by the <code>personName</code> type <span class="rfc2119">may</span> end with a <code>generation</code>
element. This includes not only the <code>author</code> element, but also the
<code>addressee</code> element.</div></div></div><div class="constraintnote"><a id="src-redefine" name="src-redefine" shape="rect"></a><b>Schema Representation Constraint: Redefinition Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element information items by the schema for schema documents
<b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <span class="p">If there are any element information items among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> other than <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> then the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
of the <code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> <span class="rfc2119">must</span>
successfully resolve.</span></div>
<div class="clnumber">2<a id="redef-resolves" name="redef-resolves" shape="rect"> </a><!--* no span class='p' possible here *-->If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> successfully resolves
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">it resolves to (a fragment of) a resource which is an
XML document (see clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>), which in turn
corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
information item in a well-formed information set.</span></div>
<div class="clnumber">2.2 <span class="p">It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
information item in a well-formed information set.</span></div>
</div>
In either case call the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
item <b>D1</b>.</div>
<div class="clnumber">3 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1<a id="c-normir" name="c-normir" shape="rect"> </a><span class="p"><b>D2</b> has a <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b> (which <span class="rfc2119">must</span> have such an
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).</span></div>
<div class="clnumber">3.2<a id="c-normi2r" name="c-normi2r" shape="rect"> </a><span class="p">Neither <b>D2</b> nor <b>D1</b> have a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">3.3<a id="c-chamir" name="c-chamir" shape="rect"> </a><span class="p"><b>D2</b> has no
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <b>D1</b>
does).</span></div>
</div></div>
<div class="clnumber">4 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">4.1 <b>If </b>clause <a href="#c-normir" shape="rect">3.1</a> or clause <a href="#c-normi2r" shape="rect">3.2</a> above is satisfied, <b>then </b>
<div class="constraintlist"><div class="clnumber">4.1.1 <span class="p">
<b>D2</b> corresponds to a conforming schema (call it <b>S2</b>).
</span></div>
<div class="clnumber">4.1.2 <span class="p">
The schema corresponding to <b>D1</b> includes not only definitions or
declarations corresponding to the appropriate members of its own
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b>, with the
exception of those explicitly redefined
(see <a href="#src-expredef" shape="rect">Individual Component Redefinition (&#167;4.2.4)</a> below
and with the possible
exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
of <b>S2</b>)).
</span></div>
</div>
</div><div class="clnumber">4.2<a id="c-dochamr" name="c-dochamr" shape="rect"> </a><b>If </b>clause <a href="#c-chamir" shape="rect">3.3</a> above is
satisfied, <b>then </b>
<div class="constraintlist"><div class="clnumber">4.2.1<a id="c-chamvalidr" name="c-chamvalidr" shape="rect"> </a><span class="p">
Let <b>D2&#8242;</b> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item
obtained by performing on <b>D2</b> the transformation
specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>;
<b>D2&#8242;</b> corresponds to a conforming schema (call it <b>S2</b>).
</span></div>
<div class="clnumber">4.2.2 <span class="p">
The schema corresponding to <b>D1</b> includes not only definitions or
declarations corresponding to the appropriate members of its own
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b>, with the
exception of those explicitly redefined
(see <a href="#src-expredef" shape="rect">Individual Component Redefinition (&#167;4.2.4)</a> below).
</span></div>
</div>
</div></div><div class="note"><div class="p"><b>Note:</b> In this case, it is <b>D2&#8242;</b> and not <b>D2</b>, which is required
by clause <a href="#c-chamvalidr" shape="rect">4.2.1</a> to correspond to a conforming schema.
In particular, it is not an error for <b>D2</b> to
fail to satisfy
all of the constraints governing schema documents, while
it <em>is</em> an error if <b>D2&#8242;</b> fails to satisfy them.
</div></div></div>
<div class="clnumber">5 <span class="p">Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, each <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
<span class="rfc2119">must</span> have a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> among its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
each <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> <span class="rfc2119">must</span> have a
<code>restriction</code> or <code>extension</code> among its
grand-<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose <code>base</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> <span class="rfc2119">must</span> be the same as the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own
<code>name</code> attribute plus target namespace;</span></div>
<div class="clnumber">6 <!--* no span class='p' possible here *-->Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, for each <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">6.1 <b>If </b>it has a <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> among its
contents at some level the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose
<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is the same as the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute plus
target namespace
and that <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> does not have an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
ancestor, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.1.1 <span class="p">It has exactly one such group.</span></div>
<div class="clnumber">6.1.2 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of both that group's
<code>minOccurs</code> and <code>maxOccurs</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is <code>1</code> (or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).</span></div>
</div>
</div><div class="clnumber">6.2 <b>If </b>it has no such self-reference, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute
plus target namespace successfully <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to a
model group definition in <b>S2</b>.</span></div>
<div class="clnumber">6.2.2 <span class="p"><a name="anchor6685D" id="anchor6685D" shape="rect"></a>
The <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> of the
model group definition which corresponds to it per
<a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components (&#167;3.7.2)</a> accepts a subset of the element
sequences accepted by that model group definition in
<b>S2</b>.</span></div>
</div></div></div></div>
<div class="clnumber">7 <!--* no span class='p' possible here *-->Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, for each <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">7.1 <b>If </b>it has an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
among its contents the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose
<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is the same as the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute plus
target namespace, <b>then </b>it has exactly one such group.</div><div class="clnumber">7.2<a id="c-agrere" name="c-agrere" shape="rect"> </a><b>If </b>it has no such self-reference, <b>then </b>
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">7.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute
plus target namespace successfully <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an
attribute group definition in <b>S2</b>.</span></div>
<div class="clnumber">7.2.2 <span class="p">The <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and
<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of the attribute group
definition which corresponds to it per <a href="#declare-attributeGroup" shape="rect">XML Representation of Attribute Group Definition Schema Components (&#167;3.6.2)</a> viewed as the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> and the <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of that attribute group
definition in <b>S2</b> viewed as the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
satisfy clause <a href="#c-ran" shape="rect">3</a> of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>.</span></div>
</div></div></div>
<div class="note"><div class="p"><b>Note:</b> An attribute group restrictively redefined per
clause <a href="#c-agrere" shape="rect">7.2</a> corresponds to an attribute
group whose <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
consist all and only of those attribute uses corresponding
to <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>s explicitly present among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing
<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>. No inheritance from the
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d attribute group occurs. Its
<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> is
similarly based purely on an explicit <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>, if present.</div></div>
</div>
</div>
</div></div></div><div class="constraintnote"><a id="src-expredef" name="src-expredef" shape="rect"></a><b>Schema Representation Constraint: Individual Component Redefinition</b><br clear="none" /><div class="constraint"><div class="p">Corresponding to each non-<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> member of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> there are one or two schema components in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing schema:</div><div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> and <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> information items each
correspond to two components:</span><div class="constraintlist"><div class="clnumber">1.1<a id="icr-c11" name="icr-c11" shape="rect"> </a><span class="p">One component which corresponds to the top-level definition item with
the same <code>name</code> in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema document, as defined in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that its <span class="anonRef">{name}</span> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> and its <span class="anonRef">{context}</span> is the redefining component, as defined in clause <a href="#icr-c12" shape="rect">1.2</a> below;</span></div>
<div class="clnumber">1.2<a id="icr-c12" name="icr-c12" shape="rect"> </a><span class="p">One component which corresponds to the information item itself, as defined
in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that its <span class="anonRef">{base type definition}</span> is
the component defined in clause <a href="#icr-c11" shape="rect">1.1</a> above.</span></div>
</div><div class="p">This pairing ensures the coherence constraints on type definitions
are respected, while at the same time achieving the desired effect, namely that
references to names of redefined components in both the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing and
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema documents <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to the redefined component
as specified in 1.2 above.</div></div>
<div class="clnumber">2 <span class="p">The <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> each correspond to a single component, as defined in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that if and when a self-reference based on a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the same as the item's <code>name</code> plus target namespace is
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>, a component which corresponds to the top-level definition item of that name and the appropriate kind in
<b>S2</b> is used.</span></div>
</div><div class="p">In all cases there <span class="rfc2119">must</span> be a top-level definition item of the appropriate name and kind in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema document.</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
multiple equivalent <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing of the same schema document will not constitute a violation of
clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but applications are
allowed, indeed encouraged, to avoid <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing the same
schema document in the same way more than once to forestall the necessity of
establishing identity component by component (although this will have to be
done for the individual redefinitions themselves).</div></div></div><div class="div3">
<h4><a name="override-schema" id="override-schema" shape="rect"></a>4.2.5 Overriding component definitions (<code>&lt;override&gt;</code>)</h4><p>The <code>&lt;redefine&gt;</code> construct defined
in <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>
is useful in schema evolution and versioning,
when it is desirable to have some guaranteed restriction or extension
relation between the old component and the redefined component.
But there are occasions when the schema author simply wants to
replace old components with new ones without any constraint.
Also, existing XSD processors
have implemented conflicting and non-interoperable interpretations
of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
construct is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a>.
The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> construct defined in this section
allows such unconstrained replacement.</p><div class="note"><div class="p"><b>Note:</b> The name of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
has nothing to do with the use of the term
"<a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a>"
to denote the relation between an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>
and another type. The two mechanisms are
distinct and unrelated.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>override</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-override" name="element-override" shape="rect">&lt;override</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a> | (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a> | <a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-notation" class="eltref" shape="rect">notation</a>))*<br clear="none" />&lt;/override&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any number of
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements. Their <code>schemaLocation</code>
attributes, consisting of a URI reference, identify
("point to")
other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>,
that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items.</p><p>If a schema document <var>D</var><sub><var>new</var></sub>
contains an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element <var>E</var>
pointing to some schema document <var>D</var><sub><var>old</var></sub>, then
<var>schema</var>(<var>D</var><sub><var>new</var></sub>) contains not only the components in <var>immed</var>(<var>D</var><sub><var>new</var></sub>),
but also the components in
<var>schema</var>(<var>override</var>(<var>E</var>,<var>D</var><sub><var>old</var></sub>)).
For all such schema documents <var>D</var><sub><var>old</var></sub>,
it <span class="rfc2119">must</span> be the case either (a) that <var>tns</var>(<var>D</var><sub><var>old</var></sub>) = <var>tns</var>(<var>D</var><sub><var>new</var></sub>),
or (b) that <var>tns</var>(<var>D</var><sub><var>old</var></sub>) is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, in which case
<var>schema</var>(<var>D</var><sub><var>new</var></sub>) contains not the components in
<var>schema</var>(<var>override</var>(<var>E</var>,<var>D</var><sub><var>old</var></sub>)), but those in
<var>schema</var>(<var>override</var>(<var>E</var>,<var>chameleon</var>(<var>tns</var>(<var>D</var><sub><var>new</var></sub>),<var>D</var><sub><var>old</var></sub>))).
That is, before the override pre-processsing is applied,
chameleon pre-processing is applied to <var>D</var><sub><var>old</var></sub> to convert it
to target namespace <var>tns</var>(<var>D</var><sub><var>new</var></sub>); the override
pre-processing is applied to the result, namely
<var>chameleon</var>(<var>tns</var>(<var>D</var><sub><var>new</var></sub>),<var>D</var><sub><var>old</var></sub>).
</p><div class="ednote"><div class="note"><p><b>Editorial Note: </b><span class="edtext">Several alternative formattings are possible for the new
variable names here. Which is preferable?
(a) <var>D</var><sub><var>new</var></sub> and <var>D</var><sub><var>old</var></sub>, or
(b) <var>D</var>_<var>new</var> and <var>D</var>_<var>old</var>, or
(c) <var>D_new</var> and <var>D_old</var>, or
(d) <var>D-new</var> and <var>D-old</var>, or
(e) <var>Dnew</var> and <var>Dold</var>?
</span></p></div></div><div class="note"><div class="p"><b>Note:</b> If the above definition is naively translated into an
algorithm, the algorithm may fail to terminate in the case
where the graph of <code>include</code> and <code>override</code>
references among schema documents contains cycles. To
guarantee termination, the algorithm must detect when it has
reached closure, that is, when further computation will have no
effect on the outcome. In particular, it is useful to recognize
(a) that it is possible to terminate as soon as conflicting
components have been generated (for example, two different type
definitions with the same name), and (b) that when
<var>override</var>(<var>E</var>, <var>D</var>) (for some <var>E</var> and <var>D</var>) is
equivalent to <var>D</var>, no new schema
components will be contributed by further processing: this can
be detected either by comparing the input and output of the
override transformation using a comparator such as the
<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>
<code>fn:deep-equal</code> function, or by observing the
conditions that cause <var>override</var>(<var>E</var>, <var>D</var>) to be
idempotent, for example the fact that <var>E</var> is empty.
</div></div><p>The children of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
element <span class="rfc2119">may</span> override any source declarations for
<a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>named<span class="arrow">&#183;</span></a> components which
appear among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>,
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, or
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of
the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item..
</p><div class="p"><div class="termdef"><a name="key-targetset" id="key-targetset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>target set</b> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information
item <var>E</var> contains <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of any <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item
in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of <var>E</var>.</span></div>
<div class="clnumber">3 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of any <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element information item
in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of <var>E</var>.</span></div>
</div>
The <b>target set</b> of <var>E</var> contains no other schema documents.
</div></div><div class="note"><div class="p"><b>Note:</b>
The <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element is
the transitive closure of the union of the inclusion relation (which contains
the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>
element pointing to <var>S2</var>) and the override relation (which contains
the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
element pointing to <var>S2</var>). It does not include schema documents which
are pointed to by <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements,
unless they are also pointed to by <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> or
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements in the relevant schema documents.
</div><div class="p">
Source declarations not present in the target set of <var>E</var> cannot
be overridden, even if they are present in other schema
documents consulted in the creation of the schema (e.g. in
schema documents pointed to by a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
element). It is not an error for
an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element to contain a source declaration
which matches nothing in the target set, but it will be ignored;
in particular, it will not succeed in overriding source declarations
in schema documents not part of the target set.
</div></div><div class="note"><div class="p"><b>Note:</b>
The transformation described in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>
translates both <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> and <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements
into <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements. These <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
elements will, in turn, be handled by transforming their target schema
documents. Since every schema document in the target set of the original
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element is the target of either an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
element or of an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element, it follows that the
transformation described in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a> will be
applied to every schema document in the target set.
</div></div><div class="note"><div class="p"><b>Note:</b> It is <em>not</em> forbidden for the schema document <var>D</var> containing
an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element <var>E</var> to be in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of <var>E</var>.</div><div class="p">If applying the override transformation specified in
<a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a> to <var>D</var> and <var>E</var> results in
a schema document equivalent to <var>D</var> (e.g. when none of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
of <var>D</var>, or of any <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
elements in <var>D</var> match any of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E</var>, except
for the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E</var> themselves), then the effect is the same
as for a cyclic set of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> references, or
as for multiple inclusions of the same document (as
described in the note at the end of
<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>).
</div><div class="p">If applying the override transformation to <var>D</var> and <var>E</var> changes
any of the XML representations of components, then the effect of
<var>D</var> being in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of <var>E</var> is the same
as if two different schema documents containing conflicting
definitions for the same components were included. ("As if"
is inexact; in this case what happens is, precisely,
that two schema documents with conflicting contents are
included.)
</div></div><p>The definitions within the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element itself are
<em>not</em> required to be similar in any way to
the
source declarations being
overridden. Not all the source declarations
of the overridden schema document need be
overridden.</p><p>As this mechanism is very similar to <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, many similar
kinds of caution need to be taken in using <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>. Please
refer to <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a> for details.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">v1.xsd:
&lt;xs:complexType name="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="firstName"/&gt;
&lt;xs:element name="lastName"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="addressee" type="personName"/&gt;
v2.xsd:
&lt;xs:override schemaLocation="v1.xsd"&gt;
&lt;xs:complexType name="personName"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="givenName"/&gt;
&lt;xs:element name="surname"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;/xs:override&gt;
&lt;xs:element name="author" type="personName"/&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The schema corresponding to <code>v1.xsd</code> has a complex type named
<code>personName</code> with a sequence of <code>firstName</code>
and <code>lastName</code> children. The schema corresponding to <code>v2.xsd</code>
overrides <code>personName</code>, by providing a different sequence of
element children. All elements with the <code>personName</code> type are
now constrained to have the sequence of <code>givenName</code> and
<code>surname</code>. This includes not only the <code>author</code>
element, but also the <code>addressee</code> element.</div></div></div><div class="constraintnote"><a id="src-override" name="src-override" shape="rect"></a><b>Schema Representation Constraint: Override Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
information items by the schema for schema documents <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->
If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
successfully resolves <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p">
It resolves to (a fragment of) a resource which is an XML document (see
clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>), which in turn
corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item in a
well-formed information set.
</span></div>
<div class="clnumber">1.2 <span class="p">
It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item in a
well-formed information set.
</span></div>
</div>
In either case call the overridden <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <var>D</var><sub><var>old</var></sub>
and the overriding item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <var>D</var><sub><var>new</var></sub>.
</div>
<div class="clnumber">2 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-o-normir" name="c-o-normir" shape="rect"> </a><span class="p">
<var>D</var><sub><var>old</var></sub> has a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <var>D</var><sub><var>new</var></sub> (which <span class="rfc2119">must</span> have such an <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).
</span></div>
<div class="clnumber">2.2<a id="c-o-normi2r" name="c-o-normi2r" shape="rect"> </a><span class="p">
Neither <var>D</var><sub><var>old</var></sub> nor <var>D</var><sub><var>new</var></sub> have a <code>targetNamespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</span></div>
<div class="clnumber">2.3<a id="c-o-chamir" name="c-o-chamir" shape="rect"> </a><span class="p">
<var>D</var><sub><var>old</var></sub> has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <var>D</var><sub><var>new</var></sub>
does).
</span></div>
</div></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>clause <a href="#c-o-normir" shape="rect">2.1</a> or clause <a href="#c-o-normi2r" shape="rect">2.2</a>
above is satisfied, <b>then </b><div class="constraintlist"><div class="clnumber">3.1.1<a id="c-e1e2" name="c-e1e2" shape="rect"> </a><span class="p">
Let <var>D<sub>old</sub>&#8242;</var> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item obtained by
performing on <var>D</var><sub><var>old</var></sub> the transformation
specified in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>. Then
<var>D<sub>old</sub>&#8242;</var> corresponds to a conforming schema (call it <var>S</var><sub><var>old</var></sub>).
</span></div>
<div class="clnumber">3.1.2 <span class="p">
The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in schema document <var>D</var><sub><var>new</var></sub>
pointing to <var>D</var><sub><var>old</var></sub> is replaced by an
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing to <var>D<sub>old</sub>&#8242;</var>
and the inclusion is handled as described in
<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
</span><div class="note"><div class="p"><b>Note:</b> It is not necessary to perform a literal replacement
of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in <var>D</var><sub><var>new</var></sub> with an
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element; any implementation technique
can be used as long as it produces the required result.
</div></div><div class="note"><div class="p"><b>Note:</b> One effect of the rule just given is that
the schema corresponding to <var>D</var><sub><var>new</var></sub> includes not only definitions or
declarations corresponding to the appropriate members of its own
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>old</var></sub>
(with the possible
exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
of <var>S</var><sub><var>old</var></sub>).
</div></div><div class="note"><div class="p"><b>Note:</b> Another effect is that if schema document <var>A</var> contains
a source declaration for a component <var>E</var>, and schema document <var>B</var>
overrides <var>A</var> with its own declaration for <var>E</var>,
and schema document <var>C</var> in turn overrides <var>B</var> with a
third declaration for <var>E</var>, then in
calculating <var>schema</var>(<var>C</var>)
<div class="constraintlist"><div class="clnumber">3.1.2.1 <span class="p">First, the override of <var>B</var> by <var>C</var> is handled. The
resulting schema document
(<var>B</var>&#8242;, a
modified version of <var>B</var>)
still contains an
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element referring to
<var>A</var>,
but the declaration for <var>E</var> contained in it has
been replaced by that specified in <var>C</var>.</span></div>
<div class="clnumber">3.1.2.2 <span class="p">Then, the override of <var>A</var> by
<var>B</var>&#8242;
(the modified version of <var>B</var>)
is handled.</span></div>
<div class="clnumber">3.1.2.3 <span class="p">The resulting version of <var>A</var>, containing
the declaration for <var>E</var> originally present in <var>C</var>,
is included by
<var>B</var>&#8242;,
which is itself included by <var>C</var>.
</span></div>
<div class="clnumber">3.1.2.4 <span class="p">The resulting schema contains the version of <var>E</var>
originally specified in schema document <var>C</var>.
</span></div>
</div>
(The references to "first" and
"then"
here refer to the logical precedence
of operations, not to a required order in which implementations
are required to perform particular tasks.)
</div></div></div>
</div></div><div class="clnumber">3.2 <b>If </b>clause <a href="#c-o-chamir" shape="rect">2.3</a> above is satisfied, <b>then </b><div class="constraintlist"><div class="clnumber">3.2.1<a id="c-o-chamvalidr" name="c-o-chamvalidr" shape="rect"> </a><span class="p">
Let <var>D<sub>old</sub>&#8242;</var> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item obtained by
performing on <var>D</var><sub><var>old</var></sub> first the transformation
specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a> and then the
transformation specified in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>. Then
<var>D<sub>old</sub>&#8242;</var> corresponds to a conforming schema (call it <b>S2</b>).
</span></div>
<div class="clnumber">3.2.2 <span class="p">
The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in schema document <var>D</var><sub><var>new</var></sub>
pointing to <var>D</var><sub><var>old</var></sub> is replaced by an
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing to <var>D<sub>old</sub>&#8242;</var>
and the inclusion is handled as described in
<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
</span></div>
</div></div></div></div>
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> The effect of applying the stylesheet in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>
is to make <var>D<sub>old</sub>&#8242;</var> identical to <var>D</var><sub><var>old</var></sub> except that some elements in
<var>D</var><sub><var>old</var></sub> are replaced
or modified, as described in
<a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>.
Implementations do not have to use <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a>
transformation, as long as the same result is produced.</div></div><div class="note"><div class="p"><b>Note:</b> It is <var>D<sub>old</sub>&#8242;</var> and not <var>D</var><sub><var>old</var></sub>, which is required to correspond to a
conforming schema. In particular, it is not an error for <var>D</var><sub><var>old</var></sub> to fail to
satisfy all of the constraints governing schema documents, while it
<em>is</em> an error if <var>D<sub>old</sub>&#8242;</var> fails to satisfy them.
</div></div><div class="note"><a name="anchor10652" id="anchor10652" shape="rect"></a><div class="p"><b>Note:</b>
The effect of override pre-processing is that any declarations
and definitions contained within an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> will
be substituted for matching declarations and definitions within
the target set; the resulting schema documents will then be
processed normally, as described in the relevant portions of this
specification. This has the effect that the rules for
document-level defaults (<code>elementFormDefault</code>,
<code>attributeFormDefault</code>, <code>blockDefault</code>,
<code>finalDefault</code>, and so on) are applied not in the
context of the document containing the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
(<var>D</var><sub><var>new</var></sub>) but in the context of the document containing the
original overridden declaration or definition (<var>D</var><sub><var>old</var></sub>).
Unexpected results may be minimized if the children of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are made independent of the document-level
defaults by explicitly specifying the desired values for
the properties in question.
</div></div><div class="note"><div class="p"><b>Note:</b>
In <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, components are allowed or required to refer to
themselves. There is no similar special treatment in <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>.
Overriding components are constructed as if the overridden components had never
existed.
</div></div><div class="note"><div class="p"><b>Note:</b>
The above is carefully worded so that
multiple equivalent overrides of the
same schema document will not constitute a violation of clause <a href="#c-nmd" shape="rect">2</a>
of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but applications are allowed, indeed
encouraged, to avoid overriding the same schema document in the same way
more than once to forestall the necessity of establishing identity component
by component.
</div></div><div class="note"><div class="p"><b>Note:</b>
It is a consequence of the semantics of inclusion, as
defined in <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a> (in particular
clause <a href="#c-incl-incl" shape="rect">3.1.2</a> and
clause <a href="#c-incl-ns-capture" shape="rect">3.2.2</a>);
redefinition, as defined in
<a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>;
import, as defined in
<a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>;
and overriding, as defined in this section,
that if the same schema document is both (a) included, imported, or
redefined, and (b) non-vacuously overridden, or if the same
schema document overridden twice in
different ways, then
the resulting schema will have duplicate and conflicting versions
of some components and will not be conforming,
just as if two different schema documents had been
included, with different declarations for the same
<a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>named<span class="arrow">&#183;</span></a> components.
</div></div></div><div class="div3">
<h4><a name="composition-schemaImport" id="composition-schemaImport" shape="rect"></a>4.2.6 References to schema components across namespaces (<code>&lt;import&gt;</code>)</h4><p>As described in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, every top-level schema component is associated with
a target namespace (or, explicitly, with none). Furthermore,
each schema document carries on its <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
at most one <code>targetNamespace</code> attribute associating that document
with a target namespace. This section sets out
the
syntax and mechanisms by which references
<span class="rfc2119">may</span> be made from within a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> to components
outside that document's target
namespace. Also included within the same syntax is an optional
facility for suggesting the URI of a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> containing
definitions and declarations for components from the foreign
target namespace.</p><div class="note"><div class="p"><b>Note:</b>
Some users of version 1.0 of this specification have mistakenly
assumed that the
primary purpose of the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is to cause retrieval of
a resource identified by the <code>schemaLocation</code> attribute.
Although the function of <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is
unchanged in this version, the presentation below has been
reorganized to clarify the two separate purposes served by
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>, namely
(1) to license references, within a schema document, to
components in the imported namespace, and (2) to provide information
about the location of schema documents for imported namespaces.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>import</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-import" name="element-import" shape="rect">&lt;import</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;namespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;schemaLocation = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/import&gt;</p></div></div><p>The <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item identifies namespaces
used in external references, i.e. those whose
<a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> identifies them as coming from a
different namespace (or none) than the enclosing schema document's
<code>targetNamespace</code>.</p><div class="div4">
<h5><a name="composition-importLicenseReferences" id="composition-importLicenseReferences" shape="rect"></a>4.2.6.1 Licensing References to Components Across Namespaces</h5><p>At least two conditions must be satisfied for a
reference to be made to a foreign component: (1)
there must be a
means of addressing such foreign components,
and
(2) there must be a signal to
schema-aware processors that a schema document contains such
references. The namespace
mechanisms defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>
satisfy the first requirement by allowing foreign components
to be addressed.
(How those components are located is governed by the
processor's strategies for locating schema components
in a given namespace, in which the <code>schemaLocation</code> attribute
on the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element can play a role;
see also <a href="#var_schema_con" shape="rect">
Terminology of schema construction
(&#167;C.2)</a>.)
The <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item
serves
to satisfy the second requirement, by identifying
namespaces used in external component
references, i.e. those whose
<a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> identifies them as coming
from a namespace different from that of the enclosing schema
document's <code>targetNamespace</code>.
By contrast, a namespace used for other purposes in a schema document
need not be imported.
</p><div class="note"><div class="p"><b>Note:</b>
There is
no need, for example, to import the
namespace of a vocabulary such as XHTML
for use in schema
<a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> elements, unless that same namespace is also
used as the target namespace for component references.
</div><div class="p">
If the schema document does refer to components in the XHTML
namespace, then the schema document <span class="rfc2119">must</span> include an element of the form
<pre xml:space="preserve">&lt;xs:import namespace="http://www.w3.org/1999/xhtml"/&gt;</pre>
(with the possible addtion of a <code>schemaLocation</code> attribute
and annotations). As just described, this explicit import
makes it legitimate to refer to components in the XHTML namespace,
as base type definitions, or from within content models.
</div><div class="p">
No import is needed in order to use XHTML to mark up the text
appearing within <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> elements, since
that usage does not require the schema being constructed to
include components from the XHTML namespace. (As a
practical matter, this saves the processor the effort to
locate a schema for the XHTML namespace.) Importing or
not importing the XHTML namespace in a schema document
has no effect on the validity of XHTML within <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>
elements: elements in the XHTML
namespace (or any other namesapce) are allowed within
<a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> or <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>
element in the schema document, because the schema for
schema documents in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>
declares the type of those elements with a lax wildcard.
Also, importing the namespace affects the schema being
constructed, not the schema used to validate schema
documents. The latter is specified in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
</div></div><div class="note"><div class="p"><b>Note:</b> Different designs for namespace import could of course be
imagined. In particular, declaring a prefix for a namespace could
automatically import that namespace.</div><div class="p">If each use of a foreign namespace within a schema document
implicitly imported that namespace into the schema being
constructed, then using XHTML for documentation would automatically
result in the inclusion of XHTML components in the schema
described by the schema document. The same logic would also
apply to any vocabulary used for documentation. Such automatic import
would lead processors to expend unnecessary extra effort
to find components for the documentation namespace and would in many
cases result in a schema which is not the one intended or desired
by the schema author.
</div><div class="p">Additionally, the requirement that the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>
element be used explicitly provides a modest level of
redundancy that makes it easier to detect some kinds of errors
in the schema document.
</div></div><p>The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
the
<code>namespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> indicates that the containing schema document <span class="rfc2119">may</span> contain
qualified references to schema components in that namespace (via one or more
prefixes declared with namespace declarations in the normal way). If that
attribute is absent, then the import allows unqualified reference to components
with no target namespace.
</p><p>It is a consequence of rules defined elsewhere
that if references to components in a given namespace <var>N</var>
appear in a schema document <var>S</var>,
then <var>S</var> <span class="rfc2119">must</span> contain an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
importing <var>N</var>.
Otherwise, the references will fail to resolve; see
clause <a href="#cl.qnr.nsdeclared" shape="rect">4</a> of
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>.
References in a schema document to foreign namespaces not imported
by that schema document (or otherwise accounted for by
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>) are <em>not</em>
"forward references" in the sense of
<a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
Components (&#167;3.1.3)</a> and are <em>not</em>
handled as if they referred to
"missing components" in the sense of
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
</p><p>
Note that components to be imported need not be in the form of a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> and
need not in particular be declared in the particular schema document identified
by a <code>schemaLocation</code> attribute; the processor
is free to access or construct components using means of its own
choosing, whether or not a <code>schemaLocation</code>
hint is provided.
</p><div class="exampleOuter">
<a name="eg.import.html" id="eg.import.html" shape="rect"></a><div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">The same namespace can be used both as the namespace
of elements and attributes appearing in the schema document,
and in the course of
defining schema components in terms of foreign
components.
The import in this example is necessary because there is a reference to the element
component
<code>xhtml:p</code>.
if there were no component reference, then
the import would be unnecessary; no import is needed for use of a namespace
in a <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>
or similar schema document element or attribute name.</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
targetNamespace="uri:mywork" xmlns:my="uri:mywork"&gt;
&lt;xs:import namespace="http://www.w3.org/1999/xhtml"/&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
&lt;!--* The XHTML 'p' element below requires us to
define a prefix for the XHTML namespace, but it
does NOT require us to import the XHTML
namespace into the schema. The use of XHTML
(or other) markup here is allowed by the lax
wildcard in the schema for schema documents.
*--&gt;
&lt;xhtml:p&gt;[Some documentation for my schema]&lt;/xhtml:p&gt;
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
. . .
&lt;xs:complexType name="myType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xhtml:p" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
. . .
&lt;/xs:complexType&gt;
&lt;xs:element name="myElt" type="my:myType"/&gt;
&lt;/xs:schema&gt;
</pre></div><div class="exampleWrapper">
<div class="p">Since
component references are given as <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QNames<span class="arrow">&#183;</span></a>,
and since the default namespace declaration can
only be used for one of the target namespace and the XSD namespace
(which typically differ, except
in the case of the schema for schema documents),
<em>either</em> internal references to the names being defined in a schema document
<em>or</em> the schema declaration and definition elements themselves
will normally be explicitly qualified.
This example takes the first option &#8212; most other
examples in this specification have taken the second.</div></div></div></div><div class="div4">
<h5><a name="schemaLocationHints" id="schemaLocationHints" shape="rect"></a>4.2.6.2 Providing Hints for Imported Schema Document Locations</h5><p>The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code> attribute, if present on
an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element, gives a hint as to where a
serialization of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> with declarations and definitions for the
imported namespace (or none) can
possibly be found. When no <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, the schema author is leaving the
identification of that schema to the instance, application or user,
via the mechanisms described below in <a href="#composition-instances" shape="rect">Layer 3: Schema Document Access and Web-interoperability (&#167;4.3)</a>. When a
<code>schemaLocation</code> attribute
is present, it <span class="rfc2119">must</span> contain a single URI reference which
the schema author warrants will resolve to a
serialization of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> containing
definitions and declarations of
component(s) in the
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ed namespace.</p><p>Conformance profiles may further
restrict the use of the <code>schemaLocation</code> attribute. For example,
one profile might mandate that the hint be
honored by the schema software, perhaps calling for a
processor-dependent error should the URI fail to resolve,
or mandating that the hint agree with some expected URI value;
another profile might mandate that the hint not
be honored,
etc.
</p><div class="note"><div class="p"><b>Note:</b> Since both the <code>namespace</code> and <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> are optional, a bare <code>&lt;import/&gt;</code> information item
is allowed. This simply allows unqualified reference to foreign
components with no target namespace without giving any hints as to where to find them.</div></div><div class="constraintnote"><a id="src-import" name="src-import" shape="rect"></a><b>Schema Representation Constraint: Import Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
information items by the schema for schema documents
<b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="src-import-noselfimport" name="src-import-noselfimport" shape="rect"> </a>The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> does not match the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>'s <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="clnumber">1.2 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, <b>then </b>the enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> has a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div>
<div class="clnumber">2<a id="c-ims" name="c-ims" shape="rect"> </a><!--* no span class='p' possible here *-->If the application schema reference strategy succeeds using the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of
the <code>schemaLocation</code> and <code>namespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-ivr" name="c-ivr" shape="rect"> </a><span class="p">The result is (a fragment of) a resource which is an XML document
(see clause <a href="#c-vxd" shape="rect">1.1</a>), which in turn corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information item in a well-formed information set, which in turn
corresponds to a conforming schema.</span></div>
<div class="clnumber">2.2<a id="c-ivs" name="c-ivs" shape="rect"> </a><span class="p">The result is a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information item in a well-formed information set, which in turn
corresponds to a conforming schema.</span></div>
</div>
In either case call the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the conforming schema <b>S2</b>.</div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->If <b>D2</b> exists, that is, clause <a href="#c-ivr" shape="rect">2.1</a> or clause <a href="#c-ivs" shape="rect">2.2</a>
above were satisfied, then the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>there is a <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D2</b>.</div><div class="clnumber">3.2 <b>If </b>there is no <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b><b>D2</b>
has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div>
</div>
</div><div class="p">It is <em>not</em> an error for the application schema component reference strategy to fail.
It <em>is</em> an error for it to succeed but
the rest of clause <a href="#c-ims" shape="rect">2</a> above to
fail to be satisfied. Failure is likely to cause
less than complete <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
outcomes, of course.</div><div class="p">The <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> (that is
<a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>, <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>, <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>, <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>, <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>,
<a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>) of a schema
corresponding to a
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item with one or more
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information items <span class="rfc2119">must</span> include not
only definitions or declarations corresponding to the appropriate
members of its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also, for each of those <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information items for which clause <a href="#c-ims" shape="rect">2</a> above is satisfied, a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema
components<span class="arrow">&#183;</span></a> identical to all the <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema
components<span class="arrow">&#183;</span></a> of <b>S2</b>
(with the possible
exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
of <b>S2</b>).</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
multiple <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ing of the same schema document will not constitute a
violation of
clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but
applications are allowed, indeed encouraged, to avoid <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ing the
same schema document more than once to forestall the necessity of
establishing identity component by component. Given that the
<code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is only a hint, it is open
to applications to ignore all but the first <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> for
a given namespace, regardless of the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>schemaLocation</code>, but such a strategy risks
missing useful information when new <code>schemaLocation</code>s are
offered.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#layer2" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="composition-instances" id="composition-instances" shape="rect"></a>4.3 Layer 3: Schema Document Access and Web-interoperability</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1 <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2 <a href="#schema-loc" shape="rect">How schema definitions are located on the Web</a><br clear="none" />
</div><p>Layers 1 and 2 provide a framework for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> and XML definition of schemas in a
broad variety of environments. Over time, it is possible that a range of standards and
conventions will evolve to support
interoperability of XSD implementations on the World Wide Web.
Layer 3 defines the minimum level of function required of all
conformant processors operating on the Web: it is intended that, over
time, future standards (e.g. XML Packages) for interoperability on the
Web and in other environments can be introduced without the need to
republish this specification.</p><div class="div3">
<h4><a name="schema-repr" id="schema-repr" shape="rect"></a>4.3.1 Standards for representation of schemas and retrieval of schema documents on the Web</h4><p>For interoperability, serialized <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, like all other Web
resources, <span class="rfc2119">should</span> be identified by URI and
retrieved using the standard mechanisms of the Web (e.g. http, https,
etc.) Such documents on the Web <span class="rfc2119">must</span> be part of XML documents (see
clause <a href="#c-vxd" shape="rect">1.1</a>), and are represented in the standard XML
schema definition form described by layer 2 (that is as
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items). </p><div class="note"><div class="p"><b>Note:</b> <a name="anchor5167a2" id="anchor5167a2" shape="rect"></a>
there will often be times when a schema document will be a
complete XML document whose document element is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>. There will be
other occasions in which <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> items will be contained in other
documents, perhaps referenced using fragment and/or
<a href="#ref-xpointer" shape="rect">[XPointer]</a> notation.
</div></div><div class="note"><div class="p"><b>Note:</b> The variations among server software and web site administration policies
make it difficult to recommend any particular approach to retrieval requests
intended to retrieve serialized <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>. An <code>Accept</code> header of <code>application/xml,
text/xml; q=0.9, */*</code> is perhaps a reasonable starting point.</div></div></div><div class="div3">
<h4><a name="schema-loc" id="schema-loc" shape="rect"></a>4.3.2 How schema definitions are located on the Web</h4><p>As described in <a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core (&#167;4.1)</a>, processors are responsible for providing the
schema components (definitions and declarations) needed for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. This
section introduces a set of conventions to facilitate interoperability
for instance and schema documents retrieved and processed from the Web.</p><div class="note"><div class="p"><b>Note:</b> As discussed above in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>, other non-Web
mechanisms for delivering schemas for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> exist, but are outside the scope of this
specification.</div></div><div class="block">Processors on the Web are free to undertake <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> against arbitrary
schemas in any of the ways set out in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>. However, it
is useful to have a common convention for determining the schema to use. Accordingly, general-purpose schema-aware processors (i.e. those not
specialized to one or a fixed set of pre-determined schemas)
undertaking <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an instance document on the web
<span class="rfc2119">must</span> behave as follows:
<ul><li><div class="p">unless directed otherwise by the user, <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is undertaken on the document
element information item of the
instance document;</div></li><li><div class="p">unless directed otherwise by the user, the
processor is required to construct a schema corresponding to a schema document
whose <code>targetNamespace</code> is
identical to the
namespace name, if any, of the element information item on which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is undertaken.</div></li></ul>
</div><p>The composition of the complete
schema for use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is discussed in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a> above.
The means used to locate appropriate schema document(s) are processor and
application dependent, subject to the following requirements: </p><ol class="enumar"><li><div class="p">Schemas are represented on the Web in the form specified above in <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web (&#167;4.3.1)</a>;</div></li><li><div class="p">The author of a document uses namespace declarations to
indicate the intended interpretation of names appearing therein;
it is possible but not guaranteed that
a schema is retrievable via
the namespace name. Accordingly whether a processor's default
behavior is or is not to attempt such dereferencing, it <span class="rfc2119">must</span> always
provide for user-directed overriding of that default.
</div><div class="note"><div class="p"><b>Note:</b> Experience suggests that it is not in all cases safe or desirable from
a performance point of view to dereference namespace names as a matter of course. User community and/or
consumer/provider agreements may
establish circumstances in which such dereference is a sensible
default strategy: this specification allows but does not require particular communities to
establish and implement such conventions. Users are always free to supply namespace names as schema location information when dereferencing <em>is</em> desired: see below.</div></div></li><li><div class="p">
On the other hand, in case a document author (human or not) created a
document with a particular schema in view, and warrants that some or
all of the document conforms to that schema, the
<code>xsi:schemaLocation</code>
and <code>xsi:noNamespaceSchemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> are provided. The first records
the author's warrant with pairs of URI references (one for the namespace name, and
one for a hint as to the location of a schema document defining names for that
namespace name). The second similarly provides a URI reference as a hint as to
the location of a schema document with no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="p"> Processors <span class="rfc2119">may</span>
attempt to dereference each schema document location URI in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of such
<code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
Schema processors <span class="rfc2119">should</span> provide an option to
control whether they do so.
It is <em>not</em> an error for such
an attempt to fail, but failure may cause less than complete
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> outcomes.</div><div class="note"><div class="p"><b>Note:</b> Whether schema location information in the document
instance should or should not be dereferenced may vary with
the purpose in view.
</div><div class="p">
When systems rely on an input document being schema-valid
with respect to a particular agreed-upon schema, it is
important that they be able to have complete control over the
choice of schema used in assessment and in particular that
they be able to instruct the processor <em>not</em> to
follow any <code>schemaLocation</code> hints in the input.
Otherwise, the input document could circumvent the agreement
and the consumer's validation of the input, by referring to
an alternative schema for the same namespaces, which declares
the input document schema-valid but which does not adhere to
the prior agreement between the data source and the data
consumer.
</div><div class="p">
In other cases the purpose of assessment may be not to
enforce a prior agreement between data source and consumer,
but to annotate the input with type definitions and other
useful information from the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>. In such cases it will
often be better to follow the <code>schemaLocation</code> hints.
</div><div class="p">
Users who need to exert control over the choice of schema can
normally be expected to be aware of the requirement;
conversely, users unaware of the issue will typically be
those who are not relying on the use of a particular schema
to enforce a specific agreement with the data source. Casual
users will often benefit from a default behavior of following
<code>schemaLocation</code> hints.
</div><div class="p">
Useful guidance on how to present this and other questions to
end users may be found in the W3C's User Agent Accessibility
Guidelines <a href="#UAAG-1.0" shape="rect">[UAAG 1.0]</a>, <a href="#UAAG-2.0" shape="rect">[UAAG 2.0]</a>.
</div></div></li><li><div class="p">
When schema location values (i.e. <code>schemaLocation</code> attributes on
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> in schema documents, or
<code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code>
attributes in instance documents) are dereferenced and the values are relative
references, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base URI]</a> of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a> <span class="rfc2119">must</span> be used to resolve the relative references.
</div></li><li><div class="p"> According to the rules of
<a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core (&#167;4.1)</a>, the corresponding schema <span class="rfc2119">may</span> be lazily assembled, but is otherwise
stable throughout <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Although schema location attributes can occur
on any element, and can be processed incrementally as discovered, their effect
is essentially global to the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Definitions and declarations remain
in effect beyond the scope of the element on which the binding is declared.
</div></li></ol><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">Multiple schema bindings can be declared using a single
attribute. For example consider a stylesheet:</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform
http://www.w3.org/1999/XSL/Transform.xsd
http://www.w3.org/1999/xhtml
http://www.w3.org/1999/xhtml.xsd"&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The namespace names used in <code>schemaLocation</code> can, but need not
be identical to those actually qualifying the element within whose start tag
it is found or its other attributes. For example, as above, all
schema location information can be declared on the document element
of a document, if desired,
regardless of where the namespaces are actually used. </div></div></div><p>Improved or alternative conventions for Web interoperability can
be standardized in the future without reopening this specification. For
example, the W3C is currently considering initiatives to standardize the
packaging of resources relating to particular documents and/or namespaces: this
would be an addition to the mechanisms described here for layer 3. This
architecture also facilitates innovation at layer 2: for example, it would be
possible in the future to define an additional standard for the representation of
schema components which allowed e.g. type definitions to be specified piece by
piece, rather than all at once.</p></div></div></div><div class="div1">
<h2><a name="conformance" id="conformance" shape="rect"></a>5 Schemas and Schema-validity Assessment</h2><p>The architecture of schema-aware processing allows for a rich
characterization of XML documents: schema validity is not a binary
predicate.</p><p>This specification distinguishes between errors in schema
construction and structure, on the one hand, and schema validation
outcomes, on the other.</p><div class="div2">
<h3><span class="nav"> <a href="#validation_outcome" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="conformance-schemaValidity" id="conformance-schemaValidity" shape="rect"></a>5.1 Errors in Schema Construction and Structure</h3><p>Before <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> can be
attempted, a schema is required. Special-purpose applications are
free to determine a schema for use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> by whatever means are
appropriate, but general purpose processors <span class="rfc2119">should</span> implement
and document a strategy for assembling a schema,
exploiting at least some if not all of the non-hard-coded
methods outlined in <a href="#var_schema_con" shape="rect">
Terminology of schema construction
(&#167;C.2)</a>,
starting with the namespaces declared in the document whose
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is being undertaken,
and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the <code>xsi:schemaLocation</code> and
<code>xsi:noNamespaceSchemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
thereof, if any, along with any other information about schema
identity or schema document location provided by users in
application-specific ways, if any.</p><p>It is an error if a schema and all the components which are the
value of any of its properties, recursively, fail to satisfy all
the relevant Constraints on Schemas set out in
the subsections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>.</p><div class="block">If a schema is derived from one or more schema documents (that
is, one or more <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items)
based on the
correspondence rules set out in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
<a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a>, two additional conditions
hold; both apply to the
schema document after the conditional-inclusion
pre-processing described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a>
is performed:
<ul><li><div class="p">It is an error if any such schema document would not be
fully valid with respect to a schema corresponding to the
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>, that is, following
schema-validation with such a schema, the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items would have a
<a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property with value
<b><i>full</i></b> or <b><i>partial</i></b> and a
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property with value
<b><i>valid</i></b>.</div></li><li><div class="p">It is an error if any such schema document is or contains
any element information items which violate any of the
relevant Schema Representation Constraints set out in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a>.</div></li></ul>
</div><p>The cases described above are the only types of error
which this specification defines. With respect to the processes
of the checking of schema structure and the construction of
schemas corresponding to schema documents, this specification
imposes no restrictions on processors in the
presence of errors, beyond the
requirement that if there are errors in a schema, or in one
or more
schema documents used in constructing a schema, then a
conforming processor <span class="rfc2119">must</span> report
the fact.
However, any further
operations performed in the
presence of errors are outside the scope of this specification
and are not <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity
assessment<span class="arrow">&#183;</span></a> as that term is defined here.</p></div><div class="div2">
<h3><span class="nav"><a href="#conformance-schemaValidity" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#conformance-missing" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="validation_outcome" id="validation_outcome" shape="rect"></a>5.2 Assessing Schema-Validity</h3><p>With a schema which satisfies the conditions expressed in <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure (&#167;5.1)</a> above, the schema-validity of an
element or attribute
information item (the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>) can be assessed. Five
primary approaches to this are described
and given names here; conforming processors <span class="rfc2119">may</span> but are not required
to provide interfaces so that they can be invoked in ways consistent
with any or all of these approaches.
</p><div class="block">
<div class="glist"><div class="gitem"><div class="giLabel">type-driven validation</div><div class="giDef"><div class="p">The user or application identifies a type definition from among the type
definitions of the schema. If the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> is an element, then it is validated as described
in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>
(with the stipulated type definition
as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>); if it is an
attribute, then it is validated with respect to that type definition
as described in <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="note"><div class="p"><b>Note:</b> Top-level (named) types <span class="rfc2119">should</span> be supported;
support for local types is optional.</div></div></div></div><div class="gitem"><div class="giLabel"><a name="c-res" id="c-res" shape="rect"></a>element-driven validation</div><div class="giDef"><div class="p">The user or application identifies an element declaration from among the element
declarations of the schema and the
item is validated as described in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> (with
the stipulated element declaration as the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration);</div><div class="note"><div class="p"><b>Note:</b> Top-level elements
<span class="rfc2119">should</span> be supported; support for local elements is optional.</div></div></div></div><div class="gitem"><div class="giLabel">attribute-driven validation</div><div class="giDef"><div class="p">The user or application identifies an attribute declaration from
among the attribute declarations of the schema and the item is validated as described in
<a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a> (with
the stipulated attribute declaration as its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration);</div></div></div><div class="gitem"><div class="giLabel">lax wildcard validation</div><div class="giDef"><div class="p">The processor starts from <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> with
no stipulated declaration or definition. If the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> and the schema determine an
element declaration (by the name of the element), an attribute
declaration (by the name of the attribute), or a type definition (by
<code>xsi:type</code>), then <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strict
validation<span class="arrow">&#183;</span></a> is performed. If they do
not identify any declaration or definition, then
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment
<span class="arrow">&#183;</span></a> is
performed.
<div class="note"><div class="p"><b>Note:</b> The name for this method of
invocation reflects the fact that it is analogous to the validation of
an element information item which matches a <b><i>lax</i></b>
wildcard.</div></div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-strict-wc-mode" id="key-strict-wc-mode" shape="rect"></a>strict wildcard validation</div><div class="giDef"><div class="p">The processor starts from <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> with no
stipulated declaration or definition. If the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
and the schema determine an element declaration (by the name of the element),
an attribute declaration (by the name of the attribute), or a
type definition (via <code>xsi:type</code>), then <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strict<span class="arrow">&#183;</span></a> validation is
performed; if they do not identify any declaration or
definition, then
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment<span class="arrow">&#183;</span></a> is performed.
</div><div class="note"><div class="p"><b>Note:</b> From the point of view of schema-validity assessment and the
resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, lax and strict wildcard validation
produce
the same result.
The distinction is provided in order to provide two different terms
to express the different expectations of the invoking process.
</div><div class="p">
In typical cases strict wildcard validation will be
performed when the invoking process expects the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
to be declared and valid and will otherwise
report an error to its environment. If the absence of
a declaration for the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> counts as a successful
outcome of validation, then it is preferable to use
lax wildcard
validation instead.
</div><div class="p">
The name for this method of invocation
reflects the fact that it is analogous to the
validation of an element information item which matches a
<b><i>strict</i></b> wildcard.
</div></div></div></div></div>
</div><div class="note"><div class="p"><b>Note:</b> For type-, element-, and attribute-driven validation,
there is no requirement that the declaration or definition
identified by the user or application be a top-level
component of the schema. Mechanisms for referring to
other components are out of scope for this specification,
but see <a href="#ref-scds" shape="rect">[XML Schema: Component Designators]</a>.</div></div><p><span class="termdef"><a name="key-vr" id="key-vr" title="" shape="rect">[Definition:]&#160;&#160;</a>The element or attribute information item at which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> begins is called the
<b>validation root</b>.</span></p><p>The outcome of schema-validity
assessment will be manifest in the <span class="anonRef">[validation attempted]</span> and <span class="anonRef">[validity]</span> properties on the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, and if the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
is an element information item then also
on its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, recursively, as
defined by <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a> and <a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute) (&#167;3.2.5.1)</a>. There is no
requirement that input which is not schema-valid be rejected by an
application. It is up to applications to decide what
constitutes a successful outcome of
validation.</p><p>Note that every element and attribute information item
participating in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> will
also have a <span class="anonRef">[validation context]</span>
property which refers back to the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>. </p><div class="note"><div class="p"><b>Note:</b> This specification does not reconstruct the XML notion of
<em>root</em> in either schemas or instances. Equivalent
functionality is provided for at <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
invocation, via <a href="#c-res" shape="rect">element-driven validation</a> above.</div></div><div class="note"><div class="p"><b>Note:</b> This specification has nothing normative to say about multiple
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episodes. It should
however be clear from the above that if a processor restarts <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> with respect to a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> some <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
contributions from the previous <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> are likely
to be overwritten. Restarting can
nonetheless be useful, particularly at a node whose <span class="anonRef">[validation attempted]</span> property is
<b><i>none</i></b>, in which case there are three obvious cases in which
additional useful information could
result:
<ul><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because of a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure, but
declarations and/or definitions are available for at least some of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> or <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>;</div></li><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because a named definition or declaration was missing, but after
further effort the processor has retrieved it.</div></li><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because it was
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>,
but the processor has at least some
declarations and/or definitions available for at least some of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> or <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div></li></ul>
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#validation_outcome" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#conformance-processorResponsibilities" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="conformance-missing" id="conformance-missing" shape="rect"></a>5.3 Missing Sub-components</h3><p>At the beginning of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, attention is drawn to the
fact that most kinds of schema components have properties which are described therein
as having other components, or sets of other components, as values, but that
when components are constructed on the basis of their correspondence with
element information items in schema documents, such properties usually
correspond to <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QNames</a>, and the
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolution<span class="arrow">&#183;</span></a> of such <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QNames</a> can fail, resulting in one or more values of or containing <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> where a component is mandated.</p><p>If at any time during <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, an element or attribute
information item is being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to a component of
any kind any of whose properties has or contains such an <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> value,
the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> is modified,
as following:
</p><div class="block">
<ul><li><div class="p">In the case of
attribute information items, the effect is as if
clause <a href="#c-a1" shape="rect">1</a> of <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> had
failed;</div></li><li><div class="p">In the case of
element information items, the effect is as if
clause <a href="#c-ea" shape="rect">1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> had
failed;</div></li><li><div class="p">In the case of element information items, processors
<span class="rfc2119">must</span> fall back to
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment<span class="arrow">&#183;</span></a>.</div></li></ul>
</div><p>Because of the value specification for <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> in <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>, if this situation ever arises, the
document as a whole cannot show a <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a>
of <b><i>full</i></b>.</p><p>References in a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> to
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-dt" shape="rect">unknown</a>
datatypes, or to
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-dt" shape="rect">unknown</a>
constraining facets, make the
simple type definition unusable in ways similar to
having <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> property values. Often, such references will
result in component properties with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> values, but
not necessarily. In either case they,
and likewise any types derived or constructed from them,
are handled in the same way as described above for components
with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> property values.
</p></div><div class="div2">
<h3><span class="nav"><a href="#conformance-missing" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="conformance-processorResponsibilities" id="conformance-processorResponsibilities" shape="rect"></a>5.4 Responsibilities of Schema-aware Processors</h3><p>Schema-aware processors are responsible for processing XML documents,
schemas and schema documents, as appropriate given the level of conformance
(as defined in <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>) they support,
consistently with the conditions set out above.</p></div></div></div><div class="back"><div class="div1">
<h2><a name="normative-schemaSchema" id="normative-schemaSchema" shape="rect"></a>A Schema for Schema Documents (Structures) (normative)</h2><p>The XML representation of the schema for schema documents is
presented here as a normative part of the specification, and as an
illustrative example of how the XML Schema Definition Language can define itself
using its own constructs. The names of XSD types,
elements, attributes and groups defined here are evocative of their
purpose, but are occasionally verbose. </p><p>There is some annotation in comments, but a fuller annotation will
require the use of embedded documentation facilities or a hyperlinked
external annotation for which tools are not yet readily available.</p><p>Like any other XML document, schema
documents may carry XML and document type declarations. An XML
declaration and a document type declaration are provided here for
convenience. Since this schema document describes the XSD
language, the <code>targetNamespace</code> attribute on the
<code>schema</code> element refers to the XSD namespace
itself.</p><p>
Schema documents conforming to this specification may be in XML
1.0 or XML 1.1. Conforming implementations may accept input in
XML 1.0 or XML 1.1 or both. See <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.
</p><p>
Independent copies of this material are
available in an undated (mutable) version at
<a href="http://www.w3.org/2009/XMLSchema/XMLSchema.xsd" shape="rect">http://www.w3.org/2009/XMLSchema/XMLSchema.xsd</a>
and in a dated (immutable) version at
<a href="http://www.w3.org/2011/07/XMLSchema.xsd" shape="rect">http://www.w3.org/2011/07/XMLSchema.xsd</a>
&#8212; the mutable version will be updated with future revisions of
this specification, and the immutable one will not.
</p><div class="sfsScrap" id="div_sdfsd">
<a id="sdfsd" name="sdfsd" shape="rect"></a>
<div class="sfsHead">Schema for schema documents</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
&lt;!-- provide ID type information even for parsers which only read the
internal subset --&gt;
&lt;!ATTLIST xs:schema id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:extension id ID #IMPLIED&gt;
&lt;!ATTLIST xs:element id ID #IMPLIED&gt;
&lt;!ATTLIST xs:group id ID #IMPLIED&gt;
&lt;!ATTLIST xs:all id ID #IMPLIED&gt;
&lt;!ATTLIST xs:choice id ID #IMPLIED&gt;
&lt;!ATTLIST xs:sequence id ID #IMPLIED&gt;
&lt;!ATTLIST xs:any id ID #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup id ID #IMPLIED&gt;
&lt;!ATTLIST xs:unique id ID #IMPLIED&gt;
&lt;!ATTLIST xs:key id ID #IMPLIED&gt;
&lt;!ATTLIST xs:keyref id ID #IMPLIED&gt;
&lt;!ATTLIST xs:selector id ID #IMPLIED&gt;
&lt;!ATTLIST xs:field id ID #IMPLIED&gt;
&lt;!ATTLIST xs:assert id ID #IMPLIED&gt;
&lt;!ATTLIST xs:include id ID #IMPLIED&gt;
&lt;!ATTLIST xs:import id ID #IMPLIED&gt;
&lt;!ATTLIST xs:redefine id ID #IMPLIED&gt;
&lt;!ATTLIST xs:override id ID #IMPLIED&gt;
&lt;!ATTLIST xs:notation id ID #IMPLIED&gt;
]&gt;
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" xml:lang="EN"
targetNamespace="http://www.w3.org/2001/XMLSchema"
version="structures.xsd (cr-20110721)"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html"&gt;
The schema corresponding to this document is normative,
with respect to the syntactic constraints it expresses in the
XML Schema Definition Language. The documentation (within &amp;lt;documentation&gt; elements)
below, is not normative, but rather highlights important aspects of
the W3C Recommendation of which this is a part.
See below (at the bottom of this document) for information about
the revision and namespace-versioning policy governing this
schema document.
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
The simpleType element and all of its members are defined
in datatypes.xsd&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:include schemaLocation="datatypes.xsd"/&gt;
&lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Get access to the xml: attribute groups for xml:lang
as declared on 'schema' and 'documentation' below
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;/xs:import&gt;
&lt;xs:complexType name="openAttrs"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This type is extended by almost all schema types
to allow attributes from other namespaces to be
added to user schemas.
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:anyType"&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="annotated"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This type is extended by all types which allow annotation
other than &amp;lt;schema&gt; itself
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:openAttrs"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="composition"&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="xs:include"/&gt;
&lt;xs:element ref="xs:import"/&gt;
&lt;xs:element ref="xs:redefine"/&gt;
&lt;xs:element ref="xs:override"/&gt;
&lt;xs:element ref="xs:annotation"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:group name="schemaTop"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This group is for the
elements which occur freely at the top level of schemas.
All of their types are based on the "annotated" type by extension.&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:choice&gt;
&lt;xs:group ref="xs:redefinable"/&gt;
&lt;xs:element ref="xs:element"/&gt;
&lt;xs:element ref="xs:attribute"/&gt;
&lt;xs:element ref="xs:notation"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:group name="redefinable"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This group is for the
elements which can self-redefine (see &amp;lt;redefine&gt; below).&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="xs:simpleType"/&gt;
&lt;xs:element ref="xs:complexType"/&gt;
&lt;xs:element ref="xs:group"/&gt;
&lt;xs:element ref="xs:attributeGroup"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:simpleType name="formChoice"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="qualified"/&gt;
&lt;xs:enumeration value="unqualified"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="reducedDerivationControl"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:derivationControl"&gt;
&lt;xs:enumeration value="extension"/&gt;
&lt;xs:enumeration value="restriction"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="derivationSet"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;
#all or (possibly empty) subset of {extension, restriction}&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:union&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="#all"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType&gt;
&lt;xs:list itemType="xs:reducedDerivationControl"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="typeDerivationControl"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:derivationControl"&gt;
&lt;xs:enumeration value="extension"/&gt;
&lt;xs:enumeration value="restriction"/&gt;
&lt;xs:enumeration value="list"/&gt;
&lt;xs:enumeration value="union"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="fullDerivationSet"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;
#all or (possibly empty) subset of {extension, restriction, list, union}&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:union&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="#all"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType&gt;
&lt;xs:list itemType="xs:typeDerivationControl"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="schema" id="schema"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-schema"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:openAttrs"&gt;
&lt;xs:sequence&gt;
&lt;xs:group ref="xs:composition" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:sequence minOccurs="0"&gt;
&lt;xs:element ref="xs:defaultOpenContent"/&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"
maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:group ref="xs:schemaTop"/&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"
maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="version" type="xs:token"/&gt;
&lt;xs:attribute name="finalDefault" type="xs:fullDerivationSet"
default="" use="optional"/&gt;
&lt;xs:attribute name="blockDefault" type="xs:blockSet" default=""
use="optional"/&gt;
&lt;xs:attribute name="attributeFormDefault" type="xs:formChoice"
default="unqualified" use="optional"/&gt;
&lt;xs:attribute name="elementFormDefault" type="xs:formChoice"
default="unqualified" use="optional"/&gt;
&lt;xs:attribute name="defaultAttributes" type="xs:QName"/&gt;
&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"
default="##local" use="optional"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;xs:attribute ref="xml:lang"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:key name="element"&gt;
&lt;xs:selector xpath="xs:element"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="attribute"&gt;
&lt;xs:selector xpath="xs:attribute"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="type"&gt;
&lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="group"&gt;
&lt;xs:selector xpath="xs:group"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="attributeGroup"&gt;
&lt;xs:selector xpath="xs:attributeGroup"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="notation"&gt;
&lt;xs:selector xpath="xs:notation"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;xs:key name="identityConstraint"&gt;
&lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;
&lt;/xs:element&gt;
&lt;xs:simpleType name="allNNI"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
for maxOccurs&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:union memberTypes="xs:nonNegativeInteger"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="unbounded"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;xs:attributeGroup name="occurs"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
for all particles&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:attribute name="minOccurs" type="xs:nonNegativeInteger" default="1"
use="optional"/&gt;
&lt;xs:attribute name="maxOccurs" type="xs:allNNI" default="1" use="optional"/&gt;
&lt;/xs:attributeGroup&gt;
&lt;xs:attributeGroup name="defRef"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
for element, group and attributeGroup,
which both define and reference&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:attribute name="name" type="xs:NCName"/&gt;
&lt;xs:attribute name="ref" type="xs:QName"/&gt;
&lt;/xs:attributeGroup&gt;
&lt;xs:group name="typeDefParticle"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
'complexType' uses this&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:choice&gt;
&lt;xs:element name="group" type="xs:groupRef"/&gt;
&lt;xs:element ref="xs:all"/&gt;
&lt;xs:element ref="xs:choice"/&gt;
&lt;xs:element ref="xs:sequence"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:group name="nestedParticle"&gt;
&lt;xs:choice&gt;
&lt;xs:element name="element" type="xs:localElement"/&gt;
&lt;xs:element name="group" type="xs:groupRef"/&gt;
&lt;xs:element ref="xs:choice"/&gt;
&lt;xs:element ref="xs:sequence"/&gt;
&lt;xs:element ref="xs:any"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:group name="particle"&gt;
&lt;xs:choice&gt;
&lt;xs:element name="element" type="xs:localElement"/&gt;
&lt;xs:element name="group" type="xs:groupRef"/&gt;
&lt;xs:element ref="xs:all"/&gt;
&lt;xs:element ref="xs:choice"/&gt;
&lt;xs:element ref="xs:sequence"/&gt;
&lt;xs:element ref="xs:any"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:complexType name="attribute"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attributeGroup ref="xs:defRef"/&gt;
&lt;xs:attribute name="type" type="xs:QName"/&gt;
&lt;xs:attribute name="use" default="optional" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="prohibited"/&gt;
&lt;xs:enumeration value="optional"/&gt;
&lt;xs:enumeration value="required"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="default" type="xs:string"/&gt;
&lt;xs:attribute name="fixed" type="xs:string"/&gt;
&lt;xs:attribute name="form" type="xs:formChoice"/&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="topLevelAttribute"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:attribute"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="ref" use="prohibited"/&gt;
&lt;xs:attribute name="form" use="prohibited"/&gt;
&lt;xs:attribute name="use" use="prohibited"/&gt;
&lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="attrDecls"&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element name="attribute" type="xs:attribute"/&gt;
&lt;xs:element name="attributeGroup" type="xs:attributeGroupRef"/&gt;
&lt;/xs:choice&gt;
&lt;xs:element ref="xs:anyAttribute" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:group&gt;
&lt;xs:element name="anyAttribute" id="anyAttribute"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-anyAttribute"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:wildcard"&gt;
&lt;xs:attribute name="notQName" type="xs:qnameListA"
use="optional"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:group name="assertions"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="assert" type="xs:assertion"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:group&gt;
&lt;xs:complexType name="assertion"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="test" type="xs:string"/&gt;
&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="complexTypeModel"&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="xs:simpleContent"/&gt;
&lt;xs:element ref="xs:complexContent"/&gt;
&lt;xs:sequence&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This branch is short for
&amp;lt;complexContent&gt;
&amp;lt;restriction base="xs:anyType"&gt;
...
&amp;lt;/restriction&gt;
&amp;lt;/complexContent&gt;&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
&lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:complexType name="complexType" abstract="true"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:group ref="xs:complexTypeModel"/&gt;
&lt;xs:attribute name="name" type="xs:NCName"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Will be restricted to required or prohibited&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="mixed" type="xs:boolean" use="optional"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Not allowed if simpleContent child is chosen.
May be overridden by setting on complexContent child.&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="abstract" type="xs:boolean" default="false"
use="optional"/&gt;
&lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
&lt;xs:attribute name="block" type="xs:derivationSet"/&gt;
&lt;xs:attribute name="defaultAttributesApply" type="xs:boolean"
default="true" use="optional"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="topLevelComplexType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:complexType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:complexTypeModel"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="localComplexType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:complexType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:complexTypeModel"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" use="prohibited"/&gt;
&lt;xs:attribute name="abstract" use="prohibited"/&gt;
&lt;xs:attribute name="final" use="prohibited"/&gt;
&lt;xs:attribute name="block" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="restrictionType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
&lt;xs:group ref="xs:typeDefParticle"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
&lt;/xs:choice&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="complexRestrictionType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:restrictionType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;This choice is added simply to
make this a valid restriction per the REC&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
&lt;xs:group ref="xs:typeDefParticle"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:choice&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="extensionType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
&lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="complexContent" id="complexContent"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-complexContent"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:choice&gt;
&lt;xs:element name="restriction" type="xs:complexRestrictionType"/&gt;
&lt;xs:element name="extension" type="xs:extensionType"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute name="mixed" type="xs:boolean"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Overrides any setting on complexType parent.&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;/xs:attribute&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="openContent" id="openContent"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-openContent"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="any" minOccurs="0" type="xs:wildcard"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="none"/&gt;
&lt;xs:enumeration value="interleave"/&gt;
&lt;xs:enumeration value="suffix"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="defaultOpenContent" id="defaultOpenContent"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-defaultOpenContent"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="any" type="xs:wildcard"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="appliesToEmpty" type="xs:boolean"
default="false" use="optional"/&gt;
&lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="interleave"/&gt;
&lt;xs:enumeration value="suffix"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="simpleRestrictionType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:restrictionType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;This choice is added simply to
make this a valid restriction per the REC&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
&lt;/xs:choice&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="simpleExtensionType"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:extensionType"&gt;
&lt;xs:sequence&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
No typeDefParticle group reference&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:group ref="xs:assertions"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="simpleContent" id="simpleContent"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-simpleContent"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:choice&gt;
&lt;xs:element name="restriction" type="xs:simpleRestrictionType"/&gt;
&lt;xs:element name="extension" type="xs:simpleExtensionType"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="complexType" type="xs:topLevelComplexType" id="complexType"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-complexType"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:simpleType name="blockSet"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;
#all or (possibly empty) subset of {substitution, extension,
restriction}&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:union&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="#all"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType&gt;
&lt;xs:list&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:derivationControl"&gt;
&lt;xs:enumeration value="extension"/&gt;
&lt;xs:enumeration value="restriction"/&gt;
&lt;xs:enumeration value="substitution"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:list&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;xs:complexType name="element" abstract="true"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
The element element can be used either
at the top level to define an element-type binding globally,
or within a content model to either reference a globally-defined
element or type or declare an element-type binding locally.
The ref form is not allowed at the top level.&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
&lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
&lt;/xs:choice&gt;
&lt;xs:element name="alternative" type="xs:altType"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:group ref="xs:identityConstraint" minOccurs="0"
maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attributeGroup ref="xs:defRef"/&gt;
&lt;xs:attribute name="type" type="xs:QName"/&gt;
&lt;xs:attribute name="substitutionGroup"&gt;
&lt;xs:simpleType&gt;
&lt;xs:list itemType="xs:QName"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attributeGroup ref="xs:occurs"/&gt;
&lt;xs:attribute name="default" type="xs:string"/&gt;
&lt;xs:attribute name="fixed" type="xs:string"/&gt;
&lt;xs:attribute name="nillable" type="xs:boolean" use="optional"/&gt;
&lt;xs:attribute name="abstract" type="xs:boolean" default="false"
use="optional"/&gt;
&lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
&lt;xs:attribute name="block" type="xs:blockSet"/&gt;
&lt;xs:attribute name="form" type="xs:formChoice"/&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="topLevelElement"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:element"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
&lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
&lt;/xs:choice&gt;
&lt;xs:element name="alternative" type="xs:altType"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:group ref="xs:identityConstraint" minOccurs="0"
maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="ref" use="prohibited"/&gt;
&lt;xs:attribute name="form" use="prohibited"/&gt;
&lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;
&lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
&lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="localElement"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:element"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
&lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
&lt;/xs:choice&gt;
&lt;xs:element name="alternative" type="xs:altType"
minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:group ref="xs:identityConstraint" minOccurs="0"
maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="substitutionGroup" use="prohibited"/&gt;
&lt;xs:attribute name="final" use="prohibited"/&gt;
&lt;xs:attribute name="abstract" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="element" type="xs:topLevelElement" id="element"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-element"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="altType"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
This type is used for 'alternative' elements.
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:choice minOccurs="0"&gt;
&lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
&lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute name="test" type="xs:string" use="optional"/&gt;
&lt;xs:attribute name="type" type="xs:QName" use="optional"/&gt;
&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="group" abstract="true"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
group type for explicit groups, named top-level groups and
group references&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;xs:attributeGroup ref="xs:defRef"/&gt;
&lt;xs:attributeGroup ref="xs:occurs"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="realGroup"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:group"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0" maxOccurs="1"&gt;
&lt;xs:element ref="xs:all"/&gt;
&lt;xs:element ref="xs:choice"/&gt;
&lt;xs:element ref="xs:sequence"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="namedGroup"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:realGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="1" maxOccurs="1"&gt;
&lt;xs:element name="all"&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:all"&gt;
&lt;xs:group ref="xs:allModel"/&gt;
&lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
&lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="choice" type="xs:simpleExplicitGroup"/&gt;
&lt;xs:element name="sequence" type="xs:simpleExplicitGroup"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:attribute name="ref" use="prohibited"/&gt;
&lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
&lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="groupRef"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:realGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
&lt;xs:attribute name="name" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="explicitGroup"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
group type for the three kinds of group&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:group"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" use="prohibited"/&gt;
&lt;xs:attribute name="ref" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="simpleExplicitGroup"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:explicitGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
&lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="allModel"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;This choice with min/max is here to
avoid a pblm with the Elt:All/Choice/Seq
Particle derivation constraint&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:element name="element" type="xs:localElement"/&gt;
&lt;xs:element ref="xs:any"/&gt;
&lt;xs:element name="group"&gt;<a name="anchor11092" id="anchor11092" shape="rect"></a>
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:groupRef"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="minOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
&lt;xs:attribute name="maxOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;/xs:group&gt;
&lt;xs:complexType name="all"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Only elements allowed inside&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:explicitGroup"&gt;
&lt;xs:group ref="xs:allModel"/&gt;
&lt;xs:attribute name="minOccurs" default="1" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:nonNegativeInteger"&gt;
&lt;xs:enumeration value="0"/&gt;
&lt;xs:enumeration value="1"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="maxOccurs" default="1" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:allNNI"&gt;
&lt;xs:enumeration value="0"/&gt;
&lt;xs:enumeration value="1"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="all" type="xs:all" id="all"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-all"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="choice" type="xs:explicitGroup" id="choice"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-choice"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="sequence" type="xs:explicitGroup" id="sequence"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-sequence"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="group" type="xs:namedGroup" id="group"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-group"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:attributeGroup name="anyAttrGroup"&gt;
&lt;xs:attribute name="namespace" type="xs:namespaceList"
use="optional"/&gt;
&lt;xs:attribute name="notNamespace" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:basicNamespaceList"&gt;
&lt;xs:minLength value="1"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="processContents" default="strict" use="optional"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:NMTOKEN"&gt;
&lt;xs:enumeration value="skip"/&gt;
&lt;xs:enumeration value="lax"/&gt;
&lt;xs:enumeration value="strict"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;/xs:attributeGroup&gt;
&lt;xs:complexType name="wildcard"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attributeGroup ref="xs:anyAttrGroup"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="any" id="any"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-any"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:wildcard"&gt;
&lt;xs:attribute name="notQName" type="xs:qnameList"
use="optional"/&gt;
&lt;xs:attributeGroup ref="xs:occurs"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
simple type for the value of the 'namespace' attr of
'any' and 'anyAttribute'&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Value is
##any - - any non-conflicting WFXML/attribute at all
##other - - any non-conflicting WFXML/attribute from
namespace other than targetNS
##local - - any unqualified non-conflicting WFXML/attribute
one or - - any non-conflicting WFXML/attribute from
more URI the listed namespaces
references
(space separated)
##targetNamespace or ##local may appear in the above list, to
refer to the targetNamespace of the enclosing
schema or an absent targetNamespace respectively&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:simpleType name="namespaceList"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:union memberTypes="xs:specialNamespaceList xs:basicNamespaceList" /&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="basicNamespaceList"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:list&gt;
&lt;xs:simpleType&gt;
&lt;xs:union memberTypes="xs:anyURI"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="##targetNamespace"/&gt;
&lt;xs:enumeration value="##local"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:list&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="specialNamespaceList"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="##any"/&gt;
&lt;xs:enumeration value="##other"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="qnameList"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:list&gt;
&lt;xs:simpleType&gt;
&lt;xs:union memberTypes="xs:QName"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="##defined"/&gt;
&lt;xs:enumeration value="##definedSibling"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:list&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="qnameListA"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:list&gt;
&lt;xs:simpleType&gt;
&lt;xs:union memberTypes="xs:QName"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="##defined"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:list&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="xpathDefaultNamespace"&gt;
&lt;xs:union memberTypes="xs:anyURI"&gt;
&lt;xs:simpleType&gt;
&lt;xs:restriction base="xs:token"&gt;
&lt;xs:enumeration value="##defaultNamespace"/&gt;
&lt;xs:enumeration value="##targetNamespace"/&gt;
&lt;xs:enumeration value="##local"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:union&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="attribute" type="xs:topLevelAttribute" id="attribute"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-attribute"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="attributeGroup" abstract="true"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;xs:attributeGroup ref="xs:defRef"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="namedAttributeGroup"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:attributeGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:attrDecls"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:attribute name="ref" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="attributeGroupRef"&gt;
&lt;xs:complexContent&gt;
&lt;xs:restriction base="xs:attributeGroup"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
&lt;xs:attribute name="name" use="prohibited"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:restriction&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="attributeGroup" type="xs:namedAttributeGroup"
id="attributeGroup"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-attributeGroup"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="include" id="include"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-include"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="redefine" id="redefine"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-redefine"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:openAttrs"&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element ref="xs:annotation"/&gt;
&lt;xs:group ref="xs:redefinable"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="override" id="override"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-override"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:openAttrs"&gt;
&lt;xs:sequence&gt;
&lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
&lt;xs:group ref="xs:schemaTop" minOccurs="0" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="import" id="import"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-import"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="namespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="schemaLocation" type="xs:anyURI"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="selector" id="selector"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-selector"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="xpath" use="required"&gt;
&lt;xs:simpleType&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;A subset of XPath expressions for use
in selectors&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:token"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="field" id="field"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-field"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="xpath" use="required"&gt;
&lt;xs:simpleType&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;A subset of XPath expressions for use
in fields&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:token"/&gt;
&lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="keybase"&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:sequence minOccurs="0"&gt;
&lt;xs:element ref="xs:selector"/&gt;
&lt;xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="name" type="xs:NCName"/&gt;
&lt;xs:attribute name="ref" type="xs:QName"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="identityConstraint"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;The three kinds of identity constraints, all with
type of or derived from 'keybase'.
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:choice&gt;
&lt;xs:element ref="xs:unique"/&gt;
&lt;xs:element ref="xs:key"/&gt;
&lt;xs:element ref="xs:keyref"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:group&gt;
&lt;xs:element name="unique" type="xs:keybase" id="unique"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-unique"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="key" type="xs:keybase" id="key"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-key"/&gt;
&lt;/xs:annotation&gt;
&lt;/xs:element&gt;
&lt;xs:element name="keyref" id="keyref"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-keyref"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:keybase"&gt;
&lt;xs:attribute name="refer" type="xs:QName"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="notation" id="notation"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-notation"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:annotated"&gt;
&lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
&lt;xs:attribute name="public" type="xs:public"/&gt;
&lt;xs:attribute name="system" type="xs:anyURI"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:simpleType name="public"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
A utility type, not for public use&lt;/xs:documentation&gt;
&lt;xs:documentation&gt;
A public identifier, per ISO 8879&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:restriction base="xs:token"/&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="appinfo" id="appinfo"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-appinfo"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType mixed="true"&gt;
&lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:any processContents="lax"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="source" type="xs:anyURI"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="documentation" id="documentation"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-documentation"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType mixed="true"&gt;
&lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:any processContents="lax"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="source" type="xs:anyURI"/&gt;
&lt;xs:attribute ref="xml:lang"/&gt;
&lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:element name="annotation" id="annotation"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation
source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation"/&gt;
&lt;/xs:annotation&gt;
&lt;xs:complexType&gt;
&lt;xs:complexContent&gt;
&lt;xs:extension base="xs:openAttrs"&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element ref="xs:appinfo"/&gt;
&lt;xs:element ref="xs:documentation"/&gt;
&lt;/xs:choice&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;/xs:extension&gt;
&lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
notations for use within schema documents&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:notation name="XMLSchemaStructures" public="structures"
system="http://www.w3.org/2000/08/XMLSchema.xsd"/&gt;
&lt;xs:notation name="XML" public="REC-xml-19980210"
system="http://www.w3.org/TR/1998/REC-xml-19980210"/&gt;
&lt;xs:complexType name="anyType" mixed="true"&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
Not the real urType, but as close an approximation as we can
get in the XML representation&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;xs:sequence&gt;
&lt;xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
&lt;/xs:sequence&gt;
&lt;xs:anyAttribute processContents="lax"/&gt;
&lt;/xs:complexType&gt;
&lt;xs:annotation&gt;
&lt;xs:documentation&gt;
In keeping with the XML Schema WG's standard versioning policy,
this schema document will persist at the URI
http://www.w3.org/2011/07/XMLSchema.xsd.
At the date of issue it can also be found at the URI
http://www.w3.org/2009/XMLSchema/XMLSchema.xsd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XSD
and its namespace. In other words, if XSD or the XML Schema
namespace change, the version of this document at
http://www.w3.org/2009/XMLSchema/XMLSchema.xsd will change accordingly;
the version at http://www.w3.org/2011/07/XMLSchema.xsd will not change.
Previous dated (and unchanging) versions of this schema document
include:
http://www.w3.org/2009/04/XMLSchema.xsd
(XSD 1.1 Candidate Recommendation)
http://www.w3.org/2004/10/XMLSchema.xsd
(XSD 1.0 Recommendation, Second Edition)
http://www.w3.org/2001/05/XMLSchema.xsd
(XSD 1.0 Recommendation, First Edition)
&lt;/xs:documentation&gt;
&lt;/xs:annotation&gt;
&lt;/xs:schema&gt;
</pre></div></div></div><div class="div1">
<h2><a name="outcomes" id="outcomes" shape="rect"></a>B Outcome Tabulations (normative)</h2><p>To facilitate consistent reporting of schema errors and <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>
failures, this section tabulates and provides unique names for all the
constraints listed in this document. Wherever such constraints have numbered
parts, reports <span class="rfc2119">should</span>
use the name given below plus the part number, separated
by a period ('.'). Thus for example <code>cos-ct-extends.1.2</code>
<span class="rfc2119">should</span> be
used to report a violation of the clause <a href="#c-cte" shape="rect">1.2</a> of
<a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>.</p>
<h3><span class="nav"> <a href="#PSVI_contributions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="validation_failures" id="validation_failures" shape="rect"></a>B.1 Validation Rules</h3><p></p><dl><dt>cvc-accept</dt><dd><a href="#cvc-accept" shape="rect">Element Sequence Accepted (Particle)</a></dd><dt>cvc-assertion</dt><dd><a href="#cvc-assertion" shape="rect">Assertion Satisfied</a></dd><dt>cvc-assertions-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-assertions-valid" shape="rect">Assertions Valid</a></dd><dt>cvc-assess-attr</dt><dd><a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute)</a></dd><dt>cvc-assess-elt</dt><dd><a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element)</a></dd><dt>cvc-attribute</dt><dd><a href="#cvc-attribute" shape="rect">Attribute Locally Valid</a></dd><dt>cvc-au</dt><dd><a href="#cvc-au" shape="rect">Attribute Locally Valid (Use)</a></dd><dt>cvc-complex-content</dt><dd><a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content)</a></dd><dt>cvc-complex-type</dt><dd><a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type)</a></dd><dt>cvc-datatype-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype Valid</a></dd><dt>cvc-elt</dt><dd><a href="#cvc-elt" shape="rect">Element Locally Valid (Element)</a></dd><dt>cvc-enumeration-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-enumeration-valid" shape="rect">enumeration valid</a></dd><dt>cvc-explicitTimezone-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-explicitTimezone-valid" shape="rect">explicitOffset Valid</a></dd><dt>cvc-facet-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-facet-valid" shape="rect">Facet Valid</a></dd><dt>cvc-fractionDigits-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-fractionDigits-valid" shape="rect">fractionDigits Valid</a></dd><dt>cvc-id</dt><dd><a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF)</a></dd><dt>cvc-identity-constraint</dt><dd><a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied</a></dd><dt>cvc-length-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-length-valid" shape="rect">Length Valid</a></dd><dt>cvc-maxExclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxExclusive-valid" shape="rect">maxExclusive Valid</a></dd><dt>cvc-maxInclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxInclusive-valid" shape="rect">maxInclusive Valid</a></dd><dt>cvc-maxLength-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxLength-valid" shape="rect">maxLength Valid</a></dd><dt>cvc-minExclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minExclusive-valid" shape="rect">minExclusive Valid</a></dd><dt>cvc-minInclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minInclusive-valid" shape="rect">minInclusive Valid</a></dd><dt>cvc-minLength-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minLength-valid" shape="rect">minLength Valid</a></dd><dt>cvc-model-group</dt><dd><a href="#cvc-model-group" shape="rect">Element Sequence Valid</a></dd><dt>cvc-particle</dt><dd><a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle)</a></dd><dt>cvc-pattern-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-pattern-valid" shape="rect">pattern valid</a></dd><dt>cvc-resolve-instance</dt><dd><a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance)</a></dd><dt>cvc-simple-type</dt><dd><a href="#cvc-simple-type" shape="rect">String Valid</a></dd><dt>cvc-totalDigits-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-totalDigits-valid" shape="rect">totalDigits Valid</a></dd><dt>cvc-type</dt><dd><a href="#cvc-type" shape="rect">Element Locally Valid (Type)</a></dd><dt>cvc-wildcard</dt><dd><a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard)</a></dd><dt>cvc-wildcard-name</dt><dd><a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name</a></dd><dt>cvc-wildcard-namespace</dt><dd><a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name</a></dd><dt>cvc-xpath</dt><dd><a href="#cvc-xpath" shape="rect">XPath Evaluation</a></dd></dl>
<h3><span class="nav"><a href="#validation_failures" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#outcome-src" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="PSVI_contributions" id="PSVI_contributions" shape="rect"></a>B.2 Contributions to the post-schema-validation infoset</h3><dl><dt>ID/IDREF binding information item properties</dt><dd><a href="#iib-binding" shape="rect">[binding]</a>
(<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
<br clear="none" /><a href="#iib-id" shape="rect">[id]</a>
(<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
<br clear="none" /></dd><dt>Identity-constraint Binding information item properties</dt><dd><a href="#cb-definition" shape="rect">[definition]</a>
(<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
<br clear="none" /><a href="#cb-node_table" shape="rect">[node table]</a>
(<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
<br clear="none" /></dd><dt>attribute information item properties</dt><dd><a href="#a-attribution" shape="rect">[attribute attribution]</a>
(<a href="#sic-match-info" shape="rect">Match Information</a>)
<br clear="none" /><a href="#a-declaration" shape="rect">[attribute declaration]</a>
(<a href="#sic-attr-decl" shape="rect">Attribute Declaration</a>)
<br clear="none" /><a href="#a-match_info" shape="rect">[match information]</a>
(<a href="#sic-match-info" shape="rect">Match Information</a>)
<br clear="none" /><a href="#a-member_type_definition" shape="rect">[member type definition]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-member_type_definition_anonymous" shape="rect">[member type definition anonymous]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-member_type_definition_name" shape="rect">[member type definition name]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-member_type_definition_namespace" shape="rect">[member type definition namespace]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-member_type_definitions" shape="rect">[member type definitions]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-schema_actual_value" shape="rect">[schema actual value]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-schema_default" shape="rect">[schema default]</a>
(<a href="#sic-attr-decl" shape="rect">Attribute Declaration</a>)
<br clear="none" /><a href="#a-schema_error_code" shape="rect">[schema error code]</a>
(<a href="#sic-attr-error-code" shape="rect">Validation Failure (Attribute)</a>)
<br clear="none" /><a href="#a-schema_normalized_value" shape="rect">[schema normalized value]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-schema_specified" shape="rect">[schema specified]</a>
(<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
<br clear="none" /><a href="#a-type_definition" shape="rect">[type definition]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-type_definition_anonymous" shape="rect">[type definition anonymous]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-type_definition_name" shape="rect">[type definition name]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-type_definition_namespace" shape="rect">[type definition namespace]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-type_definition_type" shape="rect">[type definition type]</a>
(<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
<br clear="none" /><a href="#a-validation_attempted" shape="rect">[validation attempted]</a>
(<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
<br clear="none" /><a href="#a-validation_context" shape="rect">[validation context]</a>
(<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
<br clear="none" /><a href="#a-validity" shape="rect">[validity]</a>
(<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
<br clear="none" /></dd><dt>element information item properties</dt><dd><a href="#e-ii_table" shape="rect">[ID/IDREF table]</a>
(<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
<br clear="none" /><a href="#e-declared_type" shape="rect">[declared type]</a>
(<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
<br clear="none" /><a href="#e-descendent_validity" shape="rect">[descendent validity]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-attribution" shape="rect">[element attribution]</a>
(<a href="#sic-match-info" shape="rect">Match Information</a>)
<br clear="none" /><a href="#e-declaration" shape="rect">[element declaration]</a>
(<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
<br clear="none" /><a href="#e-expected-ed" shape="rect">[expected element declaration]</a>
(<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
<br clear="none" /><a href="#e-assertions" shape="rect">[failed assertions]</a>
(<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
<br clear="none" /><a href="#e-idcs" shape="rect">[failed identity constraints]</a>
(<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
<br clear="none" /><a href="#e-id_constraint_table" shape="rect">[identity-constraint table]</a>
(<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
<br clear="none" /><a href="#e-inherited_attributes" shape="rect">[inherited attributes]</a>
(<a href="#sic-inheritedAttrs" shape="rect">Inherited Attributes</a>)
<br clear="none" /><a href="#e-local_elem_validity" shape="rect">[local element validity]</a>
(<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
<br clear="none" /><a href="#e-local_type_validity" shape="rect">[local type validity]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-match_info" shape="rect">[match information]</a>
(<a href="#sic-match-info" shape="rect">Match Information</a>)
<br clear="none" /><a href="#e-member_type_definition" shape="rect">[member type definition]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-member_type_definition_anonymous" shape="rect">[member type definition anonymous]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-member_type_definition_name" shape="rect">[member type definition name]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-member_type_definition_namespace" shape="rect">[member type definition namespace]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-member_type_definitions" shape="rect">[member type definitions]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-nil" shape="rect">[nil]</a>
(<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
<br clear="none" /><a href="#e-notation" shape="rect">[notation]</a>
(<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
<br clear="none" /><a href="#e-notation_public" shape="rect">[notation public]</a>
(<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
<br clear="none" /><a href="#e-notation_system" shape="rect">[notation system]</a>
(<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
<br clear="none" /><a href="#e-schema_actual_value" shape="rect">[schema actual value]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-schema_default" shape="rect">[schema default]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-schema_error_code" shape="rect">[schema error code]</a>
(<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
<br clear="none" /><a href="#e-schema_normalized_value" shape="rect">[schema normalized value]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-schema_specified" shape="rect">[schema specified]</a>
(<a href="#sic-eltDefault" shape="rect">Element Default Value</a>)
<br clear="none" /><a href="#e-subsequence_valid" shape="rect">[subsequence-valid]</a>
(<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
<br clear="none" /><a href="#e-type_alternative" shape="rect">[type alternative]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_definition" shape="rect">[type definition]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_definition_type" shape="rect">[type definition type]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_definition_anonymous" shape="rect">[type definition anonymous]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_definition_name" shape="rect">[type definition name]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_definition_namespace" shape="rect">[type definition namespace]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-type_fallback" shape="rect">[type fallback]</a>
(<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
<br clear="none" /><a href="#e-validation_attempted" shape="rect">[validation attempted]</a>
(<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
<br clear="none" /><a href="#e-validation_context" shape="rect">[validation context]</a>
(<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
<br clear="none" /><a href="#e-validity" shape="rect">[validity]</a>
(<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
<br clear="none" /></dd><dt>element or attribute information item properties</dt><dd><a href="#e-schema_information" shape="rect">[schema information]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /></dd><dt>namespace schema information information item properties</dt><dd><a href="#nsi-schema_components" shape="rect">[schema components]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /><a href="#nsi-schema_documents" shape="rect">[schema documents]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /><a href="#nsi-schema_namespace" shape="rect">[schema namespace]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /></dd><dt>schema document information item properties</dt><dd><a href="#sd-document" shape="rect">[document]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /><a href="#sd-document_location" shape="rect">[document location]</a>
(<a href="#sic-schema" shape="rect">Schema Information</a>)
<br clear="none" /></dd></dl>
<h3><span class="nav"><a href="#PSVI_contributions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#outcome-cos" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="outcome-src" id="outcome-src" shape="rect"></a>B.3 Schema Representation Constraints</h3><p></p><dl><dt>src-attribute</dt><dd><a href="#src-attribute" shape="rect">Attribute Declaration Representation OK</a></dd><dt>src-attribute_group</dt><dd><a href="#src-attribute_group" shape="rect">Attribute Group Definition Representation OK</a></dd><dt>src-cip</dt><dd><a href="#src-cip" shape="rect">Conditional Inclusion Constraints</a></dd><dt>src-ct</dt><dd><a href="#src-ct" shape="rect">Complex Type Definition Representation OK</a></dd><dt>src-element</dt><dd><a href="#src-element" shape="rect">Element Declaration Representation OK</a></dd><dt>src-enumeration-value</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-enumeration-value" shape="rect">Enumeration value</a></dd><dt>src-expredef</dt><dd><a href="#src-expredef" shape="rect">Individual Component Redefinition</a></dd><dt>src-identity-constraint</dt><dd><a href="#src-identity-constraint" shape="rect">Identity-constraint Definition Representation OK</a></dd><dt>src-import</dt><dd><a href="#src-import" shape="rect">Import Constraints and Semantics</a></dd><dt>src-include</dt><dd><a href="#src-include" shape="rect">Inclusion Constraints and Semantics</a></dd><dt>src-list-itemType-or-simpleType</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-list-itemType-or-simpleType" shape="rect">itemType attribute or simpleType child</a></dd><dt>src-override</dt><dd><a href="#src-override" shape="rect">Override Constraints and Semantics</a></dd><dt>src-pattern-value</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-pattern-value" shape="rect">Pattern value</a></dd><dt>src-redefine</dt><dd><a href="#src-redefine" shape="rect">Redefinition Constraints and Semantics</a></dd><dt>src-resolve</dt><dd><a href="#src-resolve" shape="rect">QName resolution (Schema Document)</a></dd><dt>src-restriction-base-or-simpleType</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-restriction-base-or-simpleType" shape="rect">base attribute or simpleType child</a></dd><dt>src-simple-type</dt><dd><a href="#src-simple-type" shape="rect">Simple Type Definition Representation OK</a></dd><dt>src-ta</dt><dd><a href="#src-ta" shape="rect">Type
Alternative Representation OK</a></dd><dt>src-union-memberTypes-or-simpleTypes</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-union-memberTypes-or-simpleTypes" shape="rect">memberTypes attribute or simpleType children</a></dd><dt>src-wildcard</dt><dd><a href="#src-wildcard" shape="rect">Wildcard Representation OK</a></dd></dl>
<h3><span class="nav"><a href="#outcome-src" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="outcome-cos" id="outcome-cos" shape="rect"></a>B.4 Schema Component Constraints</h3><dl><dt>a-props-correct</dt><dd><a href="#a-props-correct" shape="rect">Attribute Declaration Properties Correct</a></dd><dt>ag-props-correct</dt><dd><a href="#ag-props-correct" shape="rect">Attribute Group Definition Properties Correct</a></dd><dt>an-props-correct</dt><dd><a href="#an-props-correct" shape="rect">Annotation Correct</a></dd><dt>as-props-correct</dt><dd><a href="#as-props-correct" shape="rect">Assertion Properties Correct</a></dd><dt>au-props-correct</dt><dd><a href="#au-props-correct" shape="rect">Attribute Use Correct</a></dd><dt>c-fields-xpaths</dt><dd><a href="#c-fields-xpaths" shape="rect">Fields Value OK</a></dd><dt>c-props-correct</dt><dd><a href="#c-props-correct" shape="rect">Identity-constraint Definition Properties Correct</a></dd><dt>c-selector-xpath</dt><dd><a href="#c-selector-xpath" shape="rect">Selector Value OK</a></dd><dt>cos-all-limited</dt><dd><a href="#cos-all-limited" shape="rect">All Group Limited</a></dd><dt>cos-applicable-facets</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable Facets</a></dd><dt>cos-assertions-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-assertions-restriction" shape="rect">Valid restriction of assertions</a></dd><dt>cos-aw-intersect</dt><dd><a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection</a></dd><dt>cos-aw-union</dt><dd><a href="#cos-aw-union" shape="rect">Attribute Wildcard Union</a></dd><dt>cos-choice-range</dt><dd><a href="#cos-choice-range" shape="rect">Effective Total Range (choice)</a></dd><dt>cos-content-act-restrict</dt><dd><a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content)</a></dd><dt>cos-ct-derived-ok</dt><dd><a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex)</a></dd><dt>cos-ct-extends</dt><dd><a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension)</a></dd><dt>cos-element-consistent</dt><dd><a href="#cos-element-consistent" shape="rect">Element Declarations Consistent</a></dd><dt>cos-equiv-derived-ok-rec</dt><dd><a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive)</a></dd><dt>cos-group-emptiable</dt><dd><a href="#cos-group-emptiable" shape="rect">Particle Emptiable</a></dd><dt>cos-nonambig</dt><dd><a href="#cos-nonambig" shape="rect">Unique Particle Attribution</a></dd><dt>cos-ns-subset</dt><dd><a href="#cos-ns-subset" shape="rect">Wildcard Subset</a></dd><dt>cos-particle-extend</dt><dd><a href="#cos-particle-extend" shape="rect">Particle Valid (Extension)</a></dd><dt>cos-pattern-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-pattern-restriction" shape="rect">Valid restriction of pattern</a></dd><dt>cos-seq-range</dt><dd><a href="#cos-seq-range" shape="rect">Effective Total Range (all and sequence)</a></dd><dt>cos-st-derived-ok</dt><dd><a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple)</a></dd><dt>cos-st-restricts</dt><dd><a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple)</a></dd><dt>cos-valid-default</dt><dd><a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate)</a></dd><dt>cos-valid-simple-default</dt><dd><a href="#cos-valid-simple-default" shape="rect">Simple Default Valid</a></dd><dt>ct-props-correct</dt><dd><a href="#ct-props-correct" shape="rect">Complex Type Definition Properties Correct</a></dd><dt>derivation-ok-restriction</dt><dd><a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex)</a></dd><dt>e-props-correct</dt><dd><a href="#e-props-correct" shape="rect">Element Declaration Properties Correct</a></dd><dt>enumeration-required-notation</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#enumeration-required-notation" shape="rect">enumeration facet value required for NOTATION</a></dd><dt>enumeration-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#enumeration-valid-restriction" shape="rect">enumeration valid restriction</a></dd><dt>fractionDigits-totalDigits</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#fractionDigits-totalDigits" shape="rect">fractionDigits less than or equal to totalDigits</a></dd><dt>fractionDigits-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#fractionDigits-valid-restriction" shape="rect">fractionDigits valid restriction</a></dd><dt>length-minLength-maxLength</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#length-minLength-maxLength" shape="rect">length and minLength or maxLength</a></dd><dt>length-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#length-valid-restriction" shape="rect">length valid restriction</a></dd><dt>maxExclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxExclusive-valid-restriction" shape="rect">maxExclusive valid restriction</a></dd><dt>maxInclusive-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxInclusive-maxExclusive" shape="rect">maxInclusive and maxExclusive</a></dd><dt>maxInclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxInclusive-valid-restriction" shape="rect">maxInclusive valid restriction</a></dd><dt>maxLength-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxLength-valid-restriction" shape="rect">maxLength valid restriction</a></dd><dt>mg-props-correct</dt><dd><a href="#mg-props-correct" shape="rect">Model Group Correct</a></dd><dt>mgd-props-correct</dt><dd><a href="#mgd-props-correct" shape="rect">Model Group Definition Properties Correct</a></dd><dt>minExclusive-less-than-equal-to-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-less-than-equal-to-maxExclusive" shape="rect">minExclusive &lt;= maxExclusive</a></dd><dt>minExclusive-less-than-maxInclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-less-than-maxInclusive" shape="rect">minExclusive &lt; maxInclusive</a></dd><dt>minExclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-valid-restriction" shape="rect">minExclusive valid restriction</a></dd><dt>minInclusive-less-than-equal-to-maxInclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-less-than-equal-to-maxInclusive" shape="rect">minInclusive &lt;= maxInclusive</a></dd><dt>minInclusive-less-than-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-less-than-maxExclusive" shape="rect">minInclusive &lt; maxExclusive</a></dd><dt>minInclusive-minExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-minExclusive" shape="rect">minInclusive and minExclusive</a></dd><dt>minInclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-valid-restriction" shape="rect">minInclusive valid restriction</a></dd><dt>minLength-less-than-equal-to-maxLength</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minLength-less-than-equal-to-maxLength" shape="rect">minLength &lt;= maxLength</a></dd><dt>minLength-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minLength-valid-restriction" shape="rect">minLength valid restriction</a></dd><dt>n-props-correct</dt><dd><a href="#n-props-correct" shape="rect">Notation Declaration Correct</a></dd><dt>no-xmlns</dt><dd><a href="#no-xmlns" shape="rect">xmlns Not Allowed</a></dd><dt>no-xsi</dt><dd><a href="#no-xsi" shape="rect">xsi: Not Allowed</a></dd><dt>p-props-correct</dt><dd><a href="#p-props-correct" shape="rect">Particle Correct</a></dd><dt>sch-props-correct</dt><dd><a href="#sch-props-correct" shape="rect">Schema Properties Correct</a></dd><dt>st-props-correct</dt><dd><a href="#st-props-correct" shape="rect">Simple Type Definition Properties Correct</a></dd><dt>st-restrict-facets</dt><dd><a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets)</a></dd><dt>ta-props-correct</dt><dd><a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct</a></dd><dt>timezone-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#timezone-valid-restriction" shape="rect">timezone valid restriction</a></dd><dt>totalDigits-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#totalDigits-valid-restriction" shape="rect">totalDigits valid restriction</a></dd><dt>w-props-correct</dt><dd><a href="#w-props-correct" shape="rect">Wildcard Properties Correct</a></dd><dt>whiteSpace-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#whiteSpace-valid-restriction" shape="rect">whiteSpace valid restriction</a></dd><dt>xpath-valid</dt><dd><a href="#xpath-valid" shape="rect">XPath Valid</a></dd></dl></div><div class="div1">
<h2><a name="var_terminology" id="var_terminology" shape="rect"></a>C Terminology for implementation-defined features (normative)</h2><p>This section defines some terms for use in describing
choices made by implementations in areas where the
effect of XSD
features is explicitly <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>Future versions of this specification are expected to use
the terminology defined here to specify conformance profiles.
Conformance profiles may also be defined by other specifications
without requiring any revision to this specification.</p><div class="div2">
<h3><span class="nav"> <a href="#var_schema_con" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="var_psvi" id="var_psvi" shape="rect"></a>C.1 Subset of the Post-schema-validation Infoset</h3><p>This specification defines a number of ways in which the
information set taken as input is augmented in the course
of schema-validity assessment. Conforming processors <span class="rfc2119">may</span>
provide access to some or all of this information; in the
interests of simplifying discussion and documentation, this
section defines names for several subsets of the PSVI, with
the intention of simplifying short-hand descriptions of
processors. These terms <span class="rfc2119">may</span> be used to describe what parts of
the PSVI a particular schema processor provides access to, or
to specify requirements for processors, or for other purposes.
A processor provides access to a particular subset
of the PSVI if and only if it makes accessible some representation
of the information in question, for information items to which
it is applicable. (The properties labeled "if applicable"
or "where applicable" below are simply the most obvious
cases of properties which do not apply to every information item;
the same qualification implicitly applies to all properties listed
below.)
</p><p>
If other subsets of the PSVI prove important in practice it is
expected that definitions of those subsets <span class="rfc2119">may</span> be provided by
other specifications or in later revisions of this one.
</p><p>
The definition in this section of a term denoting a particular
subset of the PSVI does not constitute a requirement that
conforming processors provide access to that subset.
</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-root-validity" id="key-root-validity" shape="rect"></a>root-validity subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-root-validity_subset" id="dt-root-validity_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>root-validity subset</b> of the PSVI consists of the
following properties of the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:
</span><ul><li><div class="p"><a href="#e-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a>, if applicable</div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">instance-validity subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-instance-validity_subset" id="dt-instance-validity_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>instance-validity subset</b> of the PSVI consists of
the <a href="#dt-root-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity subset<span class="arrow">&#183;</span></a>, plus the following properties on elements,
wherever applicable:
</span>
<ul><li><div class="p"><a href="#e-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#e-notation_system" class="propref" shape="rect">[notation system]</a></div></li><li><div class="p"><a href="#e-notation_public" class="propref" shape="rect">[notation public]</a></div></li><li><div class="p"><a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a></div></li></ul>
and the following properties on attributes, wherever applicable:
<ul><li><div class="p"><a href="#a-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#a-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#a-schema_error_code" class="propref" shape="rect">[schema error code]</a></div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">type-aware subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-type-aware_subset" id="dt-type-aware_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>type-aware subset</b> of the PSVI consists of the
<a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, plus the following
items and properties.</span>
It is intended that the type-aware subset of the PSVI include
all the information needed by schema-aware XQuery 1.0 or
XSLT 2.0 processors.
In each case, the information is to be provided in some
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> representation. For elements:
<ul><li><div class="p"><a href="#e-attribution" class="propref" shape="rect">[element attribution]</a></div></li><li><div class="p"><a href="#e-declaration" class="propref" shape="rect">[element declaration]</a></div></li><li><div class="p"><a href="#e-nil" class="propref" shape="rect">[nil]</a></div></li><li><div class="p"><a href="#e-type_definition" class="propref" shape="rect">[type definition]</a></div></li><li><div class="p"><a href="#e-member_type_definition" class="propref" shape="rect">[member type definition]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li></ul>
and for attributes:<ul><li><div class="p"><a href="#a-attribution" class="propref" shape="rect">[attribute attribution]</a></div></li><li><div class="p"><a href="#a-declaration" class="propref" shape="rect">[attribute declaration]</a></div></li><li><div class="p"><a href="#a-type_definition" class="propref" shape="rect">[type definition]</a></div></li><li><div class="p"><a href="#a-member_type_definition" class="propref" shape="rect">[member type definition]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li></ul></div><div class="note"><div class="p"><b>Note:</b> In a future draft of this specification, it is expected that
a list of specific component properties to which access
<span class="rfc2119">should</span> or <span class="rfc2119">must</span> be provided will be included. No such
list is present in the current draft; input from readers,
users, schema authors, and implementors as to what properties
are most usefully exposed in this subset would be very welcome.</div></div></div></div><div class="gitem"><div class="giLabel">lightweight type-aware subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-lightweight_type-aware_subset" id="dt-lightweight_type-aware_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>lightweight type-aware subset</b> of the PSVI provides
the same information as the
<a href="#dt-type-aware_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>type-aware subset<span class="arrow">&#183;</span></a>, except that instead of providing
direct access to schema components, it provides only their names and
related information.</span>
For elements:
<ul><li><div class="p"><a href="#e-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#e-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#e-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li></ul>
and for attributes:<ul><li><div class="p"><a href="#a-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#a-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#a-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#a-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#a-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#a-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li></ul></div></div></div><div class="gitem"><div class="giLabel">full instance subset</div><div class="giDef"><div class="p">
<span class="termdef"><a name="dt-full_instance_subset" id="dt-full_instance_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>full instance subset</b> of the PSVI includes almost all
properties defined by this specification as applying to
element and attribute information items, but excludes
schema components. It
consists of
the <a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>,
plus the following properties for elements:</span>
<ul><li><div class="p"><a href="#e-descendent_validity" class="propref" shape="rect">[descendent validity]</a></div></li><li><div class="p"><a href="#e-local_elem_validity" class="propref" shape="rect">[local element validity]</a></div></li><li><div class="p"><a href="#e-local_type_validity" class="propref" shape="rect">[local type validity]</a></div></li><li><div class="p"><a href="#e-subsequence_valid" class="propref" shape="rect">[subsequence-valid]</a></div></li><li><div class="p"><a href="#e-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#e-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#e-type_fallback" class="propref" shape="rect">[type fallback]</a></div></li><li><div class="p"><a href="#e-type_alternative" class="propref" shape="rect">[type alternative]</a></div></li><li><div class="p"><a href="#e-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_default" class="propref" shape="rect">[schema default]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> some <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
representation (including at least the
names of resources from which components were drawn)</div></li></ul>
and the following for attributes:
<ul><li><div class="p"><a href="#a-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#a-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#a-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#a-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#a-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#a-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a></div></li><li><div class="p"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_default" class="propref" shape="rect">[schema default]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_specified" class="propref" shape="rect">[schema specified]</a> (where applicable)</div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">full PSVI with components</div><div class="giDef"><div class="p">
The <b>full PSVI with components</b> consists of
every property and information item defined in this
specification.
</div><div class="p">
In exposing element declarations, attribute declarations,
type definitions, and other components, processors
providing access to the full subset must provide some
representation for all of the defined properties of the
components. Note that although the properties are often
redundant with other information, it is not required that
the full subset include more than one representation of
redundant information.
</div><div class="note"><div class="p"><b>Note:</b>
The PSVI is a description of an information set,
not a specification of a data structure or an application-programming
interface. For convenience, this specification defines
in some cases more than one term for denoting a particular
piece of information: for example,
the <span class="anonRef">[type definition name]</span>
property of an element and the
<span class="anonRef">[name]</span>
property of the <span class="anonRef">[type definition]</span>
property of that element are the same piece of information.
If the <span class="anonRef">[type definition]</span> is
supplied, then the <span class="anonRef">[type
definition name]</span> is necessarily also available.
</div><div class="p">Similar observations can be made for other properties present in
the full-instance subset but not mentioned here. Processors
<span class="rfc2119">should</span> allow access to the information without requiring
users or applications to distinguish between the different
names or access paths under which it might be described in this
specification.
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#var_psvi" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-other-idf" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="var_schema_con" id="var_schema_con" shape="rect"></a>C.2
Terminology of schema construction
</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.1 <a href="#vsc_locations" shape="rect">Identifying locations where components are sought</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.2 <a href="#vsc_indirection" shape="rect">Identifying methods of indirection</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.3 <a href="#vsc_key" shape="rect">Identifying the key for use in indirection</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.4 <a href="#vsc_stopping" shape="rect">Identifying when to stop searching</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.5 <a href="#vsc_failure" shape="rect">Identifying how to react to failure</a><br clear="none" />
</div><p>
Conforming processors <span class="rfc2119">may</span> implement any combination of the
following strategies for locating schema components, in any
order. They <span class="rfc2119">may</span> also implement other strategies.
</p><p>
The terminology offered here is intended to be useful in
discussions of processor behavior, whether documenting
existing behavior or describing required behavior.
</p><p>
General-purpose processors <span class="rfc2119">should</span> support multiple
methods for locating schema documents,
and
provide user
control over which methods are used and how to fall back in
case of failure.
</p><div class="div3">
<h4><a name="vsc_locations" id="vsc_locations" shape="rect"></a>C.2.1 Identifying locations where components are sought</h4><div class="block">
Some terms describe how a processor identifies locations from
which schema components can be sought:
<div class="glist"><div class="gitem"><div class="giLabel">hard-coded schemas</div><div class="giDef"><div class="p">
Full knowledge of one or more schemas is built into the
processor. (Note: all processors are required to have some
built-in knowledge of of the built-in components. <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>General-purpose<span class="arrow">&#183;</span></a> processors
are additionally required to
be able to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>
documents against the
XSD schema for schema documents.)
</div></div></div><div class="gitem"><div class="giLabel"><a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> components</div><div class="giDef"><div class="p">
Full knowledge of one or more components is
built into the processor; these components
<span class="rfc2119">may</span> be made available automatically by being included
by that processor in every schema it constructs,
or they <span class="rfc2119">may</span> be included only under certain
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> conditions (e.g. an explicit
import of the relevant namespace, or choice of
a specified invocation option).
</div><div class="note"><div class="p"><b>Note:</b>
All processors are
required to have some built-in knowledge of
of the built-in components.
</div></div></div></div><div class="gitem"><div class="giLabel">hard-coded schema locations</div><div class="giDef"><div class="p">
A list of locations at which
schema documents will be sought is built into the processor.
Particular locations can be associated with specific
namespaces or can be used to seek any schema document.
</div></div></div><div class="gitem"><div class="giLabel">named pairs</div><div class="giDef"><div class="p">
At invocation time, the user passes a set or
sequence of (namespace-name, schema document) pairs to the
processor, e.g. as a command-line option. (Can be used with
early or slow exit strategy.) The namespace name is used
as a check on the document, not as an instruction; if the
schema document has a target namespace which differs from
the namespace name specified, the processor signals an error.
</div></div></div><div class="gitem"><div class="giLabel">schema documents</div><div class="giDef"><div class="p">
At invocation time, the user passes a set or sequence of schema
documents, or identifiers for schema documents (e.g. URIs), to the
processor, e.g. as a command-line option. Each schema document
is associated with its target namespace, if any.
(Can be used with early or
slow exit strategy.)
</div></div></div><div class="gitem"><div class="giLabel">interactive inquiry</div><div class="giDef"><div class="p">
For each namespace, the processor asks
the user interactively (though mechanisms not specified
here) where to seek the required schema components.
<div class="note"><div class="p"><b>Note:</b> This will perhaps be most useful as a fallback after other methods
have failed.</div></div>
</div></div></div><div class="gitem"><div class="giLabel">namespace name</div><div class="giDef"><div class="p">
For each namespace, the processor attempts
to dereference the namespace name; if a schema document is
returned, it is processed. If some other kind of resource representation is
returned, processors <span class="rfc2119">may</span> interpret its content to locate a schema document.
<div class="note"><div class="p"><b>Note:</b> For example, if a RDDL document is returned,
a processor <span class="rfc2119">may</span> search the RDDL document for <code>rddl:resource</code>
elements with the well-known property <code>xlink:role</code>
= "<code>http://www.w3.org/2001/XMLSchema</code>"
and then attempt to dereference the location(s) indicated on the
<code>xlink:href</code> attribute of the link.
</div></div>
</div></div></div><div class="gitem"><div class="giLabel">schemaLocation hints in XML instance document</div><div class="giDef"><div class="p">
For each namespace, if the input
document includes one or more schemaLocation hints for that
namespace, the processor attempts to dereference those
locations.
</div></div></div><div class="gitem"><div class="giLabel">schemaLocation hints in schema documents</div><div class="giDef"><div class="p">
For each namespace, if a schema document being processed
includes one or more schemaLocation hints for that
namespace (e.g. on an <code>import</code> element,
the processor attempts to dereference those
locations.
</div></div></div><div class="gitem"><div class="giLabel">local repository</div><div class="giDef"><div class="p">
For each namespace, a local repository of
schema components is consulted. In some situations the consultation
will require a key, in which see the terminology for indirection
given below.
</div></div></div></div>
</div></div><div class="div3">
<h4><a name="vsc_indirection" id="vsc_indirection" shape="rect"></a>C.2.2 Identifying methods of indirection</h4><div class="block">
Some terms describe various methods of indirection through
local catalogs, search paths, or local repositories of schema
documents and/or schema components. In each of these, a
&#8216;search key&#8217; is assumed which helps to control the
indirection. Terms for different sorts of search key are
defined below.
<div class="glist"><div class="gitem"><div class="giLabel">path indirection</div><div class="giDef"><div class="p">
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted. After substitution, each element of the
series is interpreted as a file-system path and a schema
document is sought at the location indicated by that path.
</div></div></div><div class="gitem"><div class="giLabel">URI indirection</div><div class="giDef"><div class="p">
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted. After substitution, each element of the
series is interpreted as a URI and a schema document is
sought at the location indicated by that path.
</div></div></div><div class="gitem"><div class="giLabel">catalog indirection</div><div class="giDef"><div class="p">
The processor consults an OASIS catalog
(whose location can be hard-coded, passed as a parameter at
invocation time or acquired from the environment) using a
search key. The key can be sought for as a namespace name,
as a public identifier, or as a system identifier.
</div></div></div><div class="gitem"><div class="giLabel">local repository indirection</div><div class="giDef"><div class="p">
A local repository of schema
components is consulted using a search key.
</div></div></div><div class="gitem"><div class="giLabel">recursion</div><div class="giDef"><div class="p">
The location(s) returned by a catalog or other
indirection mechanism are not consulted immediately but
instead used as a key in a renewed indirection. Only after
the indirection mechanism fails to return a value is an
attempt made to dereference the last location returned.
</div></div></div><div class="gitem"><div class="giLabel">non-recursion</div><div class="giDef"><div class="p">
The location(s) returned by a catalog or
other indirection mechanism are consulted immediately; they
are not used in recursive indirections.
</div></div></div></div>
</div></div><div class="div3">
<h4><a name="vsc_key" id="vsc_key" shape="rect"></a>C.2.3 Identifying the key for use in indirection</h4><div class="block">
Locating schema components by means of any of the &#8216;indirect&#8217;
methods just identified will sometimes involve the specification of a
value of some kind as a search key. Processors <span class="rfc2119">may</span> vary in
their choice of values to use as the key:
<div class="glist"><div class="gitem"><div class="giLabel">namespace key</div><div class="giDef"><div class="p">
The namespace name is used as a key.
</div></div></div><div class="gitem"><div class="giLabel">location key</div><div class="giDef"><div class="p">
A location (e.g. a schema location hint or the
location specified in a catalog or by the user) is used as a
key.
</div></div></div></div></div></div><div class="div3">
<h4><a name="vsc_stopping" id="vsc_stopping" shape="rect"></a>C.2.4 Identifying when to stop searching</h4><div class="block">
When more than one location is available for a given
namespace, two distinct behaviors can be distinguished; these
are orthogonal to other terms defined here:
<div class="glist"><div class="gitem"><div class="giLabel">early-exit</div><div class="giDef"><div class="p">
When more than one location is available for a
given namespace, the processor attempts each in turn. When
a location is successfully dereferenced and a schema
document is obtained, the later locations on the list are
ignored.
</div></div></div><div class="gitem"><div class="giLabel">slow-exit</div><div class="giDef"><div class="p">
When more than one location is available for a
given namespace, the processor attempts each in turn. All
locations are tried, even if a schema document for the
namespace has been obtained.
</div></div></div></div></div></div><div class="div3">
<h4><a name="vsc_failure" id="vsc_failure" shape="rect"></a>C.2.5 Identifying how to react to failure</h4><div class="block">
When a processor seeks schema components at a particular
location, but fails to find components of the namespace
in question at that location, several different
ways of responding to that failure can be distinguished:
<div class="glist"><div class="gitem"><div class="giLabel">error</div><div class="giDef"><div class="p">
The processor signals an error in some manner appropriate
to its construction and environment. Some processors
and some users will find it useful to distinguish fatal errors (which
cause processing to halt) from recoverable errors.
</div></div></div><div class="gitem"><div class="giLabel">continue</div><div class="giDef"><div class="p">
The processor signals no fatal error and continues its search
for components in the namespace in question by attempting
another location.
</div></div></div></div></div></div></div><div class="div2">
<h3><span class="nav"><a href="#var_schema_con" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="sec-other-idf" id="sec-other-idf" shape="rect"></a>C.3 Other Implementation-defined Features</h3><p>This section defines terms intended to be useful in describing
other implementation-defined choices.
</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="xml-1.0-based" id="xml-1.0-based" shape="rect"></a>XML-1.0-based datatypes</div><div class="giDef"><div class="p">The datatypes defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, taking
the relevant definitions from
<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> and <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>,
for datatypes which depend on definitions from those specifications.
</div></div></div><div class="gitem"><div class="giLabel"><a name="xml-1.1-based" id="xml-1.1-based" shape="rect"></a>XML-1.1-based datatypes</div><div class="giDef"><div class="p">The datatypes defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, taking
the relevant definitions from version 1.1 of
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>,
for datatypes which depend on definitions from those specifications.
</div></div></div></div></div></div><div class="div1">
<h2><a name="infoset" id="infoset" shape="rect"></a>D Required Information Set Items and Properties (normative)</h2><p>This specification requires as a precondition for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
an information set as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>
which contains
at least the following
information items and properties:
</p><div class="glist"><div class="gitem"><div class="giLabel">Attribute Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local name]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[attribute type]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a></div></div></div><div class="gitem"><div class="giLabel">Character Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Comment Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[content]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Element Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace name]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[prefix]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base URI]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Namespace Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace name]</a></div></div></div><div class="gitem"><div class="giLabel">Processing Instruction Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[target]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[content]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[base URI]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[parent]</a></div></div></div></div><p>In addition, infosets <span class="rfc2119">should</span> support the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsed entities]</a>
property of the Document Information Item. Failure to do so will mean all
items of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITY" shape="rect">ENTITY</a> or
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITIES" shape="rect">ENTITIES</a> will fail to
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>. If the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsed entities]</a> property is supported,
the following is also required:</p><div class="glist"><div class="gitem"><div class="giLabel">Unparsed Entity Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[system identifier]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[public identifier]</a></div></div></div></div><p>This specification does not require any destructive alterations to the input
information set: all the information set contributions specified herein are additive.</p><p>This appendix is intended to satisfy the requirements for <a href="http://www.w3.org/TR/2001/WD-xml-infoset-20010316/#conformance" shape="rect">Conformance</a> to the <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> specification.</p></div><div class="div1">
<h2><a name="impl-def-dep-list" id="impl-def-dep-list" shape="rect"></a>E Checklists of implementation-defined and implementation-dependent features (normative)</h2><div class="div2">
<h3><span class="nav"> <a href="#impl-dep-list" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="impl-def-list" id="impl-def-list" shape="rect"></a>E.1 Checklist of implementation-defined features</h3><p><span class="termdef"><a name="key-impl-defined" id="key-impl-defined" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>implementation-defined</b>
feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this
specification; the precise behavior is not specified by
this specification but <span class="rfc2119">must</span> be specified by the
implementor for each particular conforming implementation.</span>
(In the latter
respect, <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> features differ
from <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features.)
</p><p>
This appendix provides a summary of XSD
features whose effect is explicitly <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
Any software which claims to conform to this specification
<span class="rfc2119">must</span> describe how these choices have been exercised, in
documentation which accompanies any conformance claim.
</p><p>In describing the choices made for a given processor,
it is hoped that the terminology defined in <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative) (&#167;C)</a>
will be found useful.</p><div class="constraintlist"><div class="clnumber">1 <span class="p">For the datatypes defined by
<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> which depend on
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> or <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, it is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor
takes the relevant definitions from
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, or
from
<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> and <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>.
Implementations <span class="rfc2119">may</span> support either
the <a href="#xml-1.0-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.0-based<span class="arrow">&#183;</span></a>
datatypes,
or the <a href="#xml-1.1-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.1-based<span class="arrow">&#183;</span></a>
datatypes,
or both.
The same applies to the definition of whitespace.
</span></div>
<div class="clnumber">2 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor
can read schema documents in the form of XML documents.
</span></div>
<div class="clnumber">3 <span class="p">Whether a processor
is able to retrieve schema documents from the Web
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. (See <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>,
which defines "<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>" processors
as processors
which can retrieve schema documents from the Web.)</span></div>
<div class="clnumber">4 <span class="p">The way in which a processor is invoked, and the way in
which values are specified for the schema to be used,
the information item to be validated,
and the declaration or definition with which to begin
validation, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. (See
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>.)</span></div>
<div class="clnumber">5 <span class="p">The manner in which a processor provides access to the
information items and properties in the PSVI to any
downstream or user applications, or to the invoker,
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">6 <span class="p">The
information items and properties in the PSVI to which
the processor provides access, if any, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
(See <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset (&#167;C.1)</a> for some subsets of the PSVI for
which this specification provides names and definitions.)</span></div>
<div class="clnumber">7 <span class="p">When the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes
<span class="anonRef">[type definition name]</span> and
similar properties, it is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether
unique names are provided for anonymous type definitions.
</span></div>
<div class="clnumber">8 <span class="p">The method used for assembling a set of schema components
for use in validation is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
(See <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> for the normative prose and
<a href="#var_schema_con" shape="rect">
Terminology of schema construction
(&#167;C.2)</a> for some terminology which
can be used in describing implementation choices.)</span></div>
<div class="clnumber">9 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor
provides a value for the <span class="anonRef">[type definition name]</span>
and <span class="anonRef">[member type definition name]</span>
properties of attribute and element information-items.
If it does so, the choice of name is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">10 <span class="p">Everything <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> is also
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> in this specification.</span><div class="note"><div class="p"><b>Note:</b> This includes, but is not limited to, the choice
of <a href="#xml-1.0-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.0-based<span class="arrow">&#183;</span></a>
or <a href="#xml-1.1-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.1-based<span class="arrow">&#183;</span></a>
datatypes, or both;
support for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes;
and
support for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> constraining facets.
See the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#idef-idep" shape="rect">appendix</a> on
implementation-defined and implementation-dependent
features in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
</div></div></div>
<div class="clnumber">11 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor detects
violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
(a) always by examination of the schema in isolation,
(b) only when some element information item
in the input document is valid against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
<var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, or
(c) sometimes the one and sometimes the other.
In case (c), the circumstances
in which the processor does one or the other are
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">12<a id="anchor11073e" name="anchor11073e" shape="rect"> </a><span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> when a processor detects type errors
in XPath expressions and whether it treats type errors as
static or dynamic errors.</span></div>
<div class="clnumber">13 <span class="p">
<a name="anchor11076" id="anchor11076" shape="rect"></a>
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under what conditions a processor
will detect the equivalence of two distinct
<a href="#tt" class="compref" shape="rect">Type Table</a> or <a href="#tac" class="compref" shape="rect">Type Alternative</a> components.
All processors <span class="rfc2119">must</span> detect equivalence under certain
specified conditions, but the ability to detect equivalence
under other conditions is not constrained.
</span></div>
<div class="clnumber">14 <span class="p">
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect invalid elements within
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> have on the construction of
schema components from a schema document, and whether
a processor treats schema documents which are invalid
only in consequence of containing such invalid elements
as being in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> or not.
</span></div>
</div></div><div class="div2">
<h3><span class="nav"><a href="#impl-def-list" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="impl-dep-list" id="impl-dep-list" shape="rect"></a>E.2 Checklist of implementation-dependent features</h3><p><span class="termdef"><a name="key-impl-dep" id="key-impl-dep" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>implementation-dependent</b>
feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this
specification; the precise behavior is not specified by
this or any other W3C specification
and is not required to be specified by the implementor
for any particular implementation.</span> (In the latter
respect, <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features differ
from <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> features.)
</p><p>This appendix provides a summary of XSD features whose
effect is explicitly <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>. Choices made by processors
in these areas are <em>not</em> required to be documented.</p><ol class="enumar"><li><div class="p">
When a default value of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> is applied to an
element or attribute information item, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
whether <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs to ensure that the
<a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> maps to the
<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.
</div></li><li><div class="p">
When a default value is supplied for a defaulted attribute and more than
one prefix is bound to the namespace of the attribute in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which prefix is used for the
attribute.
</div></li><li><div class="p">
When a default value is supplied for a defaulted attribute and
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
what prefix is used in the new
namespace information item.
</div></li><li><div class="p">
When a default value is supplied for a defaulted attribute and
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
whether the consistency of the information set is preserved by (a) adding
the new binding to the descendants of the element on which the defaulted
attribute occurred, or by (b) undeclaring the new binding on the children
of that element. When <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a> rather than
<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use, namespace bindings cannot be
undeclared, so the behavior is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> only for those
implementations which do support <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.
</div></li><li><div class="p">
If more than one <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> fails to be satisfied, it is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of them are included in the
<a href="#e-idcs" class="propref" shape="rect">[failed identity constraints]</a> property of PSVI.
</div></li><li><div class="p">
If more than one <a href="#as" class="compref" shape="rect">Assertion</a> fails to be satisfied, it is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of them are included in the
<a href="#e-assertions" class="propref" shape="rect">[failed assertions]</a> property of PSVI.
</div></li><li><div class="p">
The order of <a href="#a" class="compref" shape="rect">Annotation</a> components within various components'
{annotations} property is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</div></li><li><div class="p">
If a name is supplied for anonymous components
(for example, <span class="anonRef">[type definition name]</span>
and <span class="anonRef">[member type definition name]</span>
properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>), the choice of name is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</div></li><li><div class="p">If a processor detects
some violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
by examination of the schema in isolation,
and others only when some element information item
in the input document is valid against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
<var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>,
then the circumstances
in which the processor does one or the other are
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</div></li></ol></div></div><div class="div1">
<h2><a name="composition-xslts" id="composition-xslts" shape="rect"></a>F Stylesheets for Composing Schema Documents (Normative)</h2><p>The transformations specified in the following sections
in the form of <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheets are used when
assembling schemas from multiple schema documents. Implementations do not
have to perform <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> transformation, or use
the stylesheets given here, as long as the
same result is produced.</p><div class="div2">
<h3><span class="nav"> <a href="#override-xslt" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="chameleon-xslt" id="chameleon-xslt" shape="rect"></a>F.1 Transformation for Chameleon Inclusion</h3><div class="block">When a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <b>D2</b> without a
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is included
(<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
multiple schema definition documents
(<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>), redefined
(<a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>), or overridden
(<a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a>) by another <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
<b>D1</b> with a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, the following
transformation, specified here as an
<a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheet, is applied to <b>D2</b>
before its contents are mapped to schema compnents. The
transformation performs two tasks:<ol class="enumar"><li><div class="p">
Add a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to <b>D2</b>, whose value
is the same as that of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
<b>D1</b>.
</div></li><li><div class="p">
Update all QName references in <b>D2</b> that do not have a namespace name
so that their namespace names become the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
</div></li></ol>
</div><div class="sfsScrap" id="div_xslt-chameleon">
<a id="xslt-chameleon" name="xslt-chameleon" shape="rect"></a>
<div class="sfsHead">Stylesheet for Chameleon Inclusion</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;xsl:transform version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"&gt;
&lt;xsl:param name="newTargetNamespace" as="xs:anyURI"
required="yes"/&gt;
&lt;xsl:param name="prefixForTargetNamespace" as="xs:NCName"
select="f:generateUniquePrefix(., 0)"/&gt;
&lt;xsl:template match="@*|node()"&gt;
&lt;xsl:copy&gt;&lt;xsl:apply-templates select="@*|node()"/&gt;&lt;/xsl:copy&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="xs:schema"&gt;
&lt;xsl:copy&gt;
&lt;xsl:namespace name="{$prefixForTargetNamespace}"
select="$newTargetNamespace"/&gt;
&lt;xsl:apply-templates select="@*"/&gt;
&lt;xsl:attribute name="targetNamespace"
select="$newTargetNamespace"/&gt;
&lt;xsl:apply-templates/&gt;
&lt;/xsl:copy&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="attribute(*, xs:QName)
[namespace-uri-from-QName(.)='']"&gt;
&lt;xsl:attribute name="{name()}"
select="concat($prefixForTargetNamespace,
':',
local-name-from-QName(.))"/&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="@memberTypes"&gt;
&lt;xsl:variable name="context" select=".."/&gt;
&lt;xsl:variable name="values" as="xs:string+"&gt;
&lt;xsl:for-each select="tokenize(., '\s+')"&gt;
&lt;xsl:variable name="oldValue"
select="resolve-QName(., $context)"
as="xs:QName"/&gt;
&lt;xsl:sequence
select="if (namespace-uri-from-QName($oldValue) eq '')
then concat($prefixForTargetNamespace, ':',
local-name-from-QName($oldValue))
else string(.)"/&gt;
&lt;/xsl:for-each&gt;
&lt;/xsl:variable&gt;
&lt;xsl:attribute name="{name()}" select="string-join($values, ' ')"/&gt;
&lt;/xsl:template&gt;
&lt;xsl:function name="f:generateUniquePrefix" as="xs:NCName"&gt;
&lt;xsl:param name="xsd"/&gt;
&lt;xsl:param name="try" as="xs:integer"/&gt;
&lt;xsl:variable name="disallowed"
select="distinct-values($xsd//*/in-scope-prefixes(.))"/&gt;
&lt;xsl:variable name="candidate"
select="xs:NCName(concat('p', $try))"/&gt;
&lt;xsl:sequence select="if ($candidate = $disallowed) then
f:generateUniquePrefix($xsd, $try+1)
else
$candidate"/&gt;
&lt;/xsl:function&gt;
&lt;/xsl:transform&gt;</pre></div></div></div><div class="div2">
<h3><span class="nav"><a href="#chameleon-xslt" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="override-xslt" id="override-xslt" shape="rect"></a>F.2 Transformation for <code>xs:override</code></h3><p>When a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
information item <b>D1</b> contains
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements, the transformation specified in the following
<a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheet is performed once for
each such <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element. It requires as
parameters (a) the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in <b>D1</b>
(call it <var>O1</var>) as the <code>overrideElement</code> parameter
and (b)
the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element of the schema document <b>D2</b>
identified by the <code>schemaLocation</code> attribute of <var>O1</var>
as the <code>overriddenSchema</code> parameter.
The transformation
produces another <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <b>D2&#8242;</b>, which is equivalent
to <b>D2</b> except that some elements in <b>D2</b> are replaced
or modified.
</p><p>
The normative description of the transformation is given by the stylesheet
below; the transformation can also be described (non-normatively) in prose
as in the following paragraph.
</p><div class="block">
For each element information item <var>E2</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <b>D2</b>'s
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, or
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> information item, the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">1<a id="c-override-xslt-match" name="c-override-xslt-match" shape="rect"> </a><b>If </b><var>E2</var>
has element type <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>,
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>,
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, or
<a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a>, and <var>O1</var> has a child
<var>E1</var> with the same element type
and the same value for its <code>name</code>
attribute, <b>then </b> <b>D2&#8242;</b> has an element identical to <var>E1</var> in <var>E2</var>'s
place.</div><div class="clnumber">2<a id="c-override-xslt-nomatch" name="c-override-xslt-nomatch" shape="rect"> </a><b>If </b><var>E2</var> has one of the
element types specified in clause <a href="#c-override-xslt-match" shape="rect">1</a>,
but <var>O1</var> has no
matching child, <b>then </b><b>D2&#8242;</b> has an element identical to <var>E2</var> in the same
place as where <var>E2</var> is in <b>D2</b>.</div><div class="clnumber">3<a id="c-override-include" name="c-override-include" shape="rect"> </a><b>If </b><var>E2</var> has element type <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <b>then </b><b>D2&#8242;</b> has an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
with <code>schemaLocation</code> = <var>E2</var>.<code>schemaLocation</code>
and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> identical to those of <var>O1</var>.</div><div class="clnumber">4<a id="c-override-override" name="c-override-override" shape="rect"> </a><b>If </b><var>E2</var> has element type <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, <b>then </b><b>D2&#8242;</b> has an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
<var>O2</var>,
with <code>schemaLocation</code> = <var>E2</var>.<code>schemaLocation</code>
and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> which are drawn from among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
<var>E2</var> and <var>O1</var>, as specified by
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1<a id="c-ov-ov-match" name="c-ov-ov-match" shape="rect"> </a><b>If </b>a child of <var>E2</var> and a child of <var>O1</var> match as described
in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b><var>O2</var> has
a child identical to the child of <var>O1</var>.</div><div class="clnumber">4.2<a id="c-ov-ov-nomatch" name="c-ov-ov-nomatch" shape="rect"> </a><b>If </b>a child of <var>E2</var> matches no child of <var>O1</var> as described
in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b>(as described in clause <a href="#c-override-xslt-nomatch" shape="rect">2</a>)
<var>O2</var> has a child identical to the child of <var>E2</var>.</div><div class="clnumber">4.3<a id="c-ov-ov-added" name="c-ov-ov-added" shape="rect"> </a><b>If </b>a child of <var>O1</var> matches no child of <var>E2</var> as described
in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b>
<var>O2</var> has a child identical to the child of <var>O1</var>.</div></div>
<div class="note"><div class="p"><b>Note:</b> Informally, the rule just given has the effect that <var>O2</var>
contains (a) all the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var>, as well as (b) all of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E2</var> which are not overridden by some child
of <var>O1</var>. The elements corresponding to <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E2</var>
come first, followed by the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var> which matched
nothing in <var>E2</var>.
</div></div></div></div></div><p>The base URI of <b>D2&#8242;</b> is the same
as that of <b>D2</b>.</p><div class="note"><div class="p"><b>Note:</b> Informally, <b>D2&#8242;</b> is like <b>D2</b> except that
(a) any elements matched by any <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var>
are overridden (replaced) by the corresponding <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var>,
(b) any schema documents included by means of
<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements
in <b>D2</b> are overridden (transformed) by <var>O1</var> instead of
being included without change,
and (c) any schema documents overridden by means of
<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements
in <b>D2</b> are to be overridden (transformed) both as
specified in the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements
in <b>D2</b> and as specified in <var>O1</var>; if both apply,
the information in <var>O1</var> takes precedence.
</div><div class="p">The result is that the transformation
described by <var>O1</var> is applied to all the document in the
<a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of <var>O1</var>.</div></div><div class="note"><div class="p"><b>Note:</b> Because <b>D2</b> and <b>D2&#8242;</b> have
the same base URI, relative references in <b>D2&#8242;</b> will
be unaffected by the transformation.</div></div><div class="sfsScrap" id="div_xslt-override">
<a id="xslt-override" name="xslt-override" shape="rect"></a>
<div class="sfsHead">Stylesheet for xs:override</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;xsl:transform version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"
exclude-result-prefixes="f"&gt;
&lt;xsl:import-schema
namespace="http://www.w3.org/2001/XMLSchema"
schema-location="./XMLSchema.xsd"/&gt;
&lt;xsl:param name="overrideElement" as="schema-element(xs:override)"/&gt;
&lt;xsl:param name="overriddenSchema" as="schema-element(xs:schema)"/&gt;
&lt;xsl:template name="start"&gt;
&lt;xsl:result-document validation="strict"&gt;
&lt;xsl:apply-templates select="$overriddenSchema"/&gt;
&lt;/xsl:result-document&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="schema-element(xs:schema)
| schema-element(xs:redefine)"&gt;
&lt;xsl:copy&gt;
&lt;xsl:copy-of select="@*"/&gt;
&lt;xsl:apply-templates/&gt;
&lt;/xsl:copy&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="schema-element(xs:import)" priority="5"&gt;
&lt;xsl:copy-of select="."/&gt;
&lt;/xsl:template&gt;
&lt;!--* replace children of xs:schema, xs:redefine, and xs:override
* which match children of $overrideElement. Retain others.
*--&gt;
&lt;xsl:template match="schema-element(xs:schema)/*
| schema-element(xs:redefine)/*
| schema-element(xs:override)/*"
priority="3"&gt;
&lt;xsl:variable name="original" select="."/&gt;
&lt;xsl:variable name="replacement"
select="$overrideElement/*
[node-name(.)=node-name($original)
and
f:componentName(.)=f:componentName($original)]"/&gt;
&lt;xsl:copy-of select="($replacement, $original)[1]"/&gt;
&lt;/xsl:template&gt;
&lt;!--* replace xs:include elements with overrides
*--&gt;
&lt;xsl:template match="schema-element(xs:include)"
priority="5"&gt;
&lt;xsl:element name="xs:override"&gt;
&lt;xsl:copy-of select="@schemaLocation, $overrideElement/*"/&gt;
&lt;/xsl:element&gt;
&lt;/xsl:template&gt;
&lt;!--* change xs:override elements: children which match
* children of $overrideElement are replaced, others are
* kept, and at the end all children of $overrideElement
* not already inserted are added.
*--&gt;
&lt;xsl:template match="schema-element(xs:override)"
priority="5"&gt;
&lt;xsl:element name="xs:override"&gt;
&lt;xsl:attribute name="schemaLocation"&gt;
&lt;xsl:value-of select="@schemaLocation"/&gt;
&lt;/xsl:attribute&gt;
&lt;xsl:apply-templates/&gt;
&lt;xsl:apply-templates select="$overrideElement/*"
mode="copy-unmatched"&gt;
&lt;xsl:with-param name="overriddenOverride" select="."/&gt;
&lt;/xsl:apply-templates&gt;
&lt;/xsl:element&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="*" mode="copy-unmatched"&gt;
&lt;xsl:param name="overriddenOverride"&gt;&lt;/xsl:param&gt;
&lt;xsl:variable name="overriding" select="."/&gt;
&lt;xsl:variable name="overridden" select="$overriddenOverride/*[
node-name(.) = node-name($overriding)
and
f:componentName(.) = f:componentName($overriding)
]"/&gt;
&lt;xsl:choose&gt;
&lt;xsl:when test="count($overridden) &gt; 0"&gt;
&lt;!--* do nothing; this element has already been copied *--&gt;
&lt;/xsl:when&gt;
&lt;xsl:when test="count($overridden) = 0"&gt;
&lt;!--* copy this element, it isn't already there *--&gt;
&lt;xsl:copy-of select="."/&gt;
&lt;/xsl:when&gt;
&lt;/xsl:choose&gt;
&lt;/xsl:template&gt;
&lt;xsl:function name="f:componentName" as="xs:QName"&gt;
&lt;xsl:param name="component" as="element()"/&gt;
&lt;xsl:sequence select="
QName($component/ancestor::xs:schema/@targetNamespace,
$component/@name)"/&gt;
&lt;/xsl:function&gt;
&lt;/xsl:transform&gt;</pre></div></div></div></div><div class="div1">
<h2><a name="changes" id="changes" shape="rect"></a>G Changes since version 1.0 (non-normative)</h2><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#issues" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="done" id="done" shape="rect"></a>G.1 Changes made since version 1.0</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.1 <a href="#ch_specs" shape="rect">Relationship between XSD and other specifications</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.2 <a href="#ch_versions" shape="rect">XSD versions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.3 <a href="#ch_models" shape="rect">Changes to content models</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.4 <a href="#ch_xpath" shape="rect">Assertions and XPath</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.5 <a href="#ch_complex-derivation" shape="rect">Derivation of complex types</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.6 <a href="#ch_complex" shape="rect">Changes to complex type definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.7 <a href="#ch_id" shape="rect">ID, IDREF, and related types</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.8 <a href="#ch_std" shape="rect">Simple type definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.9 <a href="#ch_elemdecl" shape="rect">Element declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.10 <a href="#ch_attrdecl" shape="rect">Attribute declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.11 <a href="#ch_components" shape="rect">Component structure</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.12 <a href="#ch_sva" shape="rect">The process of validation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.13 <a href="#ch_psvi" shape="rect">post-schema-validation infoset</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.14 <a href="#ch_conformance" shape="rect">Conformance</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.15 <a href="#ch_schemacomp" shape="rect">Schema composition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.16 <a href="#ch_misc_sub" shape="rect">Other substantive changes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.17 <a href="#ch_clar" shape="rect">Clarifications and editorial changes</a><br clear="none" />
</div><div class="note"><div class="p"><b>Note:</b> The grouping of changes
below is intended to
make the list easier to scan. It is an ad hoc grouping for
convenience to which no great significance should be attached.
Some changes could have been listed in more than one place; in
such cases the choice was arbitrary.
</div></div><div class="div3">
<h4><a name="ch_specs" id="ch_specs" shape="rect"></a>G.1.1 Relationship between XSD and other specifications</h4><div class="block">Changes to the
relationship between this and other specifications:
<ol class="enumar"><li><div class="p">Support for XML 1.1 has been added.
It is now implementation defined whether datatypes dependent
on definitions in XML (<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, <a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>) and Namespaces in XML
(<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>,
<a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>) use the definitions as
found in version 1.1 or version 1.0 of those specifications.
</div></li><li><div class="p">To reduce confusion and avert a widespread misunderstanding,
the normative references to various W3C specifications now state
explicitly that while the reference describes the particular edition
of a specification current at the time this specification is
published, conforming implementations of this specification
are not required to ignore later editions of the other
specification but instead <span class="rfc2119">may</span> support later editions, thus
allowing users of this specification to benefit from corrections to other
specifications on which this one depends.
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_versions" id="ch_versions" shape="rect"></a>G.1.2 XSD versions</h4><div class="block">Schema language versions:<ol class="enumar"><li><div class="p">A conditional inclusion mechanism is defined, roughly
analogous to the XSLT 2.0 <code>use-when</code> attribute or
to the C preprocessor <code>#ifdef</code> construct. By
means of the <code>vc:minVersion</code> and
<code>vc:maxVersion</code> attributes, a simple forward-processing
mechanism is supplied, so that conforming XSD 1.1 processors
can successfully ignore constructs introduced in
future versions (if any) of XSD, and so that schema authors
can define schemas which use newer constructs when available
but can fall back on older constructs when the newer
constructs are not available.
</div></li><li><div class="p">
Identifiers for different versions of XSD are now defined
in section <a href="#langids" shape="rect">Schema Language Identifiers (&#167;1.3.4)</a>.
</div></li></ol></div></div><div class="div3">
<h4><a name="ch_models" id="ch_models" shape="rect"></a>G.1.3 Changes to content models</h4><div class="block">Content models:
<ol class="enumar"><li><div class="p">The <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>
constraint has been relaxed. While competition between two
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> is still forbidden, as is competition between
two <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>, competition between an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and
a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> is no longer forbidden. In the course of
making this substantive change, some editorial changes have
also been made, in order to make the exposition clearer.
(Readers familiar with version 1.0 of this specification will
find that the constraint works in almost exactly the same way
as it did in 1.0, except that content models in which an input
item matches either a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> are
now allowed.)
</div></li><li><div class="p">Content models may now use the
<a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> element to specify content
models with "open content". Such content
models allow elements
not explicitly mentioned in
the content model to appear in the document instance; it is
as if wildcards were automatically inserted at appropriate
points within the content model. By specifying what kind of
wildcard is implicitly inserted, the schema author can
adjust the degree of openness and determine what elements
are accepted by the open content; the schema author can also
specify that the content model should be open everywhere, or
only at the end. A schema-document wide default may be
set, which causes all content models to be open unless
otherwise specified.</div></li><li><div class="p">Wildcards may now be defined which allow names in any
namespace but those in a set of proscribed namespaces.
(In version 1.0 of this specification, only a single
namespace, the target namespace of a schema document,
could be proscribed.) Also, wildcards can now be written
which match any element in a set of namespaces but
which exclude a particular set of qualified names from
matching the wildcard.
Finally,
the keyword <b>##definedSibling</b> can be used
to exclude all elements explicitly mentioned in
a content model (and all elements substitutable for
those elements).
</div></li><li><div class="p">Wildcards can now be defined which match any element
(in the specified namespaces) which does <em>not</em>
match an element declaration in the schema (so-called
"not-in-schema" wildcards).</div></li><li><div class="p">Several of the constraints imposed by version 1.0 of this
specification on <b><i>all</i></b>-groups have been relaxed:
<ol class="enumla"><li><div class="p">Wildcards are now allowed in <b><i>all</i></b> groups.</div></li><li><div class="p">The value of <code>maxOccurs</code> may now be greater than 1 on particles
in an <b><i>all</i></b> group. The elements which match a particular
particle need not be adjacent in the input.</div></li><li><div class="p"><b><i>all</i></b> groups can now be extended by adding more members to them.</div></li></ol>
</div></li><li><div class="p">Complex types whose content models are <code>all</code>-groups
can now be extended; the result is an <code>all</code>-group
(usually a larger one).
</div></li><li><div class="p">The discussion of checking content-type restriction
included in an appendix in earlier drafts of this specification
has now been removed, as have some references to published algorithms
for the problem. Several of the papers referred to are no longer
publicly accessible on the Web, and the changes made to the
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> have in any case rendered those
algorithms obsolete. These changes resolve issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6685" shape="rect">6685
Appendix I Checking content-type restriction References Not Available</a>.
</div></li><li><div class="p">Group references are now allowed in
<code>&lt;xs:all&gt;</code> model groups.
Such
references <span class="rfc2119">must</span> have <code>minOccurs=maxOccurs=1</code> and <span class="rfc2119">must</span> refer
to other <code>&lt;xs:all&gt;</code> groups.
(This change
resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7031" shape="rect">
7031 XSD 1.1 doesn't support conversion of xs:sequence to xs:all
because xs:all can't contain groups references</a>.)
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_xpath" id="ch_xpath" shape="rect"></a>G.1.4 Assertions and XPath</h4><div class="block">Assertions and rules for evaluation of XPaths<ol class="enumar"><li><div class="p">Support for check clauses to
implement some co-occurrence constraints has been added. Each
complex type can carry a list of assertions, which are checked
when the complex type is used to validate an element
information item.</div></li><li><div class="p">The facility for assertions defined in the
working draft of 31 August 2006 has been revised.
<ol class="enumla"><li><div class="p">The <code>report</code> element described in earlier
drafts has been removed. This involves no loss of functionality:
the same effect can be obtained by wrapping the test expression
on an <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element in a negation.</div></li><li><div class="p">The XPath subset defined for assertions has been
eliminated. (A somewhat smaller subset is now defined
for conditional type assignment.)</div></li></ol>
</div></li><li><div class="p">Rules are defined for the evaluation of XPath expressions
(in assertions, in conditional type assignment, or in
identity-constraint definitions).
<ol class="enumla"><li><div class="p">The static and dynamic contexts for XPath evaluation
are explicitly specified.
</div></li><li><div class="p">Rules are provided for constructing the <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance against which the
XPath expressions
are to be evaluated. Different
rules apply in different situations:<ol class="enumlr"><li><div class="p">When assertions on a complex type are evaluated,
only the subtree rooted in an element of that type is
mapped into the data model instance. References to
ancestor elements or other nodes outside the subtree
are not illegal but will not be effective.</div></li><li><div class="p">For conditional type assignment, neither the
ancestors nor the children of the element in question
are included; the conditions for type assignment are
thus effectively restricted to the attributes of the
element.</div></li><li><div class="p">For assertions on simple types, only the value
is provided; the dynamic context includes no
context item.</div></li></ol>
</div></li><li><div class="p">Rules for assigning types to the nodes of the
data model instance are defined. Again, the rules
differ for the different uses of XPaths:<ol class="enumlr"><li><div class="p">When assertions are evaluated, all of the elements
and attributes descended from the element being
validated are typed in the normal way; this has the
effect that comparisons among attribute values (for
example) are performed in a way consistent with the
declarations of the attributes. The element node
itself, however, is not typed (since it has not yet
been completely validated).
</div></li><li><div class="p">For conditional type assignment, the nodes of the
data model instance are untyped.
</div></li></ol>
</div></li></ol>
</div></li><li><div class="p">The conceptual overview now included in
<a href="#Constraint_Summary" shape="rect">Constraint Components (&#167;2.2.4)</a> some
discussion of the overlap in functionality
among identity constraints, conditional type assignment,
and assertions, and identifies some of the factors
which may be relevant in choosing among them; this
change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5023" shape="rect">5023
Relationship between identity constraints and assertions</a>.
</div></li><li><div class="p">The rules for the "available collections" and "default collection"
properties of the <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>
have been simplified; these properties are now
required to be the empty set instead of being
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. This improves interoperability and
resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6540" shape="rect">6540
Available documents in assertions</a>.</div></li><li><div class="p">The <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>
<a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a> used
for the evaluation of assertions has been clarified; it now
<a href="#anchor6541" shape="rect">explicitly includes</a> the functions in the
<a href="#bib-fno" shape="rect">[Functions and Operators]</a> <code>fn</code> namespace and
constructors for all built-in types. This resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6541" shape="rect">6541
Assertions and in-scope functions</a>.</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_complex-derivation" id="ch_complex-derivation" shape="rect"></a>G.1.5 Derivation of complex types</h4><div class="block">Derivation of complex types:<ol class="enumar"><li><div class="p">The rules for checking validity of complex-type restrictions
have been simplified by reformulating the constraint in terms
of local validity: the set of elements or attributes accepted
by a restriction as locally valid must be a subset of those accepted by its
base type. The rules for attributes have also been changed.</div><div class="p">The complex rules involving matching up particles in the base type
and particles in the restriction, with their complex case by
case analysis, have been replaced by a statement of the
constraint which is shorter and more correct.
</div></li><li><div class="p">
It is now possible to specify a target namespace for
local elements and attributes which differs from the target
namespace of the schema document itself, when restricting
a complex type which has local elements or attributes and
which itself is in another namespace. This should
simplify the reuse of types from other namespaces.
</div></li><li><div class="p">
The rules for complex type restriction now allow identity
constraints on local elements. To make this possible,
identity constraints may now be given names and referred to
from elsewhere. Corresponding changes have been made in the
description of the <a href="#s" class="compref" shape="rect">Schema</a> component and in the
rules for <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>QName
resolution<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">
This draft clarifies the rule requiring that any complex
type derived by extension could, in principle, be derived in
three steps from <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> (first a restriction step,
then an extension step, then a restriction step). A
misleading note about the purpose of this rule has been
deleted.
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_complex" id="ch_complex" shape="rect"></a>G.1.6 Changes to complex type definitions</h4><div class="block">Complex type definitions (miscellaneous changes):<ol class="enumar"><li><div class="p">Changes
have been made to
<a href="#sec-cdtt" shape="rect">Locally Declared Type (&#167;3.4.4.1)</a>,
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>, and
<a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
to require more consistency in type
assignment when elements with the same expanded name may
match both a local element declaration and a wildcard
in the same content model.
Conceptually, these
changes are related to
the constraint expressed in
<a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>.
XSD 1.0 allows such content
models even if there is a discrepancy between the type
assigned to elements by the local element declarations
and by the top-level element declaration which
will govern elements which match the wildcard.
For compatibility reasons, such content models are still
allowed, but any element instance which matches the wildcard
is required to have a governing type definition compatible with
the type assigned by the local element declarations
matched by the element's expanded name.
</div></li><li><div class="p">
The elements <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
are now forbidden
to have different values for the <code>mixed</code>
attribute.
</div></li><li><div class="p">The constraint
<a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> now
takes open content into account.
This change, together with the explicit exclusion of
skip wildcards from the constraint, resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5940" shape="rect">5940
Element Declarations Consistent</a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_id" id="ch_id" shape="rect"></a>G.1.7 ID, IDREF, and related types</h4><div class="block">ID, IDREF, and related types:
<ol class="enumar"><li><div class="p">Certain constraints involving
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> have been
extended to include lists of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> and unions including
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>. See e.g.
<a href="#coss-attribute" shape="rect">Constraints on Attribute Declaration Schema Components (&#167;3.2.6)</a>.</div></li><li><div class="p">
An element may now have multiple attributes of type
<code>xs:ID</code>. Elements have always been able to have
multiple children of type <code>xs:ID</code>, but XSD 1.0 forbad
multiple attributes of this type for compatibility
with XML DTDs. (Schemas intended to be translatable into DTD
form should still avoid the practice.) This change should make
it easier for XML vocabularies to support both existing
ID attributes and <code>xml:ID</code>.
</div></li><li><div class="p">
The validation rules for values of type <code>xs:IDREF</code>,
<code>xs:ENTITY</code>, or <code>xs:ENTITIES</code>
are now enforced on default values.
</div></li><li><div class="p">Elements and attributes of type <code>xs:ID</code> may now have
default or fixed values. XSD 1.0 had forbidden this, for
compatibility with XML DTDs.
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_std" id="ch_std" shape="rect"></a>G.1.8 Simple type definitions</h4><div class="block">Changes involving
simple type definitions and
related constraints:
<ol class="enumar"><li><div class="p">A new type definition called
<code>anyAtomicType</code> has been introduced into the type
hierarchy between <code>anySimpleType</code> and all the
<em>atomic</em> built-in type definitions. See <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;3.16.7)</a>.</div></li><li><div class="p">An error in version 1.0 of this
specification relating to the construction of union types from
other union types has been corrected. Unions may now appear
as members of other unions, and all restrictions of unions are
correctly enforced;
the rule <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a> has been
modified to ensure that member types are not
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for facet-restricted unions.
As a result,
<code>xsi:type</code> may no longer be used, as in XSD 1.0,
to subvert restrictions of union types.</div></li><li><div class="p">
The requirement that a facet value be a "valid
restriction" of another, in the context of simple
type restriction, has been clarified.
</div></li><li><div class="p">
No union type may be a member of its own transitive membership,
nor may any type derived from the union. (XSD 1.0 forbad
union datatypes to be members of other unions and thus had
no need to forbid this explicitly.)
</div></li><li><div class="p">Since not all datatypes have a
defined canonical representation for all of their values,
appeals to the canonical forms of values have been
eliminated.</div></li><li><div class="p">Changes have been made to ensure that
the descriptions of the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component and of <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> agree in all
details with those of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div></li><li><div class="p">Equality and identity of lists have been clarified.</div></li><li><div class="p">The fact that <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is its own base type
<a href="#anchor6204" shape="rect">has been clarified</a> (addresses issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6204" shape="rect">6204
anyType/ur-Type: inconsistent whether it has a base-type</a>).</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_elemdecl" id="ch_elemdecl" shape="rect"></a>G.1.9 Element declarations</h4><div class="block">Changes to element declarations:
<ol class="enumar"><li><div class="p">
A new form of co-occurrence constraint has now been defined,
by allowing the type assigned to element instances to
be conditional on properties of the instance (typically
attribute values). The addition of conditional type assignment
has entailed a number of changes:
<ol class="enumla"><li><div class="p">Introduction of a <a href="#tt" class="compref" shape="rect">Type Table</a> property on element declarations,
to hold a sequence of
<a href="#tac" class="compref" shape="rect">Type Alternative</a>s (condition - selected-type pairs) and a default
type definition.</div></li><li><div class="p">Constraints on that table: all types named in the table (including
the default) must be <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</div></li><li><div class="p">Changes to the XML syntax and XML mapping rules
to allow expression of conditional type
bindings: the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element is added,
the content model of <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> is changed.</div></li><li><div class="p">
Validation rules for conditional types:
the definition of <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> is adjusted
to account for conditional type assignment.
</div></li><li><div class="p">
Rules for evaluating the conditional typing tests
(more specifically, rules for constructing a temporary infoset
and then building the XDM instance and evaluating the
XPath expressions as defined elsewhere; priority of
tests is given by document order / component order).
</div></li><li><div class="p">
PSVI changes to reflect details of the conditional typing:
a {type alternative} property is added, and the discussion of
[type fallback] now refers to the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> rather than
to either the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> or to the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> of the
element information item
</div></li><li><div class="p">Introduction of some terminology for discussing conditional
types
(define <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>,
<a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selects<span class="arrow">&#183;</span></a>,
<a href="#key-val-sub-type-restricts" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable as a restriction<span class="arrow">&#183;</span></a>).
</div></li><li><div class="p">Rules for checking type restriction in the presence of conditional
types.</div></li><li><div class="p">
Introduction of a special <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a>
type for use
in identifying conditionally assigned types which violate
restriction rules</div></li><li><div class="p">Miscellaneous supporting editorial changes.</div></li></ol>
</div></li><li><div class="p">
Element declarations may now specify multiple substitution-group
heads.
</div></li><li><div class="p">
Abstract elements may now appear in substitution groups.
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_attrdecl" id="ch_attrdecl" shape="rect"></a>G.1.10 Attribute declarations</h4><div class="block">Attributes:
<ol class="enumar"><li><div class="p">Attribute declarations can now be marked <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a>
(see <a href="#Inherited_attributes" shape="rect">Inherited Attributes (&#167;3.3.5.6)</a>)
and the values of inherited attributes are accessible in the XDM
data model instance constructed for conditional type assignment
(see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>).
</div><div class="p">
Among other consequences, this allows conditional type assignment
to be sensitive to the inherited value of
the <code>xml:lang</code> attribute and thus to the language of
the element's contents. This change was introduced to resolve issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5003" shape="rect">5003
Applicability of &lt;alternative&gt; element to xml:lang</a>,
raised by the <a href="http://www.w3.org/International/core/" shape="rect">W3C Internationalization Core Working Group</a>.
</div></li><li><div class="p">
The rules for default attribute values now refer to the
<a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>,
rather than to the <a href="#vc_a" class="propref" shape="rect">[Value Constraint]</a>; this resolves a bug
in the handling of default values for global attribute
declarations.
</div></li><li><div class="p">The text now makes clear that it is pointless (although
not illegal) for schema documents to supply default or fixed
values for <code>xsi:type</code> and other attributes in the
namespace <code>http://www.w3.org/2001/XMLSchema-instance</code>, since they
will not be applied.
</div></li><li><div class="p">
Default attribute groups are now supported. The
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element can carry a
<code>defaultAttributes</code> attribute, which identifies a
named <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>; each complex type defined in
the schema document then automatically includes that
attribute group, unless this is overridden by the
<code>defaultAttributesApply</code> attribute on the
<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element. Default attribute groups
make it easier to specify attributes which should be accepted
by every complex type in a schema (e.g. <code>xml:id</code>
and <code>xml:lang</code>).
</div></li><li><div class="p">All wildcard unions are now expressible;
this change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6163" shape="rect">6163
3.10.6.3 Attribute Wildcard Union </a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_components" id="ch_components" shape="rect"></a>G.1.11 Component structure</h4><div class="block">Changes in the structure
of schema components:
<ol class="enumar"><li><div class="p">Every component now has an
{annotations} property whose value is a sequence of annotation
elements and out-of-band attributes. See e.g. <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>.</div><div class="p">Annotations are no longer
allowed to vary in the part of a content model shared
by a complex type and its extensions. (This was never
possible in components specified using schema documents,
but was possible in "born-binary" components.)</div></li><li><div class="p">A <a href="#ctd-context" class="propref" shape="rect">{context}</a>
property has been defined for the definitions of complex and
of simple types; this property simplifies testing for the
identity of anonymous type definitions. See e.g. <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>. The {context} property
replaces the {scope} property found in some earlier drafts of
this document.</div></li><li><div class="p">The <a href="#s" class="compref" shape="rect">Schema</a> component has an
additional <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a> property containing all the identity
constraints in the corresponding schema. See <a href="#Schema_details" shape="rect">The Schema Itself (&#167;3.17.1)</a> and <a href="#declare-schema" shape="rect">XML Representations of Schemas (&#167;3.17.2)</a>.</div></li><li><div class="p">The underlying basis for the
definition of all the different kinds of components has
changed to make use of a regular and formal tabulation of
their properties. This has been achieved by introducing
<em>property records</em> wherever version 1.0 had complex
property values. For example instead of describing the
{scope} property as having "either <b><i>global</i></b> or a
complex type definition" for its value, a <a href="#sc_e" class="compref" shape="rect">Scope</a> property record is called for, which in turn has its
own simple properties and values. See e.g. <a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component (&#167;3.3.1)</a>.</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_sva" id="ch_sva" shape="rect"></a>G.1.12 The process of validation</h4><div class="block">The process of validation:
<ol class="enumar"><li><div class="p">
When an <code>xsi:type</code> attribute appears on an element
and has a QName as its value,
but the QName does not resolve to
a known type definition,
the element is assigned a "fallback"
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> for validation. The
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> will be
the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> or the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>,
if available, and
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> otherwise.
The validation process is now explicitly defined
as including the validation of the element and its descendants;
processors no longer have the implicit option
of skipping the element and its descendants.
</div></li><li><div class="p">Element information items which match no particle in a content
model are now to be validated using their <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.
Earlier drafts did not specify what happened in such cases.</div></li><li><div class="p">
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>Lax assessment<span class="arrow">&#183;</span></a> is now required
when an element information item to be validated has neither
a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>; also, lax assessment
now requires that the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of the element
be assessed as well. In XSD 1.0 and in earlier drafts, lax
assessment was optional and did not require the
recursive assessment of
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
</div></li><li><div class="p">
<a name="anchor11764d" id="anchor11764d" shape="rect"></a>
The text now specifies that
if an element has an <code>xsi:type</code> attribute
which does not <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to a type definition,
then the <code>xsi:type</code> attribute is invalid.
</div></li><li><div class="p">
The terminology of assessment has been changed to avoid the
suggestion that an element information item can be
<a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> without being
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.
</div></li><li><div class="p">An anomaly in the definition of <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> has been corrected,
to ensure that elements matching strict or lax wildcards have
the appropriate global element declaration, if it exists, as their
<a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>. (Resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7913" shape="rect">7913
Strange result from definition of governing element declaration</a>.)
</div></li><li><div class="p">The usage of the terms "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>" and
"<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" has been clarified, and definitions
of various forms of document validity have been added
for the convenience of users of this specification;
see <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
(Resolves issues
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5164" shape="rect">5164
validation vs assessment</a> and
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6015" shape="rect">6015
[schema11] valid (and its derivations) vs assessment as used in text</a>.)
</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_psvi" id="ch_psvi" shape="rect"></a>G.1.13 <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a></h4><div class="block">Changes in the
description of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:
<ol class="enumar"><li><div class="p">The presentation of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> has been simplified by removing
the suggestion that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> varies from processor to processor.
Instead, the exposition now makes clearer that the body of information
available in principle after schema-validity assessment is consistent
across all
processors; processors may make different subsets of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
accessible to downstream applications, but when they do so
the variation reflects the implementors' decisions
about what information to expose, not variation in the information
in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">Terms have been defined to describe different subsets of the
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> which may be exposed by processors.</div></li><li><div class="p">Provision is made for exposing the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> of elements and
attributes in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, in the
<span class="anonRef">{schema actual value}</span> property.
</div></li><li><div class="p">The <a href="#e-declaration" class="propref" shape="rect">[element declaration]</a> property and various
other properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> are now described as being
present in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> whenever a <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration
and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition is known for the item,
instead of only when the item is valid.</div></li><li><div class="p">
When the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition of an attribute or element
information item is a list type whose item type is a union,
the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> now includes the
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> for
each item in the list.
</div></li><li><div class="p">
When default values are supplied for attributes with
qualified names, <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed to ensure that the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> property of the attribute's host element has an
appropriate binding for the namespace name. It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
whether <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is also performed on descendants of that element
so as to retain consistency of the infoset. <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>Namespace fixup<span class="arrow">&#183;</span></a> may also be
helpful if the defaulted value is of type
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> or
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>; it is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether fixup is performed for such values.
</div></li><li><div class="p">Annotations given in the XML form of identity-constraint declarations
with <code>ref</code> attributes are now retained in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
form of the containing element declaration. This change resolves
issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6144" shape="rect">6144
annotation on IDC with a 'ref' attribute is lost</a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_conformance" id="ch_conformance" shape="rect"></a>G.1.14 Conformance</h4><div class="block">Changes to the
description of conformance:
<ol class="enumar"><li><div class="p">The set of conformance classes
has been revised and clarified. Instead of
"minimally conforming",
"schema-document aware", and
"Web-aware" processors, this specification
now defines (in section
<a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>) conformance classes for
<a href="#key-gpval" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose validators<span class="arrow">&#183;</span></a>,
<a href="#key-gp-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose schema-validity assessors<span class="arrow">&#183;</span></a>,
<a href="#key-spval" class="termref" shape="rect"><span class="arrow">&#183;</span>special-purpose validators<span class="arrow">&#183;</span></a>, and
<a href="#key-othertools" class="termref" shape="rect"><span class="arrow">&#183;</span>other special-purpose tools<span class="arrow">&#183;</span></a>,
together with terminology which may be useful in describing
particular processors.
This change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7695" shape="rect">7695
Conformance</a>.
</div></li><li><div class="p">A checklist has been included listing ways in which conforming
processors may vary from each other, and terminology has been
provided for some of the more important properties of conforming
processors, in an attempt to make it easier for implementors to
describe concisely which options their processors exercise, and
easier for users to describe what kinds of processor they
require.</div></li><li><div class="p">The definition of <span class="rfc2119">must</span> and <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> have been revised to
specify that conforming processors <span class="rfc2119">must</span> detect and report
error in the schema or schema documents. The quality
and detail of the error messages are not constrained.</div></li><li><div class="p">Implementations are now allowed to support primitive datatypes
and facets beyond those defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
</div></li><li><div class="p">The validity requirements for schema documents are stated more
fully and correctly.</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_schemacomp" id="ch_schemacomp" shape="rect"></a>G.1.15 Schema composition</h4><div class="block">Schema assembly and composition:
<ol class="enumar"><li><div class="p">The <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> construct is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">An <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> construct has been defined;
in some ways it resembles <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
but imposes no constraints on the new definitions provided
for components whose definitions are being overridden.</div></li><li><div class="p">The discussion of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
has been revised to eliminate an ambiguity in earlier versions of
this spec regarding the meaning of cyclic dependencies formed by
use of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>: such
cyclic dependencies are now clearly allowed and have a well defined
meaning.
</div></li><li><div class="p">
When an <code>xsi:schemaLocation</code> attribute provides
information about a schema document location for a
particular namespace, it is no longer an error for it to be
encountered after the first occurrence of an element or
attribute information item in that namespace.
Note, however, that if processing such an <code>xsi:schemaLocation</code>
attribute causes new components to be added to the schema, then
the new components cannot change the assessment outcome of any
information items already seen before the element bearing
the <code>xsi:schemaLocation</code> attribute.
</div></li><li><div class="p">
No <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is needed in a schema document
in order to refer to components in namespaces
<code>http://www.w3.org/2001/XMLSchema</code> or <code>http://www.w3.org/2001/XMLSchema-instance</code>.
In XSD 1.0, the examples showed no such imports, but
there was no rule making it legal to omit the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
</div></li><li><div class="p">The handling of "chameleon" inclusion and redefinition
in schema documents has been simplified. The new target
namespace affects any component or property which would have
the target namespace if the schema document specified one.
This change makes it easier to write assertions in schema
documents without a namespace which are intended to be
included by schema documents with varying target namespaces.
</div></li><li><div class="p">Section <a href="#vsc_failure" shape="rect">Identifying how to react to failure (&#167;C.2.5)</a> has now been added,
defining the terms <b>error</b> and <b>continue</b>
for use in specifying what a processor does or should do
when it seeks components for a given namespace in a given location
but fails to find them there.</div></li><li><div class="p">Schema processors are now explicitly recommended to provide
a user option to control whether the processor attempts to
dereference schema locations indicated in <code>schemaLocation</code>
attributes in the instance document being validated; this resolves
issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5476" shape="rect">5476
xsi:schemaLocation should be a hint, should be MAY not SHOULD</a>.</div></li><li><div class="p">The discussion of <code>schemaLocation</code> information in
<a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> has been revised to try to make clearer
the motivation for recommending user control over whether
schema locations specified in the document instance should
or should not be dereferenced. The new text describes some
circumstances in which such schema locations typically should be
dereferenced and some in which they should not, and attempts to
set useful expectations for users and for implementors.
These changes are intended to resolve issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6655" shape="rect">6655</a>,
raised by the W3C Web Accessibility Initiative's
Protocols and
Formats Working Group.
</div></li><li><div class="p">The discussion of schema import in
<a href="#composition-importLicenseReferences" shape="rect">Licensing References to Components Across Namespaces (&#167;4.2.6.1)</a> now states more
clearly that references to components in external
namespaces are an error if the namespace is not imported;
this change addresses issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5779" shape="rect">5779
QName resolution and xs:import</a>.
</div></li></ol></div></div><div class="div3">
<h4><a name="ch_misc_sub" id="ch_misc_sub" shape="rect"></a>G.1.16 Other substantive changes</h4><div class="block">Miscellaneous substantive changes:
<ol class="enumar"><li><div class="p">The discussion of schema-validity assessment and the invocation
of conforming processors has been revised; additional invocation
patterns have been identified, and names have been given to
the different methods of invoking a processor.</div></li><li><div class="p">When an element cannot be strictly validated because no
element declaration or type definition is available
for it, fallback to lax validation (validating the element
against the built-in type <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>) is now required;
in earlier drafts of this document, fallback to lax validation
was optional.</div></li><li><div class="p">The XML Representation Constraints no longer refer to the
component level; this makes it possible to test a schema
document in isolation to determine whether it conforms or
fails to conform to these rules.</div></li><li><div class="p">The constraints on the XML representation of schemas have been
reformulated to allow them to be checked on schema documents in
isolation, rather than requiring knowledge of the rest of the schema
into which they will be embedded. The consequence is that
some errors are caught not in the XML representation constraints
but by having the XML mapping rules generate faulty components
so that the error can be detected at the component level.
These changes resolve issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6235" shape="rect">6235
Restriction from xs:anySimpleType</a>.</div></li><li><div class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element is now declared with open
content in the schema for schema documents. This change
addressess issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5930" shape="rect">5930
defaultOpenContent in the S4SD</a>.</div></li><li><div class="p">The setting <code>blockDefault="#all"</code> has been removed
from the schema for schema documents; this change resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6120" shape="rect">6120
Reconsider blockDefault=#all</a>.</div></li><li><div class="p">Namespace fixup is now explicitly required in some places where
it is needed but was not mentioned before; these changes resolve
issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6445" shape="rect">6445
Namespace fixup and default namespace</a> and issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6465" shape="rect">6465
Namespace fixup and inherited attributes</a>.</div></li></ol>
</div></div><div class="div3">
<h4><a name="ch_clar" id="ch_clar" shape="rect"></a>G.1.17 Clarifications and editorial changes</h4><div class="block">Clarifications and other
editorial changes:
<ol class="enumar"><li><div class="p">Each named constraint is now given in a separate section, to
simplify reference to them.</div></li><li><div class="p">The XML mapping rules have been reorganized to make them
more perspicuous.</div></li><li><div class="p">The keywords defined by <a href="#rfc-2119" shape="rect">[IETF RFC 2119]</a> to
designate different levels of requirement have been
marked up to distinguish more
consistently between cases where their normative
meaning is
intended (e.g.
"<span class="rfc2119">must</span>") and cases where the words are used in
its everyday sense without conformance implications (e.g.
"must"). See <a href="#intro-terminology" shape="rect">Documentation Conventions and Terminology (&#167;1.5)</a>.</div></li><li><div class="p">A note has been added, warning that
the <b>replace</b> and <b>collapse</b> values
for whitespace handling are not a reliable means of
neutralizing the effects of word-wrapping and pretty-printing
of natural-language data and should not be used for that
purpose.</div></li><li><div class="p">Several minor corrections and
clarifications have been made. The usage of some technical
terminology has been clarified, normalized, and aligned where
appropriate with the usage in
<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>. Conditionals using
"if" have been rephrased to use "if and
only if" where appropriate.</div></li><li><div class="p">The title of the specification has been changed, and the language
defined here is referred to as XSD, not using the name
"XML Schema". This may help reduce confusion between
the language defined here and the broader class of XML schema
languages in general.
</div></li><li><div class="p">Conformance-related language has been reviewed
to avoid confusion between the conformance-related usage of
the verbs <span class="rfc2119">may</span>, <span class="rfc2119">must</span>, and <span class="rfc2119">should</span>, and other usages.</div></li><li><div class="p">Various new terms have been defined, and some existing terms have
been redefined, to reduce confusion and improve legibility. In
some cases, existing terms which were felt insufficiently
informative have been replaced by new terms which may be more
useful.
</div></li><li><div class="p">Following the example of XQuery
1.0 and XSLT 2.0, the terms "<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>" and
"<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>" have been defined and the two
concepts distinguished. The appendix contains lists both of
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> and of <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features.
</div></li><li><div class="p">The term "context-determined-declaration" has been
replaced with the term <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>; this resolves
issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4690" shape="rect">4690
Editorial: 'context-determined declarations' needs more work</a>.</div></li><li><div class="p">The namespace prefixes used to refer to well known namespaces
have been changed and are now more consistent; this resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4316" shape="rect">4316
Make sure namespace prefixes are used appropriately throughout
structures</a>.</div></li><li><div class="p">Numerous small changes were made in the interests of clarity,
completeness, consistency, and precision, and to correct
typographical errors. These changes
resolve a number of issues, including:
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5140" shape="rect">5140
small editorial changes section 3.3</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5148" shape="rect">5148
inconsistent target ns description</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5639" shape="rect">5639
when is value V a valid restriction of value Y?</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5800" shape="rect">5800
Possibly revise list of required infoset properties</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5916" shape="rect">5916
Obsolete editorial note</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5917" shape="rect">5917
Typo in 3.1.1</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5934" shape="rect">5934
Typo concerning &lt;simpleContent mixed="true"&gt;</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6011" shape="rect">6011
[schema11] base URI comments</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6156" shape="rect">6156
Typo in 3.4.2</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6162" shape="rect">6162
&lt;anyAttribute&gt; allows ##definedSibling</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6165" shape="rect">6165
Constraints on XML representation of anyAttribute</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6166" shape="rect">6166
Schema Component Model for Wildcards</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6167" shape="rect">6167
Attribute Wildcard Intersection</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6170" shape="rect">6170
Wildcards and defaultAttributes</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6175" shape="rect">6175
Wildcard overlap</a>;
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6227" shape="rect">6227
Type Derivation OK (simple)</a>; and
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6233" shape="rect">6233
Wrong pointer for [nil] PSVI property</a>.
</div></li><li><div class="p">
Discussions of global components now
<a href="#anchor5918" shape="rect">take &lt;redefine&gt; into account</a> (addresses
issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5918" shape="rect">5918
Top level declarations</a>).</div></li><li><div class="p">The usage of "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>",
"<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>", and related terms has been clarified
and made more consistent.
</div></li><li><div class="p"><a name="anchor10236" id="anchor10236" shape="rect"></a>It has been clarified that fields of
identity constraint definitions can have complex types with simple
content.
</div></li></ol>
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#done" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="issues" id="issues" shape="rect"></a>G.2 Issues not resolved</h3><p>It may be useful
to mention some points
where possible changes to the
specification have been discussed, but on which no changes have,
in the end, been made. In some cases, this resulted from the
XML Schema Working Group's determination that no change was
desirable; in other cases, there was no consensus on the
desirability of change, or no consensus on what change should
be made.
</p><ol class="enumar"><li><div class="p">As noted above, some restrictions on <b><i>all</i></b> groups have
been relaxed; <b><i>all</i></b> groups, however, must still be
top-level groups; they are not allowed to appear within
sequences or choice groups.</div></li><li><div class="p">The namespace-related properties of the basic infoset are
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>fixed up<span class="arrow">&#183;</span></a> when
attributes with qualified names are assigned default values.</div><div class="p">
Other kinds of infoset fixup, however, are still not performed.
Attributes of type <code>ID</code>, <code>IDREF</code>,
<code>IDREFS</code>, and <code>NOTATION</code> do not have
the same effect on the base infoset as they do if declared
in a DTD. (An infoset-to-infoset transformation can be
used to migrate the appropriate information into the base
infoset.)</div></li><li><div class="p">Some existing implementations (and specifications) assume that
elements of type <code>xs:ID</code> uniquely identify themselves,
instead of uniquely identifying their parent. This version of
this specification reaffirms the existing rule, which is that
elements and attributes of type <code>xs:ID</code> uniquely
identify the parent element of the ID attribute or element.
</div></li><li><div class="p">The identity of components is still underspecified (although
a number of points have been clarified, e.g. by the specification
of the {scope} property), with the
result that some schemas can be interpreted either as conformant
or as non-conformant, depending on the interpretation of
the specification's appeals to component identity.</div></li><li><div class="p">The constraint <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>
has been recast, but not at the higher level of abstraction
originally required and expected.</div></li><li><div class="p">The account of schema composition given here has not
eliminated all the uncertainties present in XSD 1.0;
edge cases remain which different conformant implementations
will treat differently.</div></li><li><div class="p">A systematic tabulation of error conditions and definition of
a new system of error codes was originally foreseen for XSD
1.1, but has not been completed for inclusion here. No further work in this area is
currently anticipated.
</div></li></ol></div></div><div class="div1">
<h2><a name="normative-glossary" id="normative-glossary" shape="rect"></a>H Glossary (non-normative)</h2><p>The listing below is for the benefit of readers of a printed version of this
document: it collects together all the definitions which appear in the
document above.</p><dl><dt><a href="#key-L.ed" shape="rect">L(D)</a></dt>
<dd>
For any <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var>, the language
<b><var>L</var>(<var>D</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>D</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>D</var>.</dd>
<dt><a href="#key-L.w" shape="rect">L(W)</a></dt>
<dd>
For any <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>, the language
<b><var>L</var>(<var>W</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>W</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>W</var>.</dd>
<dt><a href="#gloss-NCName" shape="rect">NCName</a></dt>
<dd>An <b>NCName</b> is
a name with no colon, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>. When used in connection with the XML
representation of schema components in this specification, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a> as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></dd>
<dt><a href="#gloss-QName" shape="rect">QName</a></dt>
<dd>A <b>QName</b> is a
name with an optional namespace qualification, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>. When used in connection with the XML
representation of schema components or references to them, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></dd>
<dt><a href="#gloss-cos" shape="rect">Schema Component Constraint</a></dt>
<dd>Constraints on the schema components themselves,
i.e. conditions components <span class="rfc2119">must</span> satisfy to be components at
all. They are located
in the sixth sub-section of the per-component
sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in
<a href="#outcome-cos" shape="rect">Schema Component Constraints (&#167;B.4)</a></dd>
<dt><a href="#gloss-sic" shape="rect">Schema Information Set Contribution</a></dt>
<dd>Augmentations to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>s expressed by schema
components, which follow as a consequence of
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
They are located
in the fifth
sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset (&#167;B.2)</a></dd>
<dt><a href="#gloss-src" shape="rect">Schema Representation Constraint</a></dt>
<dd>Constraints on the representation of schema
components in XML beyond those which are expressed in
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
They are located
in the
third sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a></dd>
<dt><a href="#key-typeDefinitionHierarchy" shape="rect">Type Definition Hierarchy</a></dt>
<dd>Except for <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, every <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> is, by construction,
either a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> or an
<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of some
other type definition. The exception
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of itself.
With the exception of the loop on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, the
graph of these relationships forms
a tree known as the <b>Type Definition
Hierarchy</b> with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as its
root</dd>
<dt><a href="#gloss-cvc" shape="rect">Validation Rules</a></dt>
<dd>Contributions to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> associated with schema
components. They are located
in the fourth sub-section of the
per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
tabulated in <a href="#validation_failures" shape="rect">Validation Rules (&#167;B.1)</a></dd>
<dt><a href="#key-fullyConforming" shape="rect">Web-aware</a></dt>
<dd><b>Web-aware</b> processors are
network-enabled processors which are not only
<a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> but
which additionally <span class="rfc2119">must</span> be capable of accessing schema
documents from the World Wide Web as described in <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web (&#167;2.8)</a> and <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>.
</dd>
<dt><a href="#key-schema" shape="rect">XSD schema</a></dt>
<dd> An <b>XSD schema</b> is a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-null" shape="rect">absent</a></dt>
<dd>Throughout this
specification, the term <b>absent</b> is used as a
distinguished property value denoting absence</dd>
<dt><a href="#key-accept-g" shape="rect">accept</a></dt>
<dd>A model group <var>G</var> is said to <b>accept</b>
or <b>recognize</b> the members of <var>L</var>(<var>G</var>).</dd>
<dt><a href="#key-accept" shape="rect">accept</a></dt>
<dd>A particle <var>P</var> is said to
<b>accept</b> or <b>recognize</b> the members of
<var>L</var>(<var>P</var>). Similarly, a term <var>T</var>
<b>accepts</b> or <b>recognizes</b> the members
of <var>L</var>(<var>T</var>).</dd>
<dt><a href="#key-vv" shape="rect">actual value</a></dt>
<dd>With reference to any
string, interpreted as denoting
an instance of a given datatype, the term
<b>actual value</b> denotes the value to which the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical mapping</a> of that datatype maps the string.
</dd>
<dt><a href="#std-ancestor" shape="rect">ancestor</a></dt>
<dd>The
<b>ancestors</b> of a
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> are its
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and the
<a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of its
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</dd>
<dt><a href="#key-am-set" shape="rect">annotation mapping</a></dt>
<dd>The <b>annotation
mapping</b> of a set of element information items <var>ES</var>
is a sequence of annotations <var>AS</var>, with the following properties:
<div class="constraintlist"><div class="clnumber">1<a id="gl-am-set-exp.ann" name="gl-am-set-exp.ann" shape="rect"> </a><span class="p">
For every <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element information item among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of any element information item in <var>ES</var>, there
is a corresponding <a href="#a" class="compref" shape="rect">Annotation</a> component in <var>AS</var>.
</span><div class="note"><div class="p"><b>Note:</b> As noted above,
the <a href="#a-attributes" class="propref" shape="rect">{attributes}</a> property of
each <a href="#a" class="compref" shape="rect">Annotation</a> component includes
all
the attribute information items on the
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element itself, on the
XML element which represents (and maps to) the
component being annotated, and on any intervening
XML elements, if those attribute information items
have <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>s
different from the XSD namespace.</div></div></div>
<div class="clnumber">2<a id="gl-am-set-imp.ann" name="gl-am-set-imp.ann" shape="rect"> </a><!--* no span class='p' possible here *-->
If any element information item <var>E</var> in <var>ES</var> has any attribute information items
<var>A</var> such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>A</var> is in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>A</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>
is present and not the XSD namespace.</span></div>
<div class="clnumber">2.3 <span class="p"><var>A</var> is not included in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> property
of any annotation component described in
clause <a href="#am-set-exp.ann" shape="rect">1</a>.
</span></div>
</div>
then for each such <var>E</var>, an <a href="#a" class="compref" shape="rect">Annotation</a> component
<var>C</var> will appear in <var>AS</var>, with
<var>C</var>.<a href="#a-application_information" class="propref" shape="rect">{application information}</a>
and
<var>C</var>.<a href="#a-user_information" class="propref" shape="rect">{user information}</a>
each being the empty sequence and
<var>C</var>.<a href="#a-attributes" class="propref" shape="rect">{attributes}</a>
containing all and only those attribute information
items <var>A</var> among <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div>
<div class="clnumber">3 <span class="p">
<var>AS</var> contains no other <a href="#a" class="compref" shape="rect">Annotation</a> components.</span></div>
</div>
</dd>
<dt><a href="#key-am-one" shape="rect">annotation mapping</a></dt>
<dd>The <b>annotation
mapping</b> of a single element information item is the
<a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the singleton set containing that
element.</dd>
<dt><a href="#key-anyAtomicType" shape="rect">anyAtomicType</a></dt>
<dd>There is a further special datatype
called <b><b><i>anyAtomicType</i></b></b>, a
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which is the <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>
of all the primitive
datatypes.</dd>
<dt><a href="#key-anySimpleType" shape="rect">anySimpleType</a></dt>
<dd>A
special <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, whose name is
<b><b><i>anySimpleType</i></b></b> in the
XSD namespace, is the root of the <a href="#key-typeDefinitionHierarchy" class="termref" shape="rect"><span class="arrow">&#183;</span>Type Definition Hierarchy<span class="arrow">&#183;</span></a> for all simple type
definitions. <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> has a lexical space containing
all sequences of characters in the Universal Character
Set (UCS) and a value space containing all
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>
and all finite-length lists of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>.</dd>
<dt><a href="#key-va" shape="rect">assessment</a></dt>
<dd> the word <b>assessment</b>
is used to refer to the overall process of local validation,
recursive determination of
validation outcome, and infoset augmentation, i.e. as a short form for
"<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a>"</dd>
<dt><a href="#key-assessor" shape="rect">assessor</a></dt>
<dd>A <b>schema-validity
assessor</b> (or just <b>assessor</b>)
is a processor which performs full or partial
<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a> of an XML instance document,
element information item, or attribute information item,
with
reference to a conforming schema, and provides access to the
entirety of the resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
The means by which an <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> provides
access to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. </dd>
<dt><a href="#key-att-to" shape="rect">attributed to</a></dt>
<dd>
During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element
information item against its (complex) <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>,
associations
between element and attribute information items among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and the attribute uses,
attribute wildcard, particles
and open contentproperty record on the other, are
established. The element or attribute information item is
<b>attributed to</b> the corresponding component.
</dd>
<dt><a href="#key-automatic" shape="rect">automatically known</a></dt>
<dd>
A type about which a processor possesses prior knowledge, and
which the processor can support without any declaration of the
type being supplied by the user, is said to be <b>automatically known</b>
to the processor.
</dd>
<dt><a href="#key-baseparticle" shape="rect">base particle</a></dt>
<dd>Let the <b>base particle</b> be
the particle of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</dd>
<dt><a href="#key-base-infoset-props" shape="rect">base information set properties</a></dt>
<dd>By <b>base information set properties</b>
are meant the properties listed in
<a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a>.
</dd>
<dt><a href="#key-baseTypeDefinition" shape="rect">base type definition</a></dt>
<dd>The type definition used as the basis
for an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> or
<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> is
known as the <b>base type definition</b> of that
definition</dd>
<dt><a href="#key-basic-particle" shape="rect">basic particle</a></dt>
<dd>A <b>basic
particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-basic-term" shape="rect">basic term</a></dt>
<dd>A
<b>basic term</b> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a> or a
<a href="#w" class="compref" shape="rect">Wildcard</a>.</dd>
<dt><a href="#key-compete" shape="rect">compete</a></dt>
<dd>Two
<a href="#p" class="compref" shape="rect">Particles</a> <var>P</var><sub>1</sub> and <var>P</var><sub>2</sub> contained in some <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
<b>compete</b> with each other if and only if some sequence <var>S</var>
of element information items has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which are
identical except that one path has <var>P</var><sub>1</sub> as its last item and the other
has <var>P</var><sub>2</sub>.</dd>
<dt><a href="#key-competing-paths" shape="rect">competing paths</a></dt>
<dd>Two
(or more) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of a sequence <var>S</var> in a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
are <b>competing paths</b> if and only if
they are identical except for their final items, which
differ.</dd>
<dt><a href="#key-complete-path" shape="rect">complete path</a></dt>
<dd>For
a model group <var>M</var> and a sequence <var>S</var> in <var>L</var>(<var>M</var>), the path
of <var>S</var> in <var>M</var> is a <b>complete path</b>; prefixes of
complete paths which are themselves not complete paths
are <b>incomplete paths</b>.</dd>
<dt><a href="#key-compName" shape="rect">component name</a></dt>
<dd>Declarations
and definitions <span class="rfc2119">may</span> and in
some cases <span class="rfc2119">must</span> have and be identified by
<b>name</b>s, which are
NCNames as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></dd>
<dt><a href="#key-cta-select" shape="rect">conditionally selects</a></dt>
<dd> Given a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T</var> and an element
information item <var>E</var>, <var>T</var> <b>conditionally selects</b> a
type <var>S</var> for <var>E</var> in
the following way. The <a href="#tac-test" class="propref" shape="rect">{test}</a>
expressions in <var>T</var>'s <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> are evaluated, in order,
until one of the <a href="#tac" class="compref" shape="rect">Type Alternative</a>s <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, or until
all have been tried without success. If any
<a href="#tac" class="compref" shape="rect">Type Alternative</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition, none of the following
<a href="#tac" class="compref" shape="rect">Type Alternative</a>s are tried. Then the type <var>S</var> <b>conditionally
selected</b> for <var>E</var> by <var>T</var> is
as described in
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-hack-to-force-template-match-2" name="gl-hack-to-force-template-match-2" shape="rect"> </a><span class="p">
If at least one <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>
<a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, then <var>S</var>
is the type definition selected by the first such <a href="#tac" class="compref" shape="rect">Type Alternative</a>.
</span></div><div class="clnumber">2 <span class="p">
If no <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a>
a type definition, then <var>S</var> is
<var>T</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>.
</span></div></div>
</dd>
<dt><a href="#key-constructed" shape="rect">constructed</a></dt>
<dd>
Datatypes can be <b>constructed</b> from other datatypes by
<b><i>restricting</i></b> the value space or lexical space of a
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> using zero or more
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a>s, by specifying the new datatype as a <b><i>list</i></b>
of items of some <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>,
or by defining it as a <b><i>union</i></b> of some specified sequence of
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</dd>
<dt><a href="#key-contain-xgx" shape="rect">contains</a></dt>
<dd>A model group
<b>contains</b> the components which it either
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-igx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contain-xpx" shape="rect">contains</a></dt>
<dd>A particle
<b>contains</b> the components which it either
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contentModel" shape="rect">content model</a></dt>
<dd>A
particle can be used in a complex type definition to
constrain the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item; such a
particle is called a <b>content model</b></dd>
<dt><a href="#key-dd" shape="rect">context-determined declaration</a></dt>
<dd>
During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, associations between
element and attribute information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and element and attribute declarations on
the other, are also established. When an item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then it is associated with the declaration which is the
<a href="#p-term" class="propref" shape="rect">{term}</a> of the particle. Similarly, when an
attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
then the item is associated with the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of that
<a href="#au" class="compref" shape="rect">Attribute Use</a>. Such declarations are called the
<b>context-determined declarations</b>.
</dd>
<dt><a href="#key-declaration" shape="rect">declaration</a></dt>
<dd><b>declaration</b>
components are associated by (qualified) name to information items
being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-vde" shape="rect">declared entity name</a></dt>
<dd>A string is a
<b>declared entity name</b> if and only if it is equal to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a>
of some unparsed entity information item in the value of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsedEntities]</a>
property of the document information item at the root of the infoset
containing the element or attribute information item whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
the string is.</dd>
<dt><a href="#key-dft-binding" shape="rect">default binding</a></dt>
<dd>
When a sequence of element information items <b>ES</b>
is <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
with respect to a
<a href="#ct" class="compref" shape="rect">Content Type</a> <b>CT</b>
or when a set of attribute information items
<b>AS</b> satisfies clause <a href="#c-aam" shape="rect">2</a> and clause <a href="#c-ra" shape="rect">3</a>
of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
there is a (partial) functional mapping from
the element information items <var>E</var> in the sequence <var>ES</var>
or the attribute information items in
<var>AS</var>
to a <b>default binding</b> for the item,
where the default binding is
an <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
or one
of the keywords <b><i>strict</i></b>, <b><i>lax</i></b>, or <b><i>skip</i></b>,
as follows:
<div class="constraintlist"><div class="clnumber">1 <span class="p">When the item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, the
default binding is that <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</span></div>
<div class="clnumber">2 <span class="p">
When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
<a href="#au" class="compref" shape="rect">Attribute Use</a>, the default binding is
that <a href="#au" class="compref" shape="rect">Attribute Use</a>.
</span></div>
<div class="clnumber">3 <span class="p">
When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
attribute wildcard, the default binding is
an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>,
whose <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and
whose <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>'s
<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> (the other properties in the
<a href="#au" class="compref" shape="rect">Attribute Use</a> are not relevant).
</span></div>
<div class="clnumber">4 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>strict</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and
it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or
a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
the default binding is the keyword <b><i>strict</i></b>.</span></div>
<div class="clnumber">5 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and
it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or
a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
the default binding is
the keyword <b><i>lax</i></b>.</span></div>
<div class="clnumber">6 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
or an <a href="#oc" class="compref" shape="rect">Open Content</a>
with a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> then
the default binding is the keyword
<b><i>skip</i></b>.</span></div>
</div>
</dd>
<dt><a href="#key-dflt-att" shape="rect">defaulted attribute</a></dt>
<dd>A
<b>defaulted attribute</b>
belonging to an element information item <var>E</var>
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governed by<span class="arrow">&#183;</span></a> a complex type <var>T</var>
is any <a href="#au" class="compref" shape="rect">Attribute Use</a>
<var>U</var>
for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>U</var> is a member of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>false</i></b>.
</span></div>
<div class="clnumber">3 <span class="p">
<var>U</var>'s <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">4 <span class="p">
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is not one
of the <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>s from <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>.
</span></div>
<div class="clnumber">5 <span class="p">
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> does not match
any of the
attribute information items in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
as per clause <a href="#c-ctma" shape="rect">2.1</a> of
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> above.
</span></div>
</div>
</dd>
<dt><a href="#key-definition" shape="rect">definition</a></dt>
<dd><b>definition</b> components define internal
schema components that can be used in other schema
components</dd>
<dt><a href="#key-anyType" shape="rect">definition of anyType</a></dt>
<dd>A special complex type
definition, (referred to in earlier versions of this
specification as 'the ur-type definition') whose
name is <b><i>anyType</i></b> in the XSD namespace, is
present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The <b>definition of
<b><i>anyType</i></b></b> serves as default
type definition for element declarations whose XML
representation does not specify one</dd>
<dt><a href="#key-derived" shape="rect">derived</a></dt>
<dd>
If a type definition <var>D</var> can reach a type definition <var>B</var> by following
its base type definition chain, then <var>D</var> is said to be
<b>derived</b> from <var>B</var>.</dd>
<dt><a href="#key-contain-dgp" shape="rect">directly contains</a></dt>
<dd>A model group
<b>directly contains</b> the particles in the value of its
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property.</dd>
<dt><a href="#key-contain-dpt" shape="rect">directly contains</a></dt>
<dd>A particle
<b>directly contains</b> the component which is the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</dd>
<dt><a href="#key-evc" shape="rect">effective value constraint</a></dt>
<dd>
The <b>effective value constraint</b> of an attribute use
<var>U</var>
is <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, otherwise
<var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present,
otherwise
the <b>effective value constraint</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-ep" shape="rect">element particle</a></dt>
<dd>
An <b>element particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
</dd>
<dt><a href="#key-equivalenceClass" shape="rect">element substitution group</a></dt>
<dd>Through the
mechanism of <b>element substitution
groups</b>, XSD provides a more powerful model
than DTDs do
supporting substitution of one named element for
another</dd>
<dt><a href="#key-equiv-ta" shape="rect">equivalent type alternative</a></dt>
<dd>
Any <a href="#tac" class="compref" shape="rect">Type Alternative</a> is <b>equivalent</b> to itself.
Otherwise, any <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>T1</var> is <b>equivalent</b>
to a different <a href="#tac" class="compref" shape="rect">Type Alternative</a>
<var>T2</var> if and only if
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> and
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> are true for the same
set of input element information items
and
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> accept
the same set of input information items as valid.
In the general case, equivalence and non-equivalence
can be difficult to establish.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under just what conditions a
processor detects that two type
alternatives are equivalent, but all
processors <span class="rfc2119">must</span> detect <var>T1</var> and <var>T2</var> as
equivalent if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
have the same number of <a href="#nb" class="compref" shape="rect">Namespace Binding</a>s, and for each entry in
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
there is a corresponding entry in
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
with the same <a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value.
</span></div>
<div class="clnumber">3 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value.
</span></div>
<div class="clnumber">4 <span class="p">
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
have the same value.
</span></div>
<div class="clnumber">5 <span class="p">
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> are the same type definition.
</span></div>
</div>
A processor <span class="rfc2119">may</span> treat two type alternatives as
non-equivalent if they do not satisfy the conditions just
given and the processor does not detect that they
are nonetheless equivalent.
</dd>
<dt><a href="#key-equiv-tt" shape="rect">equivalent type table</a></dt>
<dd>
A <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T1</var> is <b>equivalent</b> to a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T2</var>
if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>T1</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> has the same length as <var>T2</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and their
corresponding entries are <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">2 <span class="p">
<var>T1</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> and <var>T2</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> are
<a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
</span></div>
</div></dd>
<dt><a href="#key-typeExtension" shape="rect">extension</a></dt>
<dd>A complex
type definition which allows element or attribute content in
addition to that allowed by another specified type definition
is said to be an <b>extension</b></dd>
<dt><a href="#key-ct-final" shape="rect">final</a></dt>
<dd>the complex type is said to be
<b>final</b>, because no
further <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> are possible</dd>
<dt><a href="#dt-full_instance_subset" shape="rect">full instance subset</a></dt>
<dd>The
<b>full instance subset</b> of the PSVI includes almost all
properties defined by this specification as applying to
element and attribute information items, but excludes
schema components. It
consists of
the <a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>,
plus the following properties for elements:</dd>
<dt><a href="#key-general-purpose" shape="rect">general-purpose</a></dt>
<dd>A <b>general-purpose</b> processor
is a <a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>validator<span class="arrow">&#183;</span></a> or <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> which accepts schemas represented in the
form of XML documents as described in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>.
</dd>
<dt><a href="#key-governing" shape="rect">governing</a></dt>
<dd>The declaration associated with an information
item, if any, and with respect to which its validity is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in a given assessment episode
is said to <b>govern</b> the item, or to be its
<b>governing</b> element or attribute declaration.
Similarly the type definition with respect to which the
type-validity of an item is assessed is its
<b>governing</b> type definition.</dd>
<dt><a href="#key-governing-ad" shape="rect">governing attribute declaration</a></dt>
<dd>
In a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode,
the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration of an attribute
(its <b>governing attribute declaration</b>)
is the first of
the following which applies:
<div class="constraintlist"><div class="clnumber">1<a id="gl-c-ad" name="gl-c-ad" shape="rect"> </a><span class="p">A declaration which was stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3<a id="gl-c-adbyr" name="gl-c-adbyr" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local
name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace
name]</a>,
provided the attribute
is not
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>
and the processor has not
stipulated a type definition at the start of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
</span></div>
</div>
If none of these applies, the attribute
has no <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> is
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
</dd>
<dt><a href="#key-governing-ed" shape="rect">governing element declaration</a></dt>
<dd> The <b>governing element declaration</b> of
an element information item <var>E</var>,
in a given schema-validity
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following
which applies:
<div class="constraintlist"><div class="clnumber">1<a id="gl-elem-stipulated" name="gl-elem-stipulated" shape="rect"> </a><span class="p">A
declaration stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="gl-elem-cdd" name="gl-elem-cdd" shape="rect"> </a><span class="p"><var>E</var>'s
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
declaration<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="gl-elem-wc-split" name="gl-elem-wc-split" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>
to by <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>
and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
name]</a>, provided that <var>E</var>
is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> either to a <b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
or to a <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">4<a id="gl-elem-wc" name="gl-elem-wc" shape="rect"> </a><!--* no span class='p' possible here *-->A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by
<var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local
name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
name]</a>, provided that
<b>none</b> of the following is true:
<div class="constraintlist"><div class="clnumber">4.1<a id="gl-no-id-if-skipped" name="gl-no-id-if-skipped" shape="rect"> </a><span class="p"><var>E</var> is
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> </span></div>
<div class="clnumber">4.2 <span class="p">the
processor has stipulated a type definition for
<var>E</var> </span></div>
<div class="clnumber">4.3 <span class="p">a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> exists for
<var>E</var></span></div>
</div>
</div>
</div>
If none of these
applies,
<var>E</var> has
no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> (or, in equivalent words,
<var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </dd>
<dt><a href="#key-governing-type-elem" shape="rect">governing type definition</a></dt>
<dd> The <b>governing type definition</b> of an
element information item <var>E</var>,
in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following which
applies: <div class="constraintlist"><div class="clnumber">1<a id="gl-stipulated-plus-xsitype" name="gl-stipulated-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> a type
definition stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="gl-stipulated" name="gl-stipulated" shape="rect"> </a><span class="p">A type definition stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">3<a id="gl-governing-plus-xsitype" name="gl-governing-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">4<a id="gl-gov-no-xsitype" name="gl-gov-no-xsitype" shape="rect"> </a><span class="p">The <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">5 <span class="p">The value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
if <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">6 <span class="p"> An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">7 <span class="p">The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">8 <span class="p">An
<a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a>.</span></div>
</div>
If none of these
applies,
there is no
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </dd>
<dt><a href="#key-governing-type-att" shape="rect">governing type definition</a></dt>
<dd>
The <b>governing type definition</b> of an
attribute, in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is
the first of the following which applies:
<div class="constraintlist"><div class="clnumber">1 <span class="p">A type definition stipulated by the processor (see
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">The <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of the
<a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>.</span></div>
</div>
If neither of these applies, there is no
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
</dd>
<dt><a href="#key-grouping" shape="rect">grouping</a></dt>
<dd>A
<b>grouping</b> of a sequence is a set of sub-sequences, some or
all of which may be empty, such that each member of the original
sequence appears once and only once in one of the sub-sequences and
all members of all sub-sequences are in the original
sequence.</dd>
<dt><a href="#key-impl-defined" shape="rect">implementation-defined</a></dt>
<dd>An <b>implementation-defined</b>
feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this
specification; the precise behavior is not specified by
this specification but <span class="rfc2119">must</span> be specified by the
implementor for each particular conforming implementation.</dd>
<dt><a href="#key-impl-dep" shape="rect">implementation-dependent</a></dt>
<dd>An <b>implementation-dependent</b>
feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this
specification; the precise behavior is not specified by
this or any other W3C specification
and is not required to be specified by the implementor
for any particular implementation.</dd>
<dt><a href="#key-impl-cont" shape="rect">implicitly contains</a></dt>
<dd>A list
of particles <b>implicitly contains</b> an element declaration if and only if a
member of the list contains that
element declaration in its <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-contain-igx" shape="rect">indirectly contains</a></dt>
<dd>A model group
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
by the particles it
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contain-ipx" shape="rect">indirectly contains</a></dt>
<dd>A particle
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are contained by the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</dd>
<dt><a href="#key-iv" shape="rect">initial value</a></dt>
<dd>the
<b>initial value</b> of some
attribute information item is the value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> property of that item. Similarly, the <b>initial value</b> of an element information item is the string composed of, in order, the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> of each character information item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that
element information item</dd>
<dt><a href="#key-itd" shape="rect">instance-specified type definition</a></dt>
<dd>An <b>instance-specified type definition</b>
is a type definition associated with an element information
item in the following way: <div class="constraintlist"><div class="clnumber">1<a id="gl-xsi-type-att" name="gl-xsi-type-att" shape="rect"> </a><span class="p">Among the element's attribute information items is one
named <code>xsi:type</code>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of that attribute information item is a
qualified name <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
respect to the built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, as
defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>. </span></div>
<div class="clnumber">3 <span class="p">The
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>)
<a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a>
to a type definition.
It is this type definition which is the
<b>instance-specified type definition</b>.</span></div>
</div> </dd>
<dt><a href="#dt-instance-validity_subset" shape="rect">instance-validity subset</a></dt>
<dd>
The <b>instance-validity subset</b> of the PSVI consists of
the <a href="#dt-root-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity subset<span class="arrow">&#183;</span></a>, plus the following properties on elements,
wherever applicable:
</dd>
<dt><a href="#key-iso" shape="rect">item isomorphic to a component</a></dt>
<dd> by an <b>item isomorphic</b> to a component is meant
an information item whose type is equivalent to the component's, with
one property per property of the component, with the same name, and
value either the same atomic value, or an information item
corresponding in the same way to its component value, recursively, as
necessary</dd>
<dt><a href="#key-lva" shape="rect">laxly assessed</a></dt>
<dd>The schema validity of an element information item <var>E</var> is
said to be <b>laxly assessed</b> if and only if
<b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has neither a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>
nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var> is locally
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as defined in
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, and the schema-validity of
<var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
is assessed as described in clause <a href="#c-deepa" shape="rect">2</a> and clause <a href="#c-deepe" shape="rect">3</a>
of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.</span></div>
</div>
</dd>
<dt><a href="#key-ldtype" shape="rect">locally declared type</a></dt>
<dd>
Every <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> determines a partial functional mapping from
element or attribute
information items (and their <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>) to type
definitions. This mapping serves as a <b>locally declared type</b>
for elements
and attributes which are allowed by
the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</dd>
<dt><a href="#key-ldt-att" shape="rect">locally declared type</a></dt>
<dd>
For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and a given attribute
information item <var>A</var>, the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>A</var> within <var>CTD</var> is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-dummy3" name="gl-dummy3" shape="rect"> </a><b>If </b>
<var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<var>A</var> has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as some
attribute declaration <var>D</var> which is the
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of some
<a href="#au" class="compref" shape="rect">Attribute Use</a> contained by <var>CTD</var>'s
<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
, <b>then </b>
the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
</div><div class="clnumber">3 <b>otherwise </b>
the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>A</var> within
<var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div>
</dd>
<dt><a href="#key-ldt-elem" shape="rect">locally declared type</a></dt>
<dd>
For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
<var>CTD</var> and a given element information item <var>E</var>, the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>E</var> within <var>CTD</var> is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-dummy1" name="gl-dummy1" shape="rect"> </a><b>If </b>
<var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
, <b>then </b>
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="clnumber">2 <b>If </b>
<var>E</var>
has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
some element declaration <var>D</var> which is <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> by <var>CTD</var>'s
content model, whether <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>, <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>
, <b>then </b>
the
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
</div><div class="clnumber">3 <b>otherwise </b>
the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
<var>E</var> within
<var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div>
</dd>
<dt><a href="#loc-locallyValid-seq" shape="rect">locally valid</a></dt>
<dd>
A sequence of element information items is <b>locally valid</b> with
respect to a <a href="#ct" class="compref" shape="rect">Content Type</a> if and only if it satisfies
<a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a> with respect to that <a href="#ct" class="compref" shape="rect">Content Type</a>.
</dd>
<dt><a href="#key-lvip" shape="rect">locally valid</a></dt>
<dd>A sequence <var>S</var> of
element information items is <b>locally valid</b> against
a particle <var>P</var> if and only if
<var>S</var> has a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>P</var>. The set of all such
sequences is written <var>V</var>(<var>P</var>).</dd>
<dt><a href="#key-e-d-match" shape="rect">match</a></dt>
<dd>
An element information item <var>E</var> <b>matches</b> an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var> if and only if
<b>one</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>,</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>E</var> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an element
declaration <var>D</var><sub>2</sub> which is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a>
for <var>D</var>.</span></div>
</div>
</dd>
<dt><a href="#key-en-match" shape="rect">match</a></dt>
<dd>An
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var> <b>matches</b> an
<a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a> <var>N</var> and
a namespace name <var>NS</var> (or, equivalently, <var>N</var> and <var>NS</var>
<b>match</b> <var>E</var>)
if and only if all of the following
are true:
<ul><li><div class="p">The local name of <var>E</var> is identical to <var>N</var>.</div></li><li><div class="p">Either the namespace name of <var>E</var> is identical to <var>NS</var>,
or else <var>E</var> has no namespace name (<var>E</var> is an unqualified
name) and <var>NS</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></li></ul>
</dd>
<dt><a href="#key-wc-match" shape="rect">match</a></dt>
<dd>An element information item <var>E</var>
<b>matches</b> a <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>
(or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is <var>W</var>)
if and only if <var>E</var>
is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>W</var>, as defined in the validation rule
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</dd>
<dt><a href="#key-ns-match" shape="rect">match</a></dt>
<dd>Two namespace
names <var>N</var><sub>1</sub> and <var>N</var><sub>2</sub> are said to <b>match</b>
if and only if they are identical or both are <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#term-ns-fixup" shape="rect">namespace fixup</a></dt>
<dd>When
default values are supplied for attributes, <b>namespace fixup</b>
may be required, to ensure that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes
the namespace bindings needed and maintains the consistency
of the namespace information in the infoset. To perform
namespace fixup on an element information item <var>E</var> for
a namespace <var>N</var>:
<div class="constraintlist"><div class="clnumber">1 <span class="p">If the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var>
binds a prefix to <var>N</var>, no
namespace fixup is needed; the properties of <var>E</var>
are not changed.</span></div>
<div class="clnumber">2 <span class="p">Otherwise, first select some prefix <var>P</var> which is not bound by
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> (the choice of
prefix
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>).</span></div>
<div class="clnumber">3 <span class="p">Add an entry to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> binding <var>P</var> to <var>N</var>.</span></div>
<div class="clnumber">4 <span class="p">Add a namespace attribute to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of <var>E</var>.</span></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Maintain the consistency of the information set by adjusting
the namespace bindings on the descendants of <var>E</var>. This may
be done in either of two ways:<div class="constraintlist"><div class="clnumber">5.1 <span class="p">Add the binding of <var>P</var> to <var>N</var> to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of all
descendants of <var>E</var>, except where that binding is overridden
by another binding for <var>P</var>.</span></div>
<div class="clnumber">5.2 <span class="p">Add to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of each child of <var>E</var> a namespace
attribute which undeclares the binding for <var>P</var> (i.e. a
namespace attribute for prefix <var>P</var> whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
is the empty string), unless that child already has a
namespace declaration for prefix <var>P</var>.
Note that this approach is possible
only if <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use,
rather than <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>.</span></div>
</div>
<div class="p">The choice between the two methods of maintaining
consistency in the information set is
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</div></div>
</div></dd>
<dt><a href="#key-nilled" shape="rect">nilled</a></dt>
<dd>An
element information item <var>E</var> is <b>nilled</b>
with respect to some element declaration <var>D</var> if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has
<code>xsi:nil</code> = <b><i>true</i></b>. </span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>. </span></div>
</div>
</dd>
<dt><a href="#key-nv" shape="rect">normalized value</a></dt>
<dd>The
<b>normalized value</b> of an element or attribute
information item is an <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> which has been normalized
according to the value of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and the values of any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with the simple type definition used
in its <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>. The keywords for
whitespace normalization have the following meanings:
<div class="glist"><div class="gitem"><div class="giLabel">preserve</div><div class="giDef"><div class="p">No normalization is done, the
whitespace-normalized value
is the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a></div></div></div><div class="gitem"><div class="giLabel">replace</div><div class="giDef"><div class="p">All occurrences of <code>#x9</code> (tab),
<code>#xA</code> (line feed) and <code>#xD</code> (carriage
return) are replaced with <code>#x20</code>
(space).</div></div></div><div class="gitem"><div class="giLabel">collapse</div><div class="giDef"><div class="p">Subsequent to the replacements specified above under
<b>replace</b>, contiguous sequences of
<code>#x20</code>s are collapsed to a single
<code>#x20</code>, and initial and/or final
<code>#x20</code>s are deleted.</div></div></div></div>
Similarly, the
<b>normalized value</b> of any string with respect to a
given simple type definition is the string resulting from
normalization using the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>
and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with that simple type definition.
</dd>
<dt><a href="#key-facets-overlay" shape="rect">overlay</a></dt>
<dd>
Given two sets of facets <var>B</var> and <var>S</var>,
the result of <b>overlaying</b> <var>B</var> with <var>S</var> is the set of facets <var>R</var>
for which
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="gl-fr1" name="gl-fr1" shape="rect"> </a><span class="p">Every facet in <b>S</b> is in <b>R</b>.</span></div>
<div class="clnumber">2<a id="gl-fr2" name="gl-fr2" shape="rect"> </a><span class="p">
Every facet in <b>B</b> is in <b>R</b>,
unless
it is of the same kind as some
facet in <b>S</b>,
in which case it is not included in <b>R</b>.
</span></div>
<div class="clnumber">3 <span class="p">Every facet in <b>R</b> is required by clause <a href="#fr1" shape="rect">1</a>
or clause <a href="#fr2" shape="rect">2</a> above.</span></div>
</div>
</dd>
<dt><a href="#key-overrides" shape="rect">override</a></dt>
<dd>An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> <var>S</var> is said to
<b>override</b> another type definition <var>T</var> if and only
if all of the following are true: <div class="constraintlist"><div class="clnumber">1 <span class="p"><var>S</var> is the
<a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> on some element information item
<var>E</var>. A <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> may or may not be known for <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p"><var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the blocking keywords of
the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> of
<var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, if any, or <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>validly
substitutable without limitation<span class="arrow">&#183;</span></a> for
<var>T</var> (if no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> is known).</span></div>
</div> <div class="note"><div class="p"><b>Note:</b> Typically, <var>T</var>
would be the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> for <var>E</var> if it were not
overridden. (This will be the case if <var>T</var> was stipulated by
the processor, as described in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>, or <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> and
<var>T</var> is its declared type, or <var>T</var> is the
<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>E</var>.) </div></div> </dd>
<dt><a href="#key-partition" shape="rect">partition</a></dt>
<dd>A
<b>partition</b> of a sequence is a sequence of sub-sequences,
some or all of which <span class="rfc2119">may</span> be empty, such that concatenating all
the sub-sequences yields the original sequence</dd>
<dt><a href="#key-path" shape="rect">path</a></dt>
<dd>When a sequence <var>S</var> of element information
items is checked against a model group <var>M</var>, the sequence of
<a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a>
which the items of <var>S</var> match, in order, is a
<b>path</b> of <var>S</var> in <var>M</var>. For a given <var>S</var> and
<var>M</var>, the
path of <var>S</var> in
<var>M</var> is not necessarily unique.
Detailed rules for the matching, and thus for the construction of
paths, are given in <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and <a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>.
</dd>
<dt><a href="#key-psvi" shape="rect">post-schema-validation infoset</a></dt>
<dd>We refer to the augmented infoset which
results from conformant processing as defined in this
specification as the <b>post-schema-validation
infoset</b>, or <b>PSVI</b></dd>
<dt><a href="#key-p-inherited" shape="rect">potentially inherited</a></dt>
<dd>An attribute
information item <var>A</var>, whether explicitly specified in the input
information set or defaulted as described in
<a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>, is <b>potentially inherited</b> by
an element information item <var>E</var> if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
<var>A</var> is among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of one of <var>E</var>'s ancestors.
</span></div>
<div class="clnumber">2 <span class="p">
<var>A</var> and <var>E</var> have the same
<span class="anonRef">[validation context]</span>.
</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *--><b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
<var>A</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
</span></div>
<div class="clnumber">3.2 <span class="p">
<var>A</var> is <em>not</em> <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> any <a href="#au" class="compref" shape="rect">Attribute Use</a>
but <var>A</var> has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> whose
<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
</span></div>
</div></div>
</div>
</dd>
<dt><a href="#key-nonnull" shape="rect">present</a></dt>
<dd>
A property value
which is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is <b>present</b>.</dd>
<dt><a href="#t-propRec" shape="rect">property record</a></dt>
<dd>a property
value may itself be a collection of named values, which we call
a <b>property record</b></dd>
<dt><a href="#key-resolve" shape="rect">resolve</a></dt>
<dd>
A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in a schema document
<b>resolves to</b> a component in a schema if and only if in the
context of that schema the QName and the component together satisfy the rule
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>. A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in
an input document, or a pair consisting of a local name and a namespace name,
<b>resolves to</b> a component in a schema if and only if in the
context of that schema the QName (or the name + namespace pair) and the
component together satisfy the rule <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
</dd>
<dt><a href="#key-typeRestriction" shape="rect">restriction</a></dt>
<dd>A
type defined with the same constraints as its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>, or with more, is
said to be a <b>restriction</b>. </dd>
<dt><a href="#dt-root-validity_subset" shape="rect">root-validity subset</a></dt>
<dd>The
<b>root-validity subset</b> of the PSVI consists of the
following properties of the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:
</dd>
<dt><a href="#c" shape="rect">schema component</a></dt>
<dd><b>Schema
component</b> is the generic term for the building blocks
that make up the abstract data model
of the schema. </dd>
<dt><a href="#key-schemaDoc" shape="rect">schema document</a></dt>
<dd>A document in this
form (i.e. a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item)
is a <b>schema document</b></dd>
<dt><a href="#key-s-v-a" shape="rect">schema-validity assessment</a></dt>
<dd>As it is used in this specification, the
term <b>schema-validity assessment</b> has three aspects: <div class="constraintlist"><div class="clnumber">1<a id="gl-c-lsv" name="gl-c-lsv" shape="rect"> </a><span class="p">Determining local schema-validity, that is
whether an element or attribute information item satisfies
the constraints embodied in the
relevant components of an
XSD schema
(specifically the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
element or attribute declaration and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
type definition);</span></div>
<div class="clnumber">2 <span class="p">Determining an
overall validation outcome for the item
by combining local schema-validity with
the results of schema-validity assessments of its
descendants, if any; and</span></div>
<div class="clnumber">3 <span class="p">Determining the appropriate
augmentations to the infoset (and, if desired, exposing them
to downstream applications in some way, to record this
outcome).</span></div>
</div></dd>
<dt><a href="#key-selected-type" shape="rect">selected type definition</a></dt>
<dd>The <b>selected type
definition</b> <var>S</var> of an element information item <var>E</var> is a
type definition associated with <var>E</var> in the following way. Let
<var>D</var> be the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> of <var>E</var>. Then: <div class="constraintlist"><div class="clnumber">1<a id="gl-hack-will-it-work-haha-yes" name="gl-hack-will-it-work-haha-yes" shape="rect"> </a><span class="p"> If <var>D</var> has a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <var>S</var> is the type <a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selected<span class="arrow">&#183;</span></a> for
<var>E</var> by <var>D</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>. </span></div>
<div class="clnumber">2 <span class="p">If
<var>D</var> has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <var>S</var> is <var>D</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div>
If <var>E</var> has no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>, then <var>E</var> has no selected
type definition.</dd>
<dt><a href="#key-selector-subset" shape="rect">selector subset of XPath</a></dt>
<dd>
The subset of XPath defined in
<a href="#c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a> is called the
<b>selector subset</b> of XPath.
</dd>
<dt><a href="#key-field-subset" shape="rect">selector subset of XPath</a></dt>
<dd>
The subset of XPath defined in
<a href="#c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a> is called the
<b>field subset</b> of XPath.
</dd>
<dt><a href="#key-skipped" shape="rect">skipped</a></dt>
<dd>
An element or attribute information item is <b>skipped</b> if it
is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b> wildcard or if one of its ancestor
elements is.
</dd>
<dt><a href="#key-special-purpose" shape="rect">special-purpose</a></dt>
<dd>A
schema processor which is not a <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>
processor is a <b>special-purpose</b>
processor.</dd>
<dt><a href="#key-sva" shape="rect">strictly assessed</a></dt>
<dd>An element
information item <var>E</var> is said to be <b>strictly assessed</b>
if and only if
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="gl-c-xd" name="gl-c-xd" shape="rect"> </a><!--* no span class='p' possible here *-->
<b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="gl-c-ed" name="gl-c-ed" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1<a id="gl-dummy-id-to-force-special-list-processing-for-parent" name="gl-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> element declaration
is known for <var>E</var>, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration.
</span></div>
<div class="clnumber">1.1.2 <span class="p"><var>E</var>'s local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with
respect to that declaration has been evaluated as per
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</span></div>
<div class="clnumber">1.1.3 <span class="p">If that evaluation involved the evaluation of
<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, clause <a href="#c-ct" shape="rect">1</a> thereof is satisfied.</span></div>
</div></div>
<div class="clnumber">1.2<a id="gl-c-td" name="gl-c-td" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.2.1 <span class="p">
<var>E</var> does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a>.
</span></div>
<div class="clnumber">1.2.2 <span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
type definition is known for <var>E</var>, namely its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
</span></div>
<div class="clnumber">1.2.3<a id="gl-another-dummy-id-to-force-special-list-processing-for-parent" name="gl-another-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">The local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of <var>E</var> with respect to its
<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has been evaluated as
per <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
</div>
</div>
<div class="clnumber">2<a id="gl-c-deepa" name="gl-c-deepa" shape="rect"> </a><!--* no span class='p' possible here *-->
For each of the attribute information items among
<var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
the attribute has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>
, <b>then </b>
its schema-validity is assessed with respect to that
declaration, as defined in <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>.
</div><div class="clnumber">2.2 <b>otherwise </b>
its schema-validity is not assessed.
</div></div>
</div>
<div class="clnumber">3<a id="gl-c-deepe" name="gl-c-deepe" shape="rect"> </a><!--* no span class='p' possible here *-->
For each of the element information items among its
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>
the child has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
, <b>then </b>
its schema-validity is assessed with respect to that
declaration or type definition, as defined in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.
</div><div class="clnumber">3.2 <b>If </b>
the child is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b>
<a href="#w" class="compref" shape="rect">Wildcard</a>
, <b>then </b>
its schema-validity is not assessed.
</div><div class="clnumber">3.3 <b>otherwise </b>
its schema-validity is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> with
respect to <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
</div></div>
</div>
</div>
</dd>
<dt><a href="#key-validly-sub" shape="rect">substitutable</a></dt>
<dd>One element declaration is <b> substitutable</b>
for another if together they satisfy constraint <a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</dd>
<dt><a href="#key-eq" shape="rect">substitution group</a></dt>
<dd> Every element declaration (call this
<b>HEAD</b>) in the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a> of a schema defines a <b>substitution
group</b>, a subset of those <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>. An element declaration is in
the <b>substitution group</b> of <b>HEAD</b> if
and only if it is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for
<b>HEAD</b>. </dd>
<dt><a href="#key-cta-ta-select" shape="rect">successfully selects</a></dt>
<dd>A <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>A</var>
<b>successfully selects</b> a <a href="#td" class="compref" shape="rect">Type Definition</a> <var>T</var> for an
element information item <var>E</var> if and only if <var>A</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> evaluates to
<code>true</code> and <var>A</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> = <var>T</var>.</dd>
<dt><a href="#key-symbolSpace" shape="rect">symbol space</a></dt>
<dd>this specification introduces the term <b>symbol
space</b> to denote a collection of names, each of which is
unique with respect to the others</dd>
<dt><a href="#key-targetNS" shape="rect">target namespace</a></dt>
<dd>Several
kinds of component have a <b>target namespace</b>, which
is either <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or a
namespace name, also as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></dd>
<dt><a href="#key-targetset" shape="rect">target set</a></dt>
<dd>The
<b>target set</b> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information
item <var>E</var> contains <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of any <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item
in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of <var>E</var>.</span></div>
<div class="clnumber">3 <span class="p">The schema document identified by the <code>schemaLocation</code>
attribute of any <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element information item
in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
of <var>E</var>.</span></div>
</div>
The <b>target set</b> of <var>E</var> contains no other schema documents.
</dd>
<dt><a href="#td" shape="rect">type definition</a></dt>
<dd>This specification
uses the phrase <b>type definition</b> in cases where no
distinction need be made between simple and complex
types</dd>
<dt><a href="#dt-type-aware_subset" shape="rect">type-aware subset</a></dt>
<dd>The
<b>type-aware subset</b> of the PSVI consists of the
<a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, plus the following
items and properties.</dd>
<dt><a href="#dt-lightweight_type-aware_subset" shape="rect">type-aware subset</a></dt>
<dd>The
<b>lightweight type-aware subset</b> of the PSVI provides
the same information as the
<a href="#dt-type-aware_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>type-aware subset<span class="arrow">&#183;</span></a>, except that instead of providing
direct access to schema components, it provides only their names and
related information.</dd>
<dt><a href="#key-TYPE-value" shape="rect">typed value</a></dt>
<dd>
When the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is
or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a simple type definition <var>T</var>, the value is also
referred to as a <b><var>T</var> value</b>.
</dd>
<dt><a href="#key-vn" shape="rect">valid</a></dt>
<dd>
<b>Validation</b> is the process of determining
whether an XML document, an element information item, or an
attribute information item obeys the constraints expressed in a
schema; in the context of XSD, this amounts to calculating the
value of the appropriate item's <a href="#e-validity" class="propref" shape="rect">[validity]</a> property. </dd>
<dt><a href="#cd-ct-extension" shape="rect">valid extension</a></dt>
<dd>
A complex type <b>T</b> is a <b>valid extension</b> of its
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if
<b>T</b>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
= <b><i>extension</i></b>
and
<var>T</var>
satisfies the constraint <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a></dd>
<dt><a href="#cd-ct-restriction" shape="rect">valid restriction</a></dt>
<dd>A complex
type definition with <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b> is a <b>valid
restriction</b> of its <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if the constraint <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a> is
satisfied</dd>
<dt><a href="#cd-st-restriction" shape="rect">valid restriction</a></dt>
<dd>A
simple type definition <b>T</b> is a
<b>valid restriction</b> of its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
if and only if <b>T</b> satisfies constraint
<a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a></dd>
<dt><a href="#key-vtype" shape="rect">validating type</a></dt>
<dd>
When a string <var>N</var> is schema-valid with respect to a simple type definition
<var>T</var> as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
Valid</a> with the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>V</var>,
<div class="constraintlist"><div class="clnumber">1 <span class="p">
The <b>validating type</b> of <var>V</var> is <var>T</var> if <var>T</var> is not a union type,
otherwise the validating type is the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic
member</a> of <var>T</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <var>N</var>.
</span></div>
<div class="clnumber">2 <span class="p">
If the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of <var>V</var> is a list type <var>L</var> and the
<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of <var>L</var> is <var>I</var>, then the
<b>validating type</b> of an (atomic) item value <var>A</var> occurring in <var>V</var> is
<var>I</var> if <var>I</var> is not a union type, otherwise the validating type is the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic member</a> of
<var>I</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> the substring in <var>N</var>
that corresponds to <var>A</var>.
</span></div>
</div></dd>
<dt><a href="#key-vr" shape="rect">validation root</a></dt>
<dd>The element or attribute information item at which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> begins is called the
<b>validation root</b>.</dd>
<dt><a href="#key-vpath" shape="rect">validation-path</a></dt>
<dd>For any sequence <var>S</var> of element
information items and any particle <var>P</var>, a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a <b>validation-path</b> if and only if for each
prefix of the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> which ends with a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the
corresponding prefix of <var>S</var> has no <a href="#key-competing-paths" class="termref" shape="rect"><span class="arrow">&#183;</span>competing path<span class="arrow">&#183;</span></a> which
ends with an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#key-validator" shape="rect">validator</a></dt>
<dd>A
<b>validator</b> (or <b>instance validator</b>) is a
processor which <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> an XML instance document against a
conforming schema and distinguishes between valid documents
and others, for one or more of the definitions of validity
(<a href="#key-root-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity<span class="arrow">&#183;</span></a>,
<a href="#key-deep-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>deep validity<span class="arrow">&#183;</span></a>,
or
<a href="#key-uniformly-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>uniform validity<span class="arrow">&#183;</span></a>)
defined below in section
<a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
Conforming validators <span class="rfc2119">may</span> additionally support other
definitions of validity defined in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#key-val-sub-type" shape="rect">validly substitutable</a></dt>
<dd>A type definition <var>S</var> is
<b>validly substitutable</b> for another type <var>T</var>,
subject to a
set of blocking keywords <var>K</var> (typically drawn from the set
{<b><i>substitution</i></b>, <b><i>extension</i></b>,
<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} used in
the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> and
<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> of
element declarations and type definitions), if and
only if either <ul><li><div class="p"><var>S</var> and <var>T</var> are both complex
type definitions and <var>S</var> is validly derived from <var>T</var>
subject to the
blocking keywords in the union of <var>K</var> and <var>T</var>.
<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>,
as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
<ul><li><div class="p"><var>S</var> is a complex type definition, <var>T</var> is a
simple type definition, and <var>S</var> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<var>T</var> subject to the
blocking keywords in <var>K</var>, as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
<ul><li><div class="p"><var>S</var> is a simple type definition and <var>S</var> is
validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <var>T</var> subject to the blocking keywords in
<var>K</var>, as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></li></ul></dd>
<dt><a href="#key-val-sub-type-absolute" shape="rect">validly substitutable without limitation</a></dt>
<dd>If the set of keywords controlling whether
a type <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> is the
empty set, then <var>S</var> is said to be <b>validly
substitutable</b> for <var>T</var> <b>without limitation</b>
or <b>absolutely</b>. The phrase <b>validly
substitutable</b>, without mention of any set of blocking
keywords, means "validly substitutable without
limitation".</dd>
<dt><a href="#key-val-sub-type-restricts" shape="rect">validly substitutable as a restriction</a></dt>
<dd>A type definition <var>S</var> is <b>validly
substitutable as a restriction</b> for another type <var>T</var> if
and only if <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the
blocking keywords {<b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b>}.</dd>
<dt><a href="#key-wp" shape="rect">wildcard particle</a></dt>
<dd>
A <b>wildcard particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#w" class="compref" shape="rect">Wildcard</a>.
Wildcard particles may be
referred to as "strict", "lax",
or "skip" particles,
depending on the
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property
of their <a href="#p-term" class="propref" shape="rect">{term}</a>.</dd>
<dt><a href="#key-error" shape="rect">xs:error</a></dt>
<dd>A special simple type
definition, whose name is <b><i>error</i></b> in the XSD
namespace, is also present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The
<b>XSD <code>error</code> type</b>
has no valid instances. It can be used in any place where
other types are normally used; in particular, it can be used
in conditional type assignment to cause elements which satisfy
certain conditions to be invalid. </dd>
</dl></div><div class="div1">
<h2><a name="nonnormative-schemaDTD" id="nonnormative-schemaDTD" shape="rect"></a>I DTD for Schemas (non-normative)</h2><p>The DTD for schema documents is given below. Note there is <em>no</em>
implication here that <code>schema</code> <span class="rfc2119">must</span> be the root element of a
document.</p><p>
Independent copies of this material are
available in an undated (mutable) version at
<a href="http://www.w3.org/2009/XMLSchema/XMLSchema.dtd" shape="rect">http://www.w3.org/2009/XMLSchema/XMLSchema.dtd</a>
and in a dated (immutable) version at
<a href="http://www.w3.org/2011/07/XMLSchema.dtd" shape="rect">http://www.w3.org/2011/07/XMLSchema.dtd</a>
&#8212; the mutable version will be updated with future revisions of
this specification, and the immutable one will not.
</p><p>Although this DTD is non-normative, any XML document which is
not valid per this DTD, given redefinitions in its internal subset of the
'p' and 's' parameter entities below appropriate to its namespace
declaration of the XSD namespace, is almost certainly not
a valid schema document, with the exception of documents with multiple namespace
prefixes for the XSD namespace itself. Accordingly
authoring <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> using this DTD and DTD-based authoring tools, and
specifying it as the DOCTYPE of documents intended to be <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> and validating them with a validating XML parser, are
sensible development strategies which users are encouraged to adopt
until XSD-based authoring tools and validators are more widely available.</p><div class="sfsScrap" id="div_dtdfsd">
<a id="dtdfsd" name="dtdfsd" shape="rect"></a>
<div class="sfsHead">DTD for Schema Documents</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;!-- DTD for XML Schema Definition Language Part 1: Structures
Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
Official Location: http://www.w3.org/2001/XMLSchema.dtd --&gt;
&lt;!-- Id: structures.dtd,v 1.1 2003/08/28 13:30:52 ht Exp --&gt;
&lt;!-- With the exception of cases with multiple namespace
prefixes for the XSD namespace, any XML document which is
not valid per this DTD given redefinitions in its internal subset of the
'p' and 's' parameter entities below appropriate to its namespace
declaration of the XSD namespace is almost certainly not
a valid schema document. --&gt;
&lt;!-- See below (at the bottom of this document) for information about
the revision and namespace-versioning policy governing this DTD. --&gt;
&lt;!-- The simpleType element and its constituent parts
are defined in XML Schema Definition Language Part 2: Datatypes --&gt;
&lt;!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' &gt;
&lt;!ENTITY % p 'xs:'&gt; &lt;!-- can be overridden in the internal subset of a
schema document to establish a different
namespace prefix --&gt;
&lt;!ENTITY % s ':xs'&gt; &lt;!-- if %p is defined (e.g. as foo:) then you must
also define %s as the suffix for the appropriate
namespace declaration (e.g. :foo) --&gt;
&lt;!ENTITY % nds 'xmlns%s;'&gt;
&lt;!-- Define all the element names, with optional prefix --&gt;
&lt;!ENTITY % schema "%p;schema"&gt;
&lt;!ENTITY % defaultOpenContent "%p;defaultOpenContent"&gt;
&lt;!ENTITY % complexType "%p;complexType"&gt;
&lt;!ENTITY % complexContent "%p;complexContent"&gt;
&lt;!ENTITY % openContent "%p;openContent"&gt;
&lt;!ENTITY % simpleContent "%p;simpleContent"&gt;
&lt;!ENTITY % extension "%p;extension"&gt;
&lt;!ENTITY % element "%p;element"&gt;
&lt;!ENTITY % alternative "%p;alternative"&gt;
&lt;!ENTITY % unique "%p;unique"&gt;
&lt;!ENTITY % key "%p;key"&gt;
&lt;!ENTITY % keyref "%p;keyref"&gt;
&lt;!ENTITY % selector "%p;selector"&gt;
&lt;!ENTITY % field "%p;field"&gt;
&lt;!ENTITY % group "%p;group"&gt;
&lt;!ENTITY % all "%p;all"&gt;
&lt;!ENTITY % choice "%p;choice"&gt;
&lt;!ENTITY % sequence "%p;sequence"&gt;
&lt;!ENTITY % any "%p;any"&gt;
&lt;!ENTITY % anyAttribute "%p;anyAttribute"&gt;
&lt;!ENTITY % attribute "%p;attribute"&gt;
&lt;!ENTITY % attributeGroup "%p;attributeGroup"&gt;
&lt;!ENTITY % include "%p;include"&gt;
&lt;!ENTITY % import "%p;import"&gt;
&lt;!ENTITY % redefine "%p;redefine"&gt;
&lt;!ENTITY % override "%p;override"&gt;
&lt;!ENTITY % notation "%p;notation"&gt;
&lt;!ENTITY % assert "%p;assert"&gt;
&lt;!-- annotation elements --&gt;
&lt;!ENTITY % annotation "%p;annotation"&gt;
&lt;!ENTITY % appinfo "%p;appinfo"&gt;
&lt;!ENTITY % documentation "%p;documentation"&gt;
&lt;!-- Customisation entities for the ATTLIST of each element type.
Define one of these if your schema takes advantage of the
anyAttribute='##other' in the
schema for schema documents --&gt;
&lt;!ENTITY % schemaAttrs ''&gt;
&lt;!ENTITY % defaultOpenContentAttrs ''&gt;
&lt;!ENTITY % complexTypeAttrs ''&gt;
&lt;!ENTITY % complexContentAttrs ''&gt;
&lt;!ENTITY % openContentAttrs ''&gt;
&lt;!ENTITY % simpleContentAttrs ''&gt;
&lt;!ENTITY % extensionAttrs ''&gt;
&lt;!ENTITY % elementAttrs ''&gt;
&lt;!ENTITY % groupAttrs ''&gt;
&lt;!ENTITY % allAttrs ''&gt;
&lt;!ENTITY % choiceAttrs ''&gt;
&lt;!ENTITY % sequenceAttrs ''&gt;
&lt;!ENTITY % anyAttrs ''&gt;
&lt;!ENTITY % anyAttributeAttrs ''&gt;
&lt;!ENTITY % attributeAttrs ''&gt;
&lt;!ENTITY % attributeGroupAttrs ''&gt;
&lt;!ENTITY % uniqueAttrs ''&gt;
&lt;!ENTITY % keyAttrs ''&gt;
&lt;!ENTITY % keyrefAttrs ''&gt;
&lt;!ENTITY % selectorAttrs ''&gt;
&lt;!ENTITY % fieldAttrs ''&gt;
&lt;!ENTITY % assertAttrs ''&gt;
&lt;!ENTITY % includeAttrs ''&gt;
&lt;!ENTITY % importAttrs ''&gt;
&lt;!ENTITY % redefineAttrs ''&gt;
&lt;!ENTITY % overrideAttrs ''&gt;
&lt;!ENTITY % notationAttrs ''&gt;
&lt;!ENTITY % annotationAttrs ''&gt;
&lt;!ENTITY % appinfoAttrs ''&gt;
&lt;!ENTITY % documentationAttrs ''&gt;
&lt;!ENTITY % complexDerivationSet "CDATA"&gt;
&lt;!-- #all or space-separated list drawn from derivationChoice --&gt;
&lt;!ENTITY % blockSet "CDATA"&gt;
&lt;!-- #all or space-separated list drawn from
derivationChoice + 'substitution' --&gt;
&lt;!ENTITY % composition '%include; | %import; | %override; | %redefine;'&gt;
&lt;!ENTITY % mgs '%all; | %choice; | %sequence;'&gt;
&lt;!ENTITY % cs '%choice; | %sequence;'&gt;
&lt;!ENTITY % formValues '(qualified|unqualified)'&gt;
&lt;!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'&gt;
&lt;!ENTITY % assertions '(%assert;)*'&gt;
&lt;!ENTITY % particleAndAttrs '(%openContent;?, (%mgs; | %group;)?,
%attrDecls;, %assertions;)'&gt;
&lt;!-- This is used in part2 --&gt;
&lt;!ENTITY % restriction1 '(%openContent;?, (%mgs; | %group;)?)'&gt;
%xs-datatypes;
&lt;!-- the duplication below is to produce an unambiguous content model
which allows annotation everywhere --&gt;
&lt;!ELEMENT %schema; ((%composition; | %annotation;)*,
(%defaultOpenContent;, (%annotation;)*)?,
((%simpleType; | %complexType;
| %element; | %attribute;
| %attributeGroup; | %group;
| %notation; ),
(%annotation;)*)* )&gt;
&lt;!ATTLIST %schema;
targetNamespace %URIref; #IMPLIED
version CDATA #IMPLIED
%nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
xmlns CDATA #IMPLIED
finalDefault %complexDerivationSet; ''
blockDefault %blockSet; ''
id ID #IMPLIED
elementFormDefault %formValues; 'unqualified'
attributeFormDefault %formValues; 'unqualified'
defaultAttributes CDATA #IMPLIED
xpathDefaultNamespace CDATA '##local'
xml:lang CDATA #IMPLIED
%schemaAttrs;&gt;
&lt;!-- Note the xmlns declaration is NOT in the
schema for schema documents,
because at the Infoset level where schemas operate,
xmlns(:prefix) is NOT an attribute! --&gt;
&lt;!-- The declaration of xmlns is a convenience for schema authors --&gt;
&lt;!-- The id attribute here and below is for use in external references
from non-schemas using simple fragment identifiers.
It is NOT used for schema-to-schema reference, internal or
external. --&gt;
&lt;!ELEMENT %defaultOpenContent; ((%annotation;)?, %any;)&gt;
&lt;!ATTLIST %defaultOpenContent;
appliesToEmpty (true|false) 'false'
mode (interleave|suffix) 'interleave'
id ID #IMPLIED
%defaultOpenContentAttrs;&gt;
&lt;!-- a type is a named content type specification which allows attribute
declarations--&gt;
&lt;!-- --&gt;
&lt;!ELEMENT %complexType; ((%annotation;)?,
(%simpleContent;|%complexContent;|
%particleAndAttrs;))&gt;
&lt;!ATTLIST %complexType;
name %NCName; #IMPLIED
id ID #IMPLIED
abstract %boolean; #IMPLIED
final %complexDerivationSet; #IMPLIED
block %complexDerivationSet; #IMPLIED
mixed (true|false) 'false'
defaultAttributesApply %boolean; 'true'
%complexTypeAttrs;&gt;
&lt;!-- particleAndAttrs is shorthand for a root type --&gt;
&lt;!-- mixed is disallowed if simpleContent, overridden if complexContent has one too. --&gt;
&lt;!-- If anyAttribute appears in one or more referenced attributeGroups
and/or explicitly, the intersection of the permissions is used --&gt;
&lt;!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %complexContent;
mixed (true|false) #IMPLIED
id ID #IMPLIED
%complexContentAttrs;&gt;
&lt;!ELEMENT %openContent; ((%annotation;)?, (%any;)?)&gt;
&lt;!ATTLIST %openContent;
mode (none|interleave|suffix) 'interleave'
id ID #IMPLIED
%openContentAttrs;&gt;
&lt;!-- restriction should use the branch defined above, not the simple
one from part2; extension should use the full model --&gt;
&lt;!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %simpleContent;
id ID #IMPLIED
%simpleContentAttrs;&gt;
&lt;!-- restriction should use the simple branch from part2, not the
one defined above; extension should have no particle --&gt;
&lt;!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))&gt;
&lt;!ATTLIST %extension;
base %QName; #REQUIRED
id ID #IMPLIED
%extensionAttrs;&gt;
&lt;!-- an element is declared by either:
a name and a type (either nested or referenced via the type attribute)
or a ref to an existing element declaration --&gt;
&lt;!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
(%alternative;)*,
(%unique; | %key; | %keyref;)*)&gt;
&lt;!-- simpleType or complexType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level --&gt;
&lt;!ATTLIST %element;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
type %QName; #IMPLIED
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
nillable %boolean; #IMPLIED
substitutionGroup %QName; #IMPLIED
abstract %boolean; #IMPLIED
final %complexDerivationSet; #IMPLIED
block %blockSet; #IMPLIED
default CDATA #IMPLIED
fixed CDATA #IMPLIED
form %formValues; #IMPLIED
targetNamespace %URIref; #IMPLIED
%elementAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
name and ref are mutually exclusive, one is required --&gt;
&lt;!-- In the absence of type AND ref, type defaults to type of
substitutionGroup, if any, else xs:anyType, i.e. unconstrained --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;
&lt;!ELEMENT %alternative; ((%annotation;)?,
(%simpleType; | %complexType;)?) &gt;
&lt;!ATTLIST %alternative;
test CDATA #IMPLIED
type %QName; #IMPLIED
xpathDefaultNamespace CDATA #IMPLIED
id ID #IMPLIED &gt;
&lt;!ELEMENT %group; ((%annotation;)?,(%mgs;)?)&gt;
&lt;!ATTLIST %group;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%groupAttrs;&gt;
&lt;!ELEMENT %all; ((%annotation;)?, (%element;| %group;| %any;)*)&gt;
&lt;!ATTLIST %all;
minOccurs (0 | 1) #IMPLIED
maxOccurs (0 | 1) #IMPLIED
id ID #IMPLIED
%allAttrs;&gt;
&lt;!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %choice;
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%choiceAttrs;&gt;
&lt;!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %sequence;
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%sequenceAttrs;&gt;
&lt;!-- an anonymous grouping in a model, or
a top-level named group definition, or a reference to same --&gt;
&lt;!ELEMENT %any; (%annotation;)?&gt;
&lt;!ATTLIST %any;
namespace CDATA #IMPLIED
notNamespace CDATA #IMPLIED
notQName CDATA ''
processContents (skip|lax|strict) 'strict'
minOccurs %nonNegativeInteger; '1'
maxOccurs CDATA '1'
id ID #IMPLIED
%anyAttrs;&gt;
&lt;!-- namespace is interpreted as follows:
##any - - any non-conflicting WFXML at all
##other - - any non-conflicting WFXML from namespace other
than targetNamespace
##local - - any unqualified non-conflicting WFXML/attribute
one or - - any non-conflicting WFXML from
more URI the listed namespaces
references
##targetNamespace ##local may appear in the above list,
with the obvious meaning --&gt;
&lt;!-- notNamespace is interpreted as follows:
##local - - any unqualified non-conflicting WFXML/attribute
one or - - any non-conflicting WFXML from
more URI the listed namespaces
references
##targetNamespace ##local may appear in the above list,
with the obvious meaning --&gt;
&lt;!ELEMENT %anyAttribute; (%annotation;)?&gt;
&lt;!ATTLIST %anyAttribute;
namespace CDATA #IMPLIED
notNamespace CDATA #IMPLIED
notQName CDATA ''
processContents (skip|lax|strict) 'strict'
id ID #IMPLIED
%anyAttributeAttrs;&gt;
&lt;!-- namespace and notNamespace are interpreted as for 'any' above --&gt;
&lt;!-- simpleType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level, name iff at top level --&gt;
&lt;!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)&gt;
&lt;!ATTLIST %attribute;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
type %QName; #IMPLIED
use (prohibited|optional|required) #IMPLIED
default CDATA #IMPLIED
fixed CDATA #IMPLIED
form %formValues; #IMPLIED
targetNamespace %URIref; #IMPLIED
inheritable %boolean; #IMPLIED
%attributeAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
name and ref are mutually exclusive, one is required --&gt;
&lt;!-- default for use is optional when nested, none otherwise --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;
&lt;!-- type attr and simpleType content are mutually exclusive --&gt;
&lt;!-- an attributeGroup is a named collection of attribute decls, or a
reference thereto --&gt;
&lt;!ELEMENT %attributeGroup; ((%annotation;)?,
(%attribute; | %attributeGroup;)*,
(%anyAttribute;)?) &gt;
&lt;!ATTLIST %attributeGroup;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
%attributeGroupAttrs;&gt;
&lt;!-- ref iff no content, no name. ref iff not top level --&gt;
&lt;!-- better reference mechanisms --&gt;
&lt;!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %unique;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
id ID #IMPLIED
%uniqueAttrs;&gt;
&lt;!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %key;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
id ID #IMPLIED
%keyAttrs;&gt;
&lt;!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %keyref;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
refer %QName; #IMPLIED
id ID #IMPLIED
%keyrefAttrs;&gt;
&lt;!ELEMENT %selector; ((%annotation;)?)&gt;
&lt;!ATTLIST %selector;
xpath %XPathExpr; #REQUIRED
xpathDefaultNamespace CDATA #IMPLIED
id ID #IMPLIED
%selectorAttrs;&gt;
&lt;!ELEMENT %field; ((%annotation;)?)&gt;
&lt;!ATTLIST %field;
xpath %XPathExpr; #REQUIRED
xpathDefaultNamespace CDATA #IMPLIED
id ID #IMPLIED
%fieldAttrs;&gt;
&lt;!-- co-constraint assertions --&gt;
&lt;!ELEMENT %assert; ((%annotation;)?)&gt;
&lt;!ATTLIST %assert;
test %XPathExpr; #REQUIRED
id ID #IMPLIED
xpathDefaultNamespace CDATA #IMPLIED
%assertAttrs;&gt;
&lt;!-- Schema combination mechanisms --&gt;
&lt;!ELEMENT %include; (%annotation;)?&gt;
&lt;!ATTLIST %include;
schemaLocation %URIref; #REQUIRED
id ID #IMPLIED
%includeAttrs;&gt;
&lt;!ELEMENT %import; (%annotation;)?&gt;
&lt;!ATTLIST %import;
namespace %URIref; #IMPLIED
schemaLocation %URIref; #IMPLIED
id ID #IMPLIED
%importAttrs;&gt;
&lt;!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
%attributeGroup; | %group;)*&gt;
&lt;!ATTLIST %redefine;
schemaLocation %URIref; #REQUIRED
id ID #IMPLIED
%redefineAttrs;&gt;
&lt;!ELEMENT %override; ((%annotation;)?,
((%simpleType; | %complexType; | %group; | %attributeGroup;) |
%element; | %attribute; | %notation;)*)&gt;
&lt;!ATTLIST %override;
schemaLocation %URIref; #REQUIRED
id ID #IMPLIED
%overrideAttrs;&gt;
&lt;!ELEMENT %notation; (%annotation;)?&gt;
&lt;!ATTLIST %notation;
name %NCName; #REQUIRED
id ID #IMPLIED
public CDATA #REQUIRED
system %URIref; #IMPLIED
%notationAttrs;&gt;
&lt;!-- Annotation is either application information or documentation --&gt;
&lt;!-- By having these here they are available for datatypes as well
as all the structures elements --&gt;
&lt;!ELEMENT %annotation; (%appinfo; | %documentation;)*&gt;
&lt;!ATTLIST %annotation; %annotationAttrs;&gt;
&lt;!-- User must define annotation elements in internal subset for this
to work --&gt;
&lt;!ELEMENT %appinfo; ANY&gt; &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %appinfo;
source %URIref; #IMPLIED
id ID #IMPLIED
%appinfoAttrs;&gt;
&lt;!ELEMENT %documentation; ANY&gt; &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %documentation;
source %URIref; #IMPLIED
id ID #IMPLIED
xml:lang CDATA #IMPLIED
%documentationAttrs;&gt;
&lt;!NOTATION XMLSchemaStructures PUBLIC
'structures' 'http://www.w3.org/2001/XMLSchema.xsd' &gt;
&lt;!NOTATION XML PUBLIC
'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' &gt;
&lt;!--
In keeping with the XML Schema WG's standard versioning policy,
this DTD will persist at the URI
http://www.w3.org/2011/07/XMLSchema.dtd.
At the date of issue it can also be found at the URI
http://www.w3.org/2009/XMLSchema/XMLSchema.dtd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XSD
and its namespace. In other words, if XSD or the XML Schema
namespace change, the version of this document at
http://www.w3.org/2009/XMLSchema/XMLSchema.dtd will change accordingly;
the version at http://www.w3.org/2011/07/XMLSchema.dtd
will not change.
Previous dated (and unchanging) versions of this DTD include:
http://www.w3.org/2009/04/structures.dtd
(XSD 1.1 Candidate Recommendation)
http://www.w3.org/2004/10/structures.dtd
(XSD 1.0 Recommendation, Second Edition)
http://www.w3.org/2001/05/structures.dtd
(XSD 1.0 Recommendation, First Edition)
--&gt;
</pre></div></div></div><div class="div1">
<h2><a name="non-ambig" id="non-ambig" shape="rect"></a>J Analysis of the Unique Particle Attribution Constraint (non-normative)</h2><p>A specification of the import of <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> which does
not appeal to a processing model is difficult. What follows is intended as
guidance, without claiming to be complete.</p><div class="block"><span class="termdef"><a name="key-overlap" id="key-overlap" title="" shape="rect">[Definition:]&#160;&#160;</a>Two non-group
particles <b>overlap</b> if </span>
<ul><li><div class="p">They are both element declaration particles whose declarations have the
same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</div></li></ul>
or
<ul><li><div class="p">They are both element declaration particles
and one of them has the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
as
an element declaration in the
other's <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>.</div></li></ul>
or
<ul><li><div class="p">
They are both <b><i>global</i></b> element declaration particles and their
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a> contain the same
element declaration.
</div></li></ul>
or
<ul><li><div class="p">They are both wildcards, and any one of the following is true of the wildcard intersection of their <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s as defined
in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>:
<ol class="enumar"><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</div></li><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>.</div></li><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> &#8800; the empty set.</div></li></ol>
</div></li></ul>
</div><div class="block">A content model will violate the unique attribution constraint if it
contains two particles which <a href="#key-overlap" class="termref" shape="rect"><span class="arrow">&#183;</span>overlap<span class="arrow">&#183;</span></a> and which either
<ul><li><div class="p">are both in the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a <b><i>choice</i></b> or
<b><i>all</i></b> group</div></li></ul>
or
<ul><li><div class="p">may <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> adjacent information items and the first has
<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> less than <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</div></li></ul>
</div><p>Two particles may <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> adjacent information items if they are
separated by at most epsilon transitions in the most obvious transcription of a
content model into a finite-state automaton.</p><p>A precise formulation of this constraint can also be offered in terms of
operations on finite-state automaton: transcribe the content model into an
automaton in the usual way using epsilon transitions for optionality and
unbounded maxOccurs, unfolding other numeric occurrence ranges and treating the heads of <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a> as if
they were choices over all elements in the group, <em>but</em> using not
element QNames as transition labels, but rather pairs of element QNames and
positions in the model. Determinize this automaton, treating wildcard transitions as
if
they were distinct from all other edge labels for the purposes of the
determinization. Now replace all
QName+position transition labels with the element QNames alone. If the result has any states
with two or more identical-QName-labeled transitions from it, or two
wildcard transitions whose intentional intersection is non-empty, the model does not
satisfy the Unique Attribution constraint. </p></div><div class="div1">
<h2><a name="nonnormative-language-ids" id="nonnormative-language-ids" shape="rect"></a>K XSD Language Identifiers (non-normative)</h2><div class="glist"><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema</code></div><div class="giDef"><div class="p">XSD</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0</code></div><div class="giDef"><div class="p">XSD 1.0</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1</code></div><div class="giDef"><div class="p">XSD 1.1</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e</code></div><div class="giDef"><div class="p">XSD 1.0 First Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e</code></div><div class="giDef"><div class="p">XSD 1.1 First Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19990506</code></div><div class="giDef"><div class="p">XSD 1.0 in 6 May 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19990924</code></div><div class="giDef"><div class="p">XSD 1.0 in 24 September 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19991105</code></div><div class="giDef"><div class="p">XSD 1.0 in 5 November 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19991217</code></div><div class="giDef"><div class="p">XSD 1.0 in 17 December 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000225</code></div><div class="giDef"><div class="p">XSD 1.0 in 25 February 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000407</code></div><div class="giDef"><div class="p">XSD 1.0 in 7 April 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000922</code></div><div class="giDef"><div class="p">XSD 1.0 in 22 September 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20001024</code></div><div class="giDef"><div class="p">XSD 1.0 Candidate Recommendation (CR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010316</code></div><div class="giDef"><div class="p">XSD 1.0 first Proposed Recommendation (PR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010330</code></div><div class="giDef"><div class="p">XSD 1.0 second Proposed Recommendation (PR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010502</code></div><div class="giDef"><div class="p">XSD 1.0 Recommendation</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20040318</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition Proposed Edited Recommendation (PER)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20041028</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition Recommendation</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20040716</code></div><div class="giDef"><div class="p">XSD 1.1 in 16 July 2004 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20050224</code></div><div class="giDef"><div class="p">XSD 1.1 in 24 February 2005 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060116</code></div><div class="giDef"><div class="p">XSD 1.1 in 16 January 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060217</code></div><div class="giDef"><div class="p">XSD 1.1 in 17 February 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060330</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 March 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060831</code></div><div class="giDef"><div class="p">XSD 1.1 in 31 August 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20070830</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 August 2007 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20080620</code></div><div class="giDef"><div class="p">XSD 1.1 in 20 June 2008 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090130</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 January 2009 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090430</code></div><div class="giDef"><div class="p">XSD 1.1 Candidate Recommendation, 30 April 2009</div></div></div></div></div><div class="div1">
<h2><a name="biblio" id="biblio" shape="rect"></a>L References</h2><div class="div2">
<h3><span class="nav"> <a href="#nonnormative-references" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="normative-references" id="normative-references" shape="rect"></a>L.1 Normative</h3><dl><dt class="label"><a name="bib-fno" id="bib-fno" shape="rect"></a>Functions and Operators</dt><dd>
World Wide Web Consortium.
<em>XQuery 1.0 and XPath 2.0 Functions and Operators</em>,
ed. Ashok Malhotra, Jim Melton, and Norman Walsh.
W3C Recommendation
23 January 2007. See
<a href="http://www.w3.org/TR/xpath-functions/" shape="rect">http://www.w3.org/TR/xpath-functions/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="rfc-2119" id="rfc-2119" shape="rect"></a>IETF RFC 2119</dt><dd>
Bradner, Scott.
<em>RFC
2119: Key words for use in RFCs to Indicate Requirement Levels.</em>
IETF (Internet Engineering Task Force), 1997. See <a href="http://www.ietf.org/rfc/rfc2119.txt" shape="rect">http://www.ietf.org/rfc/rfc2119.txt</a>.</dd><dt class="label"><a name="ref-xml-namespaces-1.0" id="ref-xml-namespaces-1.0" shape="rect"></a>Namespaces in XML 1.0</dt><dd>
World Wide Web Consortium.
<em>Namespaces in XML1.0 (Second Edition)</em>,
ed. Tim Bray et al.
W3C Recommendation 16 August 2006.
See <a href="http://www.w3.org/TR/xml-names/" shape="rect">http://www.w3.org/TR/xml-names/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
For details of the
dependency of this specification on Namespaces in XML 1.0, see
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>. </span></dd><dt class="label"><a name="bib-xdm" id="bib-xdm" shape="rect"></a>XDM</dt><dd>
World Wide Web Consortium.
<em>XQuery 1.0 and XPath 2.0 Data Model (XDM)</em>,
ed. Mary Fern&#225;ndez et al.
W3C Recommendation
23 January 2007. See
<a href="http://www.w3.org/TR/xpath-datamodel/" shape="rect">http://www.w3.org/TR/xpath-datamodel/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="ref-xml-1.0" id="ref-xml-1.0" shape="rect"></a>XML 1.0</dt><dd>
World Wide Web Consortium.
<em>Extensible Markup Language (XML) 1.0 (Fifth Edition)</em>,
ed. Tim Bray et al.
W3C Recommendation 26 November 2008.
Available at
<a href="http://www.w3.org/TR/xml/" shape="rect">http://www.w3.org/TR/xml/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
For details of the dependency of this specification on XML 1.1,
see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.</span>
</dd><dt class="label"><a name="ref-xml-1.1" id="ref-xml-1.1" shape="rect"></a>XML 1.1</dt><dd>
World Wide Web Consortium.
<em>Extensible Markup Language (XML) 1.1
(Second Edition)</em>,
ed. Tim Bray et al.
W3C Recommendation 16 August 2006,
edited in place 29 September 2006. Available at
<a href="http://www.w3.org/TR/xml11/" shape="rect">http://www.w3.org/TR/xml11/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
For
details of the dependency of this specification on XML
1.1, see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>. </span></dd><dt class="label"><a name="ref-xmlinfo" id="ref-xmlinfo" shape="rect"></a>XML Infoset</dt><dd>
World Wide Web Consortium.
<em>XML Information Set
(Second Edition)</em>,
ed. John Cowan and Richard Tobin
W3C Recommendation 4 February 2004.
Available at
<a href="http://www.w3.org/TR/xml-infoset/" shape="rect">http://www.w3.org/TR/xml-infoset/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="ref-xml-namespaces-1.1" id="ref-xml-namespaces-1.1" shape="rect"></a>XML Namespaces 1.1</dt><dd>
World Wide Web Consortium.
<em>Namespaces in XML 1.1
(Second Edition)</em>,
ed. Tim Bray et al.
W3C Recommendation 16 August 2006.
Available at: <a href="http://www.w3.org/TR/xml-names11/" shape="rect">http://www.w3.org/TR/xml-names11/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
For details of the dependency of this
specification on Namespaces in XML 1.1, see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>. </span></dd><dt class="label"><a name="schema2e-1" id="schema2e-1" shape="rect"></a>XML Schema 2nd Edition</dt><dd>World Wide Web Consortium.
<em>XML Schema Part 1: Structures</em>,
ed. Henry S. Thompson et al.
W3C Recommendation 28 October 2004.
See <a href="http://www.w3.org/TR/xmlschema-1/" shape="rect">http://www.w3.org/TR/xmlschema-1/</a>.
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="ref-xsp2" id="ref-xsp2" shape="rect"></a>XML Schema: Datatypes</dt><dd>
World Wide Web Consortium.
<em>XML Schema
Version 1.1
Part 2: Datatypes</em>,
ed.
Dave Peterson,
Paul V. Biron and
Ashok Malhotra,
and C. M. Sperberg-McQueen
Candidate Recommendation 21 July 2011.
See <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="bib-xpath2" id="bib-xpath2" shape="rect"></a>XPath 2.0</dt><dd>
World Wide Web Consortium.
<em>XML Path Language 2.0</em>,
ed. Anders Berglund et al.
23 January 2007.
See <a href="http://www.w3.org/TR/xpath20/" shape="rect">http://www.w3.org/TR/xpath20/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd><dt class="label"><a name="bib-xslt2" id="bib-xslt2" shape="rect"></a>XSLT 2.0</dt><dd>
World Wide Web Consortium.
<em>XSL Transformations (XSLT) Version 2.0</em>,
ed. Michael Kay.
23 January 2007.
See <a href="http://www.w3.org/TR/xslt20/" shape="rect">http://www.w3.org/TR/xslt20/</a>
<span class="annotation">
The edition cited is the one current at the date of publication of this
specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</span>
</dd></dl></div><div class="div2">
<h3><span class="nav"><a href="#normative-references" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="nonnormative-references" id="nonnormative-references" shape="rect"></a>L.2 Non-normative</h3><dl><dt class="label"><a name="ABK-DW" id="ABK-DW" shape="rect"></a>Br&#252;ggemann-Klein / Wood 1998</dt><dd>
Br&#252;ggemann-Klein, Anne, and
Derick Wood.
<em>One-Unambiguous Regular Languages</em>.
<em>Information and Computation</em>
140 (1998): 229-253.
Also appears as 142 (1998): 182-206.
</dd><dt class="label"><a name="bib-chamberlin-2006" id="bib-chamberlin-2006" shape="rect"></a>Chamberlin 2006</dt><dd>
Chamberlin, Don.
<em>Impact of precisionDecimal on XPath and XQuery</em>
Email to the W3C XML Query and W3C XSL Working
Groups, 16 May 2006. Available online at <a href="http://www.w3.org/XML/2007/dc.pd.xml" shape="rect">http://www.w3.org/XML/2007/dc.pd.xml</a> and <a href="http://www.w3.org/XML/2007/dc.pd.html" shape="rect">http://www.w3.org/XML/2007/dc.pd.html</a>
</dd><dt class="label"><a name="ref-dcd" id="ref-dcd" shape="rect"></a>DCD</dt><dd>
Bray, Tim, Charles Frankston, and Ashok Malhotra, ed.,
<em>Document Content Description
for XML (DCD)</em>.
Submission to the World Wide Web Consortium 31-July-1998.
[A submission to W3C from International Business Machines
Corporation and Microsoft Corporation.]
See <a href="http://www.w3.org/TR/1998/NOTE-dcd-19980731" shape="rect">http://www.w3.org/TR/1998/NOTE-dcd-19980731</a>
</dd><dt class="label"><a name="ref-ddml" id="ref-ddml" shape="rect"></a>DDML</dt><dd>
Bourret, Ronald, et al., ed.,
<em>Document Definition Markup Language
(DDML) Specification, Version 1.0</em>.
W3C Note, 19-Jan-1999.
[A submission to W3C from
GMD - Forschungszentrum Informationstechnik GmbH.]
See <a href="http://www.w3.org/TR/1999/NOTE-ddml-19990119" shape="rect">http://www.w3.org/TR/1999/NOTE-ddml-19990119
</a></dd><dt class="label"><a name="ref-xs11req" id="ref-xs11req" shape="rect"></a>Requirements for XML Schema 1.1</dt><dd>
World Wide Web Consortium.
<em>Requirements for XML
Schema 1.1</em>, ed. Charles Campbell, Ashok Malhotra, and
Priscilla Walmsley. W3C, 21 January 2003. See <a href="http://www.w3.org/TR/xmlschema-11-req/" shape="rect">http://www.w3.org/TR/xmlschema-11-req/</a>
</dd><dt class="label"><a name="ref-rolp" id="ref-rolp" shape="rect"></a>Rule of Least Power</dt><dd><em>The Rule of Least Power</em>,
ed. Tim Berners-Lee
and Noah Mendelsohn.
W3C TAG Finding 23 February 2006.
See <a href="http://www.w3.org/2001/tag/doc/leastPower.html" shape="rect">http://www.w3.org/2001/tag/doc/leastPower.html</a>.
</dd><dt class="label"><a name="ref-sox" id="ref-sox" shape="rect"></a>SOX</dt><dd>
Fuchs, Matthew, Murray Maloney, and Alex Milowski.
<em>Schema for Object-oriented XML</em>.
Submitted to W3C 19980915.
[A submission to W3C by Veo Systems Inc.]
See
<a href="http://www.w3.org/TR/1998/NOTE-SOX-19980930/" shape="rect">http://www.w3.org/TR/1998/NOTE-SOX-19980930/</a>
</dd><dt class="label"><a name="ref-sox-1.1" id="ref-sox-1.1" shape="rect"></a>SOX-2</dt><dd>
Davidson, Andrew, et al.
<em>Schema for Object-oriented XML 2.0</em>.
See <a href="http://www.w3.org/TR/NOTE-SOX/" shape="rect">http://www.w3.org/TR/NOTE-SOX/</a></dd><dt class="label"><a name="bib-schemapath" id="bib-schemapath" shape="rect"></a>SchemaPath</dt><dd>
Marinelli, Paolo, Claudio Sacerdoti Coen, and Fabio Vitali.
<em>SchemaPath, a
Minimal Extension to XML Schema for Conditional Constraints</em>.
In <em>Proceedings of the Thirteenth International World
Wide Web Conference</em>, New York: ACM Press, 2004,
pp. 164-174.
Available on the Web in the ACM Digital Library; citation at
<a href="http://portal.acm.org/citation.cfm?doid=988672.988695" shape="rect">
http://portal.acm.org/citation.cfm?doid=988672.988695</a>.
<em></em>
</dd><dt class="label"><a name="UAAG-1.0" id="UAAG-1.0" shape="rect"></a>UAAG 1.0</dt><dd>
World Wide Web Consortium.
<em>User Agent Accessibility Guidelines 1.0</em>,
ed. Ian Jacobs,
Jon Gunderson, and
Eric Hansen.
W3C Recommendation 17 December 2002.
See <a href="http://www.w3.org/TR/UAAG10/" shape="rect">http://www.w3.org/TR/UAAG10/</a>.
</dd><dt class="label"><a name="UAAG-2.0" id="UAAG-2.0" shape="rect"></a>UAAG 2.0</dt><dd>World Wide Web Consortium.
<em>User Agent Accessibility Guidelines (UAAG) 2.0</em>,
ed. James Allan, Jan Richards, and
Jeanne Spellman.
W3C Working Draft 11 March 2009.
See <a href="http://www.w3.org/TR/UAAG20/" shape="rect">http://www.w3.org/TR/UAAG20/</a>.
</dd><dt class="label"><a name="ref-xdr" id="ref-xdr" shape="rect"></a>XDR</dt><dd>
Frankston, Charles, and Henry S. Thompson.
<em>XML-Data Reduced</em>,
3 July 1998.
<span class="annotation">["This note is a refinement of
the January 1998 XML-Data submission
http://www.w3.org/TR/1998/NOTE-XML-data-0105/."]</span>
See <a href="http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm" shape="rect">http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm
</a> </dd><dt class="label"><a name="ref-xsreq" id="ref-xsreq" shape="rect"></a>XML Schema Requirements</dt><dd>
World Wide Web Consortium.
<em>XML Schema Requirements </em>,
ed. Ashok Malhotra and Murray Maloney
W3C
Note 15 February 1999.
See <a href="http://www.w3.org/TR/NOTE-xml-schema-req" shape="rect">http://www.w3.org/TR/NOTE-xml-schema-req</a>
</dd><dt class="label"><a name="ref-scds" id="ref-scds" shape="rect"></a>XML Schema: Component Designators</dt><dd>
World Wide Web Consortium.
<em>XML Schema: Component Designators</em>, ed. Mary
Holstege and Asir Vedamuthu.
W3C Working Draft 17 November 2008.
See <a href="http://www.w3.org/TR/xmlschema-ref/" shape="rect">http://www.w3.org/TR/xmlschema-ref/</a>.
</dd><dt class="label"><a name="bib-expo" id="bib-expo" shape="rect"></a>XML Schema: Primer</dt><dd>
World Wide Web Consortium.
<em>XML Schema Part 0: Primer
Second Edition</em>,
ed.
Priscilla Walmsley and
and David C. Fallside.W3C Recommendation 28 October 2004.
See <a href="http://www.w3.org/TR/xmlschema-0/" shape="rect">http://www.w3.org/TR/xmlschema-0/</a></dd><dt class="label"><a name="ref-xml-data" id="ref-xml-data" shape="rect"></a>XML-Data</dt><dd>
Layman, Andrew, et al.
<em>XML-Data</em>.
W3C Note 05 Jan 1998.
<span class="annotation">[A submission to W3C by
Microsoft, ArborText, DataChannel, and Inso.]</span>
See <a href="http://www.w3.org/TR/1998/NOTE-XML-data-0105/" shape="rect">http://www.w3.org/TR/1998/NOTE-XML-data-0105/</a>
</dd><dt class="label"><a name="bib-xpath1" id="bib-xpath1" shape="rect"></a>XPath 1.0</dt><dd>
World Wide Web Consortium.
<em>XML Path Language</em>,
ed. James Clark and Steve DeRose
W3C Recommendation 16 November 1999.
See <a href="http://www.w3.org/TR/xpath" shape="rect">http://www.w3.org/TR/xpath</a>
</dd><dt class="label"><a name="ref-xpointer" id="ref-xpointer" shape="rect"></a>XPointer</dt><dd><a name="anchor5167a3" id="anchor5167a3" shape="rect"></a>
World Wide Web Consortium.
<em>XPointer Framework</em>,
ed. Paul Grosso et al.
W3C Recommendation 25 March 2003. See
<a href="http://www.w3.org/TR/xptr-framework/" shape="rect">http://www.w3.org/TR/xptr-framework/</a>
</dd></dl></div></div><div class="div1">
<h2><a name="acknowledgments" id="acknowledgments" shape="rect"></a>M Acknowledgements (non-normative)</h2><p>The following contributed material to version 1.0 of this specification:</p><blockquote><p>David Fallside, IBM<br clear="none" />Scott Lawrence, Agranat Systems<br clear="none" />Andrew Layman, Microsoft<br clear="none" />Eve L. Maler, Sun Microsystems<br clear="none" />Asir S. Vedamuthu, webMethods, Inc</p></blockquote><p>The Working Group thanks the members of other W3C Working
Groups and industry experts in other forums who have contributed
directly or indirectly to the creation of this document and its
predecessor.</p><p>The work of C. M. Sperberg-McQueen
as a co-editor of this specification was supported by the World
Wide Web Consortium through January 2009, and beginning in
February 2009 by Black Mesa Technologies LLC.
</p><p>At the time this Working Draft is published, the members
in good standing of the XML Schema Working Group are:</p><ul><li>Paul V. Biron, Invited expert</li><li>David Ezell, National Association of Convenience Stores (NACS) (<i>chair</i>) </li><li>Shudi (Sandy) Gao &#39640;&#27530;&#38237;, IBM</li><li>Mary Holstege, Mark Logic</li><li>Michael Kay, Invited expert</li><li>Paolo Marinelli, University of Bologna</li><li>Noah Mendelsohn, IBM</li><li>Dave Peterson, Invited expert</li><li>C. M. Sperberg-McQueen, invited expert</li><li>Henry S. Thompson, University of Edinburgh and W3C (<i>staff contact</i>) </li><li>Scott Tsao, The Boeing Company</li><li>Fabio Vitali, University of Bologna</li><li>Stefano Zacchiroli, University of Bologna</li></ul><p>The XML Schema Working Group has benefited in its work from the
participation and contributions of a number of people who are no
longer members of the Working Group in good standing at the time
of publication of this Working Draft. Their names are given below.
In particular we note
with sadness the accidental death of Mario Jeckle shortly before
publication of the first Working Draft of XML Schema 1.1.
Affiliations given are (among) those current at the time of the
individuals' work with the WG.
</p><ul><li>Paula Angerstein, Vignette Corporation</li><li>Leonid Arbouzov, Sun Microsystems</li><li>Jim Barnette, Defense Information Systems Agency (DISA)</li><li>David Beech, Oracle Corp.</li><li>Gabe Beged-Dov, Rogue Wave Software</li><li>Laila Benhlima, Ecole Mohammadia d'Ingenieurs Rabat (EMI)</li><li>Doris Bernardini, Defense Information Systems Agency (DISA)</li><li>Don Box, DevelopMentor</li><li>Allen Brown, Microsoft</li><li>Lee Buck, TIBCO Extensibility</li><li>Greg Bumgardner, Rogue Wave Software</li><li>Dean Burson, Lotus Development Corporation</li><li>Charles E. Campbell, Invited expert</li><li>Oriol Carbo, University of Edinburgh</li><li>Wayne Carr, Intel</li><li>Peter Chen, Bootstrap Alliance and LSU</li><li>Tyng-Ruey Chuang, Academia Sinica</li><li>Tony Cincotta, NIST</li><li>David Cleary, Progress Software</li><li>Mike Cokus, MITRE</li><li>Dan Connolly, W3C (<i>staff contact</i>) </li><li>Ugo Corda, Xerox</li><li>Roger L. Costello, MITRE</li><li>Joey Coyle, Health Level Seven</li><li>Haavard Danielson, Progress Software</li><li>Josef Dietl, Mozquito Technologies</li><li>Kenneth Dolson, Defense Information Systems Agency (DISA)</li><li>Andrew Eisenberg, Progress Software</li><li>Rob Ellman, Calico Commerce</li><li>Tim Ewald, Developmentor</li><li>Alexander Falk, Altova GmbH</li><li>David Fallside, IBM</li><li>George Feinberg, Object Design</li><li>Dan Fox, Defense Logistics Information Service (DLIS)</li><li>Charles Frankston, Microsoft</li><li>Matthew Fuchs, Commerce One</li><li>Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Xan Gregg, TIBCO Extensibility</li><li>Paul Grosso, Arbortext, Inc</li><li>Martin Gudgin, DevelopMentor</li><li>Ernesto Guerrieri, Inso</li><li>Dave Hollander, Hewlett-Packard Company (<i>co-chair</i>) </li><li>Nelson Hung, Corel</li><li>Jane Hunter, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Michael Hyman, Microsoft</li><li>Renato Iannella, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Mario Jeckle, DaimlerChrysler</li><li>Rick Jelliffe, Academia Sinica</li><li>Marcel Jemio, Data Interchange Standards Association</li><li>Simon Johnston, Rational Software</li><li>Kohsuke Kawaguchi, Sun Microsystems</li><li>Dianne Kennedy, Graphic Communications Association</li><li>Janet Koenig, Sun Microsystems</li><li>Setrag Khoshafian, Technology Deployment International (TDI)</li><li>Melanie Kudela, Uniform Code Council</li><li>Ara Kullukian, Technology Deployment International (TDI)</li><li>Andrew Layman, Microsoft</li><li>Dmitry Lenkov, Hewlett-Packard Company</li><li>Bob Lojek, Mozquito Technologies</li><li>John McCarthy, Lawrence Berkeley National Laboratory</li><li>Matthew MacKenzie, XML Global</li><li>Eve Maler, Sun Microsystems</li><li>Ashok Malhotra, IBM, Microsoft, Oracle</li><li>Murray Maloney, Muzmo Communication, acting for Commerce One</li><li>Lisa Martin, IBM</li><li>Jim Melton, Oracle Corp</li><li>Adrian Michel, Commerce One</li><li>Alex Milowski, Invited expert</li><li>Don Mullen, TIBCO Extensibility</li><li>Ravi Murthy, Oracle</li><li>Murata Makoto, Xerox</li><li>Chris Olds, Wall Data</li><li>Frank Olken, Lawrence Berkeley National Laboratory</li><li>David Orchard, BEA Systems, Inc.</li><li>Paul Pedersen, Mark Logic Corporation</li><li>Shriram Revankar, Xerox</li><li>Mark Reinhold, Sun Microsystems</li><li>Jonathan Robie, Software AG</li><li>Cliff Schmidt, Microsoft</li><li>John C. Schneider, MITRE</li><li>Eric Sedlar, Oracle Corp.</li><li>Lew Shannon, NCR</li><li>Anli Shundi, TIBCO Extensibility</li><li>William Shea, Merrill Lynch</li><li>Jerry L. Smith, Defense Information Systems Agency (DISA)</li><li>John Stanton, Defense Information Systems Agency (DISA)</li><li>Tony Stewart, Rivcom</li><li>Bob Streich, Calico Commerce</li><li>William K. Stumbo, Xerox</li><li>Hoylen Sue, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Ralph Swick, W3C</li><li>John Tebbutt, NIST</li><li>Ross Thompson, Contivo</li><li>Matt Timmermans, Microstar</li><li>Jim Trezzo, Oracle Corp.</li><li>Steph Tryphonas, Microstar</li><li>Mark Tucker, Health Level Seven</li><li>Asir S. Vedamuthu, webMethods, Inc</li><li>Scott Vorthmann, TIBCO Extensibility</li><li>Priscilla Walmsley, XMLSolutions</li><li>Norm Walsh, Sun Microsystems</li><li>Cherry Washington, Defense Information Systems Agency (DISA)</li><li>Aki Yoshida, SAP AG</li><li>Kongyi Zhou, Oracle</li></ul></div></div></body>
</html>