XML Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace http://www.w3.org/2001/XMLSchema
Version 1.0
Language EN
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.
Schema Composition
  • This schema imports schema(s) from the following namespace(s):
    • http://www.w3.org/XML/1998/namespace (at http://www.w3.org/2001/xml.xsd)
Documentation Part 1 version: Id: XMLSchema.xsd,v 1.50 2002/05/22 09:24:24 ht Exp Part 2 version: Id: datatypes.xsd,v 1.54 2002/05/27 22:22:50 ht Exp

The schema corresponding to this document is normative, with respect to the syntactic constraints it expresses in the XML Schema language. The documentation (within <documentation> elements) below, is not normative, but rather highlights important aspects of the W3C Recommendation of which this is a part
More information at: http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/structures.html.

The simpleType element and all of its members are defined towards the end of this schema document

simple type for the value of the 'namespace' attr of 'any' and 'anyAttribute'

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

notations for use within XML Schema schemas

First the built-in primitive datatypes. These definitions are for information only, the real built-in definitions are magic. Note in particular that there is no type named 'anySimpleType'. The primitives should really be derived from no type at all, and anySimpleType should be derived as a union of all the primitives.

For each built-in datatype in this schema (both primitive and derived) can be uniquely addressed via a URI constructed as follows: 1) the base URI is the URI of the XML Schema namespace 2) the fragment identifier is the name of the datatype For example, to address the int datatype, the URI is: http://www.w3.org/2001/XMLSchema#int Additionally, each facet definition element can be uniquely addressed via a URI constructed as follows: 1) the base URI is the URI of the XML Schema namespace 2) the fragment identifier is the name of the facet For example, to address the maxInclusive facet, the URI is: http://www.w3.org/2001/XMLSchema#maxInclusive Additionally, each facet usage in a built-in datatype definition can be uniquely addressed via a URI constructed as follows: 1) the base URI is the URI of the XML Schema namespace 2) the fragment identifier is the name of the datatype, followed by a period (".") followed by the name of the facet For example, to address the usage of the maxInclusive facet in the definition of int, the URI is: http://www.w3.org/2001/XMLSchema#int.maxInclusive

Now the derived primitive types

Declared Namespaces

Prefix Namespace
xml http://www.w3.org/XML/1998/namespace
hfp http://www.w3.org/2001/XMLSchema-hasFacetAndProperty
xs http://www.w3.org/2001/XMLSchema
Schema Component Representation
<xs:schema xml:lang="EN" targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
...
</xs:schema>
top

Global Declarations

Element: all

Name all
Type xs:all
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-all.
XML Instance Representation
<xs:all
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).

minOccurs="xs:nonNegativeInteger (value comes from list: {'0'|'1'}) [0..1]"
maxOccurs="xs:allNNI (value comes from list: {'1'}) [0..1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [0..*] ?
<xs:element
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
name="xs:NCName [0..1]"
ref="xs:QName [0..1]"
type="xs:QName [0..1]"
default="xs:string [0..1]"
fixed="xs:string [0..1]"
nillable="xs:boolean [0..1]"
block="xs:blockSet [0..1]"
form="xs:formChoice [0..1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).

minOccurs="xs:nonNegativeInteger (value comes from list: {'0'|'1'}) [0..1]"
maxOccurs="xs:allNNI (value comes from list: {'0'|'1'}) [0..1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
> [1]
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [0..1]
<xs:simpleType> xs:localSimpleType </xs:simpleType> [1]
<xs:complexType> xs:localComplexType </xs:complexType> [1]
End Choice
Start Group: xs:identityConstraint [0..*]
Start Choice [1]
<xs:unique> ... </xs:unique> [1]
<xs:key> ... </xs:key> [1]
<xs:keyref> ... </xs:keyref> [1]
End Choice
End Group: xs:identityConstraint
</xs:element>
End Choice
</xs:all>
Schema Component Representation
<xs:element name="all" type="xs:all" id="all"/>
top

Element: annotation

Name annotation
Type Locally-defined complex type
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-annotation.
XML Instance Representation
<xs:annotation
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]">
Start Choice [0..*]
<xs:appinfo> ... </xs:appinfo> [1]
<xs:documentation> ... </xs:documentation> [1]
End Choice
</xs:annotation>
Schema Component Representation
<xs:element name="annotation" id="annotation">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xs:openAttrs">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xs:appinfo"/>
<xs:element ref="xs:documentation"/>
</xs:choice>
<xs:attribute name="id" type="xs:ID"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
top

Element: any

Name any
Type Locally-defined complex type
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-any.
XML Instance Representation
<xs:any
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
namespace="xs:namespaceList [0..1]"
processContents="xs:NMTOKEN (value comes from list: {'skip'|'lax'|'strict'}) [0..1]"
minOccurs="xs:nonNegativeInteger [0..1]"
maxOccurs="xs:allNNI [0..1]">
<xs:annotation> ... </xs:annotation> [0..1]
</xs:any>
Schema Component Representation
<xs:element name="any" id="any">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xs:wildcard">
<xs:attributeGroup ref="xs:occurs"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
top

Element: anyAttribute

Name anyAttribute
Type xs:wildcard
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-anyAttribute.
XML Instance Representation
<xs:anyAttribute
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
namespace="xs:namespaceList [0..1]"
processContents="xs:NMTOKEN (value comes from list: {'skip'|'lax'|'strict'}) [0..1]">
<xs:annotation> ... </xs:annotation> [0..1]
</xs:anyAttribute>
Schema Component Representation
<xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute"/>
top

Element: appinfo

Name appinfo
Type Locally-defined complex type
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-appinfo.
XML Instance Representation
<xs:appinfo
source="xs:anyURI [0..1]">
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</xs:appinfo>
Schema Component Representation
<xs:element name="appinfo" id="appinfo">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
<xs:attribute name="source" type="xs:anyURI"/>
</xs:complexType>
</xs:element>
top

Element: attribute

Name attribute
Type xs:topLevelAttribute
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-attribute.
XML Instance Representation
<xs:attribute
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
type="xs:QName [0..1]"
default="xs:string [0..1]"
fixed="xs:string [0..1]"
name="xs:NCName [1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
<xs:simpleType> xs:localSimpleType </xs:simpleType> [0..1]
</xs:attribute>
Schema Component Representation
<xs:element name="attribute" type="xs:topLevelAttribute" id="attribute"/>
top

Element: attributeGroup

Name attributeGroup
Type xs:namedAttributeGroup
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-attributeGroup.
XML Instance Representation
<xs:attributeGroup
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
name="xs:NCName [1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [0..*]
<xs:attribute> xs:attribute </xs:attribute> [1]
<xs:attributeGroup> xs:attributeGroupRef </xs:attributeGroup> [1]
End Choice
<xs:anyAttribute> ... </xs:anyAttribute> [0..1]
</xs:attributeGroup>
Schema Component Representation
<xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup"/>
top

Element: choice

Name choice
Type xs:explicitGroup
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-choice.
XML Instance Representation
<xs:choice
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
minOccurs="xs:nonNegativeInteger [0..1]"
maxOccurs="xs:allNNI [0..1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
Start Group: xs:nestedParticle [0..*]
Start Choice [1]
<xs:element> xs:localElement </xs:element> [1]
<xs:group> xs:groupRef </xs:group> [1]
<xs:choice> ... </xs:choice> [1]
<xs:sequence> ... </xs:sequence> [1]
<xs:any> ... </xs:any> [1]
End Choice
End Group: xs:nestedParticle
</xs:choice>
Schema Component Representation
<xs:element name="choice" type="xs:explicitGroup" id="choice"/>
top

Element: complexContent

Name complexContent
Type Locally-defined complex type
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-complexContent.
XML Instance Representation
<xs:complexContent
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
mixed="xs:boolean [0..1] ?">
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [1]
<xs:restriction> xs:complexRestrictionType </xs:restriction> [1]
<xs:extension> xs:extensionType </xs:extension> [1]
End Choice
</xs:complexContent>
Schema Component Representation
<xs:element name="complexContent" id="complexContent">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xs:annotated">
<xs:choice>
<xs:element name="restriction" type="xs:complexRestrictionType"/>
<xs:element name="extension" type="xs:extensionType"/>
</xs:choice>
<xs:attribute name="mixed" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
top

Element: complexType

Name complexType
Type xs:topLevelComplexType
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-complexType.
XML Instance Representation
<xs:complexType
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
mixed="xs:boolean [0..1] ?"
abstract="xs:boolean [0..1]"
final="xs:derivationSet [0..1]"
block="xs:derivationSet [0..1]"
name="xs:NCName [1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [1]
<xs:simpleContent> ... </xs:simpleContent> [1]
<xs:complexContent> ... </xs:complexContent> [1]
Start Group: xs:typeDefParticle [0..1]
Start Choice [1]
<xs:group> xs:groupRef </xs:group> [1]
<xs:all> ... </xs:all> [1]
<xs:choice> ... </xs:choice> [1]
<xs:sequence> ... </xs:sequence> [1]
End Choice
End Group: xs:typeDefParticle
Start Choice [0..*]
<xs:attribute> xs:attribute </xs:attribute> [1]
<xs:attributeGroup> xs:attributeGroupRef </xs:attributeGroup> [1]
End Choice
<xs:anyAttribute> ... </xs:anyAttribute> [0..1]
End Choice
</xs:complexType>
Schema Component Representation
<xs:element name="complexType" type="xs:topLevelComplexType" id="complexType"/>
top

Element: documentation

Name documentation
Type Locally-defined complex type
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-documentation.
XML Instance Representation
<xs:documentation
source="xs:anyURI [0..1]"
xml:lang="[0..1]">
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</xs:documentation>
Schema Component Representation
<xs:element name="documentation" id="documentation">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
<xs:attribute name="source" type="xs:anyURI"/>
<xs:attribute ref="xml:lang"/>
</xs:complexType>
</xs:element>
top

Element: element

Name element
Type xs:topLevelElement
Nillable no
Abstract no
Disallowed Substitutions restriction, extension, substitution
Documentation More information at: http://www.w3.org/TR/xmlschema-1/#element-element.
XML Instance Representation
<xs:element
Allow any attributes from any namespace (strict validation).
Allow any attributes from a namespace other than this schema's namespace (lax validation).

id="xs:ID [0..1]"
type="xs:QName [0..1]"
substitutionGroup="xs:QName [0..1]"
default="xs:string [0..1]"
fixed="xs:string [0..1]"
nillable="xs:boolean [0..1]"
abstract="xs:boolean [0..1]"
final="xs:derivationSet [0..1]"
block="xs:blockSet [0..1]"
name="xs:NCName [1]"
Allow any attributes from a namespace other than this schema's namespace (lax validation).
>
<xs:annotation> ... </xs:annotation> [0..1]
Start Choice [0..1]
<xs:simpleType> xs:localSimpleType </xs:sim