W3C

Advanced XML Schema Patterns for Databinding Version 1.0

W3C Working Group Note 05 May 2009

This version:
http://www.w3.org/TR/2009/NOTE-xmlschema-patterns-advanced-20090505/
Latest version:
http://www.w3.org/TR/xmlschema-patterns-advanced
Previous versions:
http://www.w3.org/TR/2008/WD-xmlschema-patterns-advanced-20080328/
Editors:
Jonathan Calladine, BT
George Cowe, Origo Services Limited
Paul Downey, BT
Yves Lafon, W3C

Abstract

This specification provides a set of commonly used [XML Schema 1.0] patterns known to cause issues with some state of the art databinding implementations. The patterns in conjunction with the [Basic Patterns] may be used to describe XML representations of commonly used data structures. The data structures described are intended to be independent of any particular programming language, database or modelling environment.

Status of this Document

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 W3C technical reports index at http://www.w3.org/TR/.

This is a public Working Group Note produced by the XML Schema Patterns for Databinding Working Group, which is part of the W3C Web Services Activity. This publication as a Working Group Note coincides with the end of the Working Group's charter period, and represents the culmination of the group's work.

This document was built using evidence and experience gained examining the interoperability of a significant number of state of the art databinding implementations using a test suite, see the Advanced Patterns Implementation Report and a collection of implementation reports including the collection of patterns detected from "the wild". Please send comments to the public public-xsd-databinding-comments@w3.org mailing list (public archive).

The Working Group also produced an accompanying [Basic Patterns] document, which includes [XML Schema 1.0] patterns in common use, but which were discovered to be well supported by state of the art databinding implementations.

Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures 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 Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.


Table of Contents

1. Introduction
    1.1 Notational Conventions
    1.2 Namespaces
    1.3 Document Conformance
    1.4 Implementation Conformance
2. Schema Patterns
    2.1 Schema Element
    2.2 Annotations
    2.3 Properties
    2.4 Import and Include
    2.5 Global Element Declarations
    2.6 Global Attribute Declarations
    2.7 Element Declarations
    2.8 Attribute Declarations
    2.9 Global ComplexType Declarations
    2.10 SimpleType Declarations
    2.11 ComplexType Declarations
    2.12 Sequences
    2.13 Choices
    2.14 Unions
    2.15 Lists
    2.16 Element Predefined Types
    2.17 Attribute Predefined Types
    2.18 Restricted Schema Types
    2.19 Numbers
    2.20 Group
    2.21 Redefines
    2.22 Unique
3. Data Types & Structures
    3.1 Default Value
    3.2 Map
    3.3 Extensible Enumeration
4. References
    4.1 Normative References
    4.2 Informative References

Appendices

A. Detecting Patterns (Non-Normative)
B. XPath 2.0 Idioms (Non-Normative)
C. Pattern Summary (Non-Normative)
D. Assertion Summary (Non-Normative)
E. Supported XML Schema elements, attributes and simple types (Non-Normative)
F. Relationship with the WS-I Basic Profile (Non-Normative)
G. Acknowledgements (Non-Normative)


1. Introduction

A databinding tool generates a mapping between XML documents which conform to an [XML Schema 1.0] schema and an internal data representation. For example, a Web services databinding tool may use [XML Schema 1.0] descriptions inside a [WSDL 2.0] document to produce and consume [SOAP 1.2] messages in terms of data structures in a programming language or data held inside a database.

State of the art databinding implementations have displayed uneven and inconsistent support of the W3C [XML Schema 1.0] Recommendation. XML Schema provides a wide variety of methods for describing the same XML structure, conversely a concept such as "null" may be represented in a wide variety of different ways.

The result of these issues is impaired interoperability and a poor user experience of databinding tools:

This specification provides a advanced set of example [XML Schema 1.0] constructs and types in the form of concrete [XPath 2.0] expressions. These patterns are known to be in widespresd use and considered to be compatible with databinding implementations.

Implementers of databinding tools may find these patterns useful to represent simple and common place data structures. Ensuring tools recognise at least these simple [XML Schema 1.0] patterns and present them in terms most appropriate to the specific language, database or environment will provide an improved user experience when using databinding tools. It is inappropriate to use this specification to constrain the use of the [XML Schema 1.0] Recommendation.

1.1 Notational Conventions

All parts of this specification are normative, with the EXCEPTION of notes, examples, and sections explicitly marked as Non-Normative.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this specification are to be interpreted as described in [RFC 2119].

Each [XML Schema 1.0] pattern is defined using a single [XPath 2.0] expression constraining one or more [XML Schema 1.0] items.

Each [XML Schema 1.0] pattern is identified using a unique and stable URI [RFC 3986].

Assertions about documents and implementations that are not enforced by the normative patterns are marked by a dagger symbol (†) at the end of a sentence. Each assertion has been assigned a unique and stable identifier. The assertion identifiers may be used by implementations of this specification for any purpose, such as error reporting. The assertions and their identifiers are summarized in section D. Assertion Summary.

1.2 Namespaces

This specification uses a number of namespace prefixes throughout; they are listed in Table 1-1. Note that the choice of any namespace prefix is arbitrary and not semantically significant (see [XML Namespaces]).

Table 1-1. Prefixes and Namespaces used in this specification
Prefix Namespace
xs http://www.w3.org/2001/XMLSchema
xsi http://www.w3.org/2001/XMLSchema-instance
soap11 http://schemas.xmlsoap.org/soap/envelope/
soap12 http://www.w3.org/2003/05/soap-envelope
wsdl11 http://schemas.xmlsoap.org/wsdl/
wsdl20 http://www.w3.org/2005/08/wsdl
pat http://www.w3.org/2002/ws/databinding/patterns/6/09/
ex http://www.w3.org/2002/ws/databinding/examples/6/09/

1.3 Document Conformance

A Document claiming conformance to this specification:

1.4 Implementation Conformance

An implementation that claims conformance to this specification:

  • MUST be able to consume any valid [XML Schema 1.0] Document.
  • MUST be able to process any [XML Schema 1.0] Document conforming to this specification
  • MUST produce a data model exposing all of the [XML 1.0] element node and attribute node content described by the originating [XML Schema 1.0] Document.
  • MUST be able to consume any Well-formed [XML 1.0] Document which satisfies local-schema validity against the originating [XML Schema 1.0] Document exposing all of the [XML 1.0] element node and attribute node content in the data model.
  • MUST be able to produce Well-formed [XML 1.0] instance documents which satisfy local-schema validity against the originating [XML Schema 1.0] Document containing values exposed in the data model.
  • MAY consume Well-formed [XML 1.0] instance documents which do not satisfy local-schema validity against the originating [XML Schema 1.0] Document.
  • MAY allow the production of Well-formed [XML 1.0] instance documents containing values exposed in the data model which do not satisfy local-schema validity against the originating [XML Schema 1.0] Document.

Describing the form of the data model provided by a databinding implementation is beyond the scope of this specification. For example, the unconstrained built-in numeric primitive types, xs:decimal, xs:integer, xs:negativeInteger, xs:positiveInteger, xs:nonNegativeInteger and xs:nonPositiveInteger, do not map directly to native types in many programming languages and are likely to be presented as a toolkit specific construct or more generalised ways, such as a 'string'.

Note that although the patterns contained in this document are defined using [XPath 2.0], there is no requirement for a conformant implementation to support [XPath 2.0].

2. Schema Patterns

This section defines the set of concrete [XML Schema 1.0] patterns which may appear inside a conformant document. A pattern definition includes the following information:

URI

A URI [RFC 3986] is provided to identify the pattern. The URI can be dereferenced to return informal documentation for the pattern including a list of examples and public schemas which exhibit the pattern.

XPath

A normative [XPath 2.0] expression, used to detect a pattern in an [XML Schema 1.0] document, returning a set of one or more XML element and attribute nodes. The [XPath 2.0] expression having a context node of an <xs:schema> element node which may be an [XML Schema 1.0] document element, or an <xs:schema> element contained inside an [XML 1.0] document such as [WSDL 2.0] description.

Note, the [XPath 2.0] expressions used to identify individual patterns may be wrapped inside an [XSLT 2.0] stylesheet or [Schematron] schema and used to detect [XML Schema 1.0] patterns contained in a [WSDL 2.0] or other document, see A. Detecting Patterns and 1.3 Document Conformance. Readers unfamiliar with [XPath 2.0] may find the list of B. XPath 2.0 Idioms used within this specification useful.

Examples

Optionally one or more non-normative [XML Schema 1.0] documents or fragments, followed by one or more valid instance document fragments.

A collection of patterns, including patterns beyond the scope of this specification, are available from http://www.w3.org/2002/ws/databinding/patterns/6/09/. This document offers no additional semantics for the schema patterns presented beyond those specified by the [XML Schema 1.0] Recommendation.

2.1 Schema Element

2.1.1 NoTargetNamespace

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NoTargetNamespace pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NoTargetNamespace when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.[not(@targetNamespace)]/ (.)

The following example [XML Schema 1.0] document [NoTargetNamespace] illustrates the use of the NoTargetNamespace pattern:

<xs:schema>
  <xs:element name="noTargetNamespace" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NoTargetNamespace01]:

  <noTargetNamespace xsi:noNamespaceSchemaLocation="NoTargetNamespace.xsd">some data</noTargetNamespace>

2.1.2 UnqualifiedLocalElements

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnqualifiedLocalElements pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnqualifiedLocalElements when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.[not(@elementFormDefault) or @elementFormDefault = 'unqualified']/ (., @elementFormDefault)

The following example [XML Schema 1.0] document [UnqualifiedLocalElements] illustrates the use of the UnqualifiedLocalElements pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"  elementFormDefault="unqualified">
  <xs:element name="unqualifiedLocalElements" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnqualifiedLocalElements01]:

  <unqualifiedLocalElements>some data</unqualifiedLocalElements>

2.1.3 QualifiedLocalAttributes

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the QualifiedLocalAttributes pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/QualifiedLocalAttributes when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.[@attributeFormDefault = 'qualified']/ (@attributeFormDefault)

The following example [XML Schema 1.0] document [QualifiedLocalAttributes] illustrates the use of the QualifiedLocalAttributes pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"  attributeFormDefault="qualified">
  <xs:element name="qualifiedLocalAttributes" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [QualifiedLocalAttributes01]:

  <ex:qualifiedLocalAttributes>string</ex:qualifiedLocalAttributes>

2.1.4 FinalDefault

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the FinalDefault pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/FinalDefault when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./@finalDefault

The following example [XML Schema 1.0] document [FinalDefault] illustrates the use of the FinalDefault pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"  finalDefault="#all">
  <xs:element name="finalDefault" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [FinalDefault01]:

  <ex:finalDefault>foo</ex:finalDefault>

2.1.5 BlockDefault

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the BlockDefault pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/BlockDefault when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./@blockDefault

The following example [XML Schema 1.0] document [BlockDefault] illustrates the use of the BlockDefault pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"  blockDefault="#all">
  <xs:element name="blockDefault" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [BlockDefault01]:

  <ex:blockDefault>foo</ex:blockDefault>

2.1.6 XmlLang

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the XmlLang pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/XmlLang when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.[@xml:lang] / (@xml:lang)

The following example [XML Schema 1.0] document [XmlLang] illustrates the use of the XmlLang pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"  xml:lang="en">
  <xs:element name="xmlLang" type="xs:string" />
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [XmlLang01]:

  <ex:xmlLang>foo</ex:xmlLang>

2.2 Annotations

2.2.1 AppinfoElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AppinfoElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AppinfoElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:annotation/xs:appinfo/ (.., ., .//*, .//@*)

The following example [XML Schema 1.0] extract illustrates the use of the AppinfoElement pattern within an [XML Schema 1.0] document [AppinfoElement]:

<xs:element name="appinfoElement" type="xs:string">
  <xs:annotation>
    <xs:appinfo />
  </xs:annotation>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AppinfoElement01]:

  <ex:appinfoElement>some info</ex:appinfoElement>

2.3 Properties

2.3.1 MixedComplexContent

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the MixedComplexContent pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/MixedComplexContent when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexContent[@mixed = 'true']/ (@mixed)

The following example [XML Schema 1.0] extract illustrates the use of the MixedComplexContent pattern within an [XML Schema 1.0] document [MixedComplexContent]:

<xs:element name="mixedComplexContent" type="ex:MixedComplexContent" />
<xs:complexType name="MixedComplexContent">
  <xs:complexContent  mixed="true">
    <xs:restriction base="xs:anyType">
      <xs:sequence>
        <xs:element name="element1" type="xs:string" />
        <xs:element name="element2" type="xs:string" />
        <xs:element name="element3" type="xs:string" />
      </xs:sequence>
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [MixedComplexContent01]:

  <ex:mixedComplexContent>
      <ex:element1>string</ex:element1>
  mixed content
  <ex:element2>string</ex:element2>
  mixed content
  <ex:element3>string</ex:element3>
  mixed content
</ex:mixedComplexContent>

2.3.2 MixedContentType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the MixedContentType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/MixedContentType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType[@mixed = 'true']/ (@mixed)

The following example [XML Schema 1.0] extract illustrates the use of the MixedContentType pattern within an [XML Schema 1.0] document [MixedContentType]:

<xs:element name="mixedContentType" type="ex:MixedContentType" />
<xs:complexType name="MixedContentType"  mixed="true">
  <xs:sequence>
    <xs:element name="elem1" type="xs:string" />
    <xs:element name="elem2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [MixedContentType01]:

  <ex:mixedContentType>
      <ex:elem1>Tagged Value</ex:elem1> mixed value <ex:elem2>Tagged Value</ex:elem2>
   </ex:mixedContentType>

as is the following element when included in an instance document [MixedContentType02]:

  <ex:mixedContentType> some text <ex:elem1>Tagged Value</ex:elem1> more text <ex:elem2>Tagged
    Value</ex:elem2>
   </ex:mixedContentType>

and the following element when included in an instance document [MixedContentType03]:

  <ex:mixedContentType>
      <ex:elem1>Tagged Value</ex:elem1> mixed text value <ex:elem2>Tagged Value</ex:elem2> mixed
  text value </ex:mixedContentType>

and the following element when included in an instance document [MixedContentType04]:

  <ex:mixedContentType> text mixed value <ex:elem1>Tagged Value</ex:elem1>
      <ex:elem2>Tagged Value</ex:elem2> some more text in a mixed value </ex:mixedContentType>

2.4 Import and Include

2.4.1 ImportSchemaNamespace

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ImportSchemaNamespace pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ImportSchemaNamespace when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:import[not(@schemaLocation) and @namespace = 'http://www.w3.org/2001/XMLSchema']/ (., @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ImportSchemaNamespace pattern within an [XML Schema 1.0] document [ImportSchemaNamespace]:

<xs:import namespace="http://www.w3.org/2001/XMLSchema" />
    

2.5 Global Element Declarations

2.5.1 GlobalElementUnqualifiedType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementUnqualifiedType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementUnqualifiedType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name and @type and not(contains(@type, ':'))]/ (., @name, @type)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementUnqualifiedType pattern within an [XML Schema 1.0] document [GlobalElementUnqualifiedType]:

<xs:element name="globalElementUnqualifiedType"  type="GlobalElementUnqualifiedType" />
<xs:complexType name="GlobalElementUnqualifiedType">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementUnqualifiedType01]:

  <ex:globalElementUnqualifiedType>
      <ex:element1>string1</ex:element1>
      <ex:element2>string2</ex:element2>
   </ex:globalElementUnqualifiedType>

2.5.2 ElementTypeDefaultNamespace

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementTypeDefaultNamespace pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementTypeDefaultNamespace when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@name and @type and not(contains(@type, ':'))]/ (@name, @type)

The following example [XML Schema 1.0] extract illustrates the use of the ElementTypeDefaultNamespace pattern within an [XML Schema 1.0] document [ElementTypeDefaultNamespace]:

<xs:element  name="stringElementDefaultNamespace"  type="string" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementTypeDefaultNamespace01]:

  <ex:stringElementDefaultNamespace/>

as is the following element when included in an instance document [ElementTypeDefaultNamespace02]:

  <ex:stringElementDefaultNamespace>This is a string!</ex:stringElementDefaultNamespace>

2.5.3 GlobalElementAbstract

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementAbstract pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementAbstract when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@abstract='true']/ (@abstract)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementAbstract pattern within an [XML Schema 1.0] document [GlobalElementAbstract]:

<xs:element name="globalElementAbstract" type="ex:GlobalElementAbstract" />
<xs:complexType name="GlobalElementAbstract">
  <xs:sequence>
    <xs:element ref="ex:globalElementAbstractSubHead" />
  </xs:sequence>
</xs:complexType>
<xs:element name="globalElementAbstractSubHead"  abstract="true" />
<xs:element name="globalElementAbstractSub" substitutionGroup="ex:globalElementAbstractSubHead" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementAbstract01]:

  <ex:globalElementAbstract>
      <ex:globalElementAbstractSub>String</ex:globalElementAbstractSub>
   </ex:globalElementAbstract>

2.5.4 GlobalElementBlock

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementBlock pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementBlock when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element/ (@block)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementBlock pattern within an [XML Schema 1.0] document [GlobalElementBlock]:

<xs:element name="globalElementBlock" type="xs:string"  block="#all" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementBlockExample01]:

  <ex:globalElementBlock>Stuff</ex:globalElementBlock>

2.5.5 GlobalElementFinal

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementFinal pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementFinal when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element/ (@final)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementFinal pattern within an [XML Schema 1.0] document [GlobalElementFinal]:

<xs:element name="globalElementFinal" type="xs:string"  final="#all" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementFinalExample01]:

  <ex:globalElementFinal>Stuff</ex:globalElementFinal>

2.5.6 GlobalElementAll

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementAll pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementAll when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:complexType/xs:all[xs:element]/ (../../(., @name), .., ., xs:element/(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementAll pattern within an [XML Schema 1.0] document [GlobalElementAll]:

<xs:element name="globalElementAll">
  <xs:complexType>
    <xs:all>
      <xs:element name="globalElementAllA" type="xs:string" />
      <xs:element name="globalElementAllB" type="xs:string" />
    </xs:all>
  </xs:complexType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementAll01]:

  <ex:globalElementAll>
      <ex:globalElementAllA>one</ex:globalElementAllA>
      <ex:globalElementAllB>42</ex:globalElementAllB>
   </ex:globalElementAll>

as is the following element when included in an instance document [GlobalElementAll02]:

  <ex:globalElementAll>
      <ex:globalElementAllB>42</ex:globalElementAllB>
      <ex:globalElementAllA>douze</ex:globalElementAllA>
   </ex:globalElementAll>

2.5.7 GlobalElementChoice

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementChoice pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementChoice when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:complexType/xs:choice[xs:element]/ (../../(., @name), .., ., xs:element/(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementChoice pattern within an [XML Schema 1.0] document [GlobalElementChoice]:

<xs:element name="globalElementChoice">
  <xs:complexType>
    <xs:choice>
      <xs:element name="globalElementChoiceA" type="xs:string" />
      <xs:element name="globalElementChoiceB" type="xs:string" />
    </xs:choice>
  </xs:complexType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementChoice01]:

  <ex:globalElementChoice>
      <ex:globalElementChoiceA>one</ex:globalElementChoiceA>
   </ex:globalElementChoice>

as is the following element when included in an instance document [GlobalElementChoice02]:

  <ex:globalElementChoice>
      <ex:globalElementChoiceB>two</ex:globalElementChoiceB>
   </ex:globalElementChoice>

2.5.8 GlobalElementSimpleType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementSimpleType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementSimpleType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:simpleType/ (../(., @name), .)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementSimpleType pattern within an [XML Schema 1.0] document [GlobalElementSimpleType]:

<xs:element name="globalElementSimpleType">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:enumeration value="value1" />
      <xs:enumeration value="value2" />
      <xs:enumeration value="value3" />
    </xs:restriction>
  </xs:simpleType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementSimpleType01]:

  <ex:globalElementSimpleType>value1</ex:globalElementSimpleType>

as is the following element when included in an instance document [GlobalElementSimpleType02]:

  <ex:globalElementSimpleType>value2</ex:globalElementSimpleType>

2.5.9 GlobalElementComplexTypeSequenceExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementComplexTypeSequenceExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementComplexTypeSequenceExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/ (../../(., @name), .., ., xs:extension/(., @base, xs:sequence/(., xs:element/(., @name), xs:attribute/(., @name))))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementComplexTypeSequenceExtension pattern within an [XML Schema 1.0] document [GlobalElementComplexTypeSequenceExtension]:

<xs:element name="globalElementComplexTypeSequenceExtension">
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="xs:anyType">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementComplexTypeSequenceExtension01]:

  <ex:globalElementComplexTypeSequenceExtension>
      <ex:data> some data </ex:data>
   </ex:globalElementComplexTypeSequenceExtension>

2.5.10 GlobalElementComplexTypeEmptyExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementComplexTypeEmptyExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementComplexTypeEmptyExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementComplexTypeEmptyExtension pattern within an [XML Schema 1.0] document [GlobalElementComplexTypeEmptyExtension]:

<xs:element name="globalElementComplexTypeEmptyExtension">
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="xs:anyType" />
    </xs:complexContent>
  </xs:complexType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementComplexTypeEmptyExtension01]:

  <ex:globalElementComplexTypeEmptyExtension/>

2.6 Global Attribute Declarations

2.6.1 GlobalAttributeUnqualifiedType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalAttributeUnqualifiedType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalAttributeUnqualifiedType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:attribute[@name and @type and not(contains(@type, ':'))]/ (., @name, @type)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalAttributeUnqualifiedType pattern within an [XML Schema 1.0] document [GlobalAttributeUnqualifiedType]:

<xs:attribute name="globalAttributeUnqualifiedTypeAttr"  type="GlobalAttributeUnqualifiedTypeSimpleType" />
<xs:simpleType name="GlobalAttributeUnqualifiedTypeSimpleType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="value1" />
    <xs:enumeration value="value2" />
  </xs:restriction>
</xs:simpleType>
<xs:complexType name="GlobalAttributeUnqualifiedType">
  <xs:sequence>
    <xs:element name="globalAttributeUnqualifiedTypeElement" type="xs:string" />
  </xs:sequence>
  <xs:attribute ref="ex:globalAttributeUnqualifiedTypeAttr" />
</xs:complexType>
<xs:element name="globalAttributeUnqualifiedType" type="ex:GlobalAttributeUnqualifiedType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalAttributeUnqualifiedType01]:

  <ex:globalAttributeUnqualifiedType ex:globalAttributeUnqualifiedTypeAttr="value1">
      <ex:globalAttributeUnqualifiedTypeElement>another string</ex:globalAttributeUnqualifiedTypeElement>
   </ex:globalAttributeUnqualifiedType>

2.6.2 GlobalAttributeSimpleType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalAttributeSimpleType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalAttributeSimpleType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:attribute/xs:simpleType/(../(., @name), .., ., descendant::*, descendant::*/@value, descendant::*/@base)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalAttributeSimpleType pattern within an [XML Schema 1.0] document [GlobalAttributeSimpleType]:

<xs:attribute name="globalAttributeSimpleTypeAttr">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:enumeration value="value1" />
      <xs:enumeration value="value2" />
      <xs:enumeration value="value3" />
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>
<xs:complexType name="globalAttributeSimpleTypeComplexType">
  <xs:sequence>
    <xs:element name="globalAttributeSimpleTypeElement" type="xs:string" />
  </xs:sequence>
  <xs:attribute ref="ex:globalAttributeSimpleTypeAttr" />
</xs:complexType>
<xs:element name="globalAttributeSimpleType" type="ex:globalAttributeSimpleTypeComplexType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalAttributeSimpleType01]:

  <ex:globalAttributeSimpleType ex:globalAttributeSimpleTypeAttr="value1">
      <ex:globalAttributeSimpleTypeElement>string</ex:globalAttributeSimpleTypeElement>
   </ex:globalAttributeSimpleType>

2.7 Element Declarations

2.7.1 ElementMinOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementMinOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementMinOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[xs:integer(@minOccurs) gt 1]/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ElementMinOccursFinite pattern within an [XML Schema 1.0] document [ElementMinOccursFinite]:

<xs:element name="elementMinOccursFinite" type="ex:ElementMinOccursFinite" />
<xs:complexType name="ElementMinOccursFinite">
  <xs:sequence>
    <xs:element name="elementMinOccursFiniteitem" type="xs:string"  minOccurs="3"  maxOccurs="3" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementMinOccursFinite01]:

  <ex:elementMinOccursFinite>
      <ex:elementMinOccursFiniteitem>item1</ex:elementMinOccursFiniteitem>
      <ex:elementMinOccursFiniteitem>item3</ex:elementMinOccursFiniteitem>
      <ex:elementMinOccursFiniteitem>item2</ex:elementMinOccursFiniteitem>
   </ex:elementMinOccursFinite>

The following example [XML Schema 1.0] extract illustrates the use of the ElementMinOccursFinite pattern within an [XML Schema 1.0] document [ElementMinOccurs2MaxOccurs2]:

<xs:element name="itemColors2" type="ex:ItemColors2" />
<xs:complexType name="ItemColors2">
  <xs:sequence>
    <xs:element name="itemColor" type="xs:string"  minOccurs="2"  maxOccurs="2" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementMinOccurs2MaxOccurs201]:

  <ex:itemColors2>
      <ex:itemColor>Red</ex:itemColor>
      <ex:itemColor>Yellow</ex:itemColor>
   </ex:itemColors2>

The following example [XML Schema 1.0] extract illustrates the use of the ElementMinOccursFinite pattern within an [XML Schema 1.0] document [ElementMinOccurs2orMore]:

<xs:element name="itemColors" type="ex:ItemColors" />
<xs:complexType name="ItemColors">
  <xs:sequence>
    <xs:element name="itemColor" type="xs:string"  minOccurs="2"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementMinOccurs2orMore01]:

  <ex:itemColors>
      <ex:itemColor>Red</ex:itemColor>
      <ex:itemColor>Black</ex:itemColor>
      <ex:itemColor>White</ex:itemColor>
      <ex:itemColor>Yellow</ex:itemColor>
   </ex:itemColors>

as is the following element when included in an instance document [ElementMinOccurs2orMore02]:

  <ex:itemColors>
      <ex:itemColor>Black</ex:itemColor>
      <ex:itemColor>White</ex:itemColor>
   </ex:itemColors>

2.7.2 ElementMinOccurs0MaxOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementMinOccurs0MaxOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementMinOccurs0MaxOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@minOccurs = '0' and @maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ElementMinOccurs0MaxOccursFinite pattern within an [XML Schema 1.0] document [ElementMinOccurs0MaxOccursFinite]:

<xs:element name="colorList" type="ex:ColorList" />
<xs:complexType name="ColorList">
  <xs:sequence>
    <xs:element name="colorValue" type="xs:string"  minOccurs="0"  maxOccurs="2" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementMinOccurs0MaxOccursFinite101]:

  <ex:colorList/>

as is the following element when included in an instance document [ElementMinOccurs0MaxOccursFinite102]:

  <ex:colorList>
      <ex:colorValue>red</ex:colorValue>
      <ex:colorValue>green</ex:colorValue>
   </ex:colorList>

2.7.3 ElementMaxOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementMaxOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementMaxOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ElementMaxOccursFinite pattern within an [XML Schema 1.0] document [ElementMaxOccursFinite]:

<xs:element name="summer" type="ex:Summer" />
<xs:complexType name="Summer">
  <xs:sequence>
    <xs:element name="mnth" type="xs:string"  maxOccurs="4" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementMaxOccursFinite01]:

  <ex:summer>
      <ex:mnth>May</ex:mnth>
      <ex:mnth>June</ex:mnth>
      <ex:mnth>July</ex:mnth>
      <ex:mnth>August</ex:mnth>
   </ex:summer>

as is the following element when included in an instance document [ElementMaxOccursFinite02]:

  <ex:summer>
      <ex:mnth>August</ex:mnth>
      <ex:mnth>September</ex:mnth>
   </ex:summer>

2.7.4 ElementFormUnqualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementFormUnqualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementFormUnqualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@form='unqualified']/ (@form)

The following example [XML Schema 1.0] extract illustrates the use of the ElementFormUnqualified pattern within an [XML Schema 1.0] document [ElementFormUnqualified]:

<xs:element name="elementFormUnqualified" type="ex:ElementFormUnqualified" />
<xs:complexType name="ElementFormUnqualified">
  <xs:sequence>
    <xs:element name="element" type="xs:string"  form="unqualified" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementFormUnqualified01]:

  <ex:elementFormUnqualified>
      <element>string</element>
   </ex:elementFormUnqualified>

2.7.5 ChoiceElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice/xs:element/(.)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceElement pattern within an [XML Schema 1.0] document [ChoiceElement]:

<xs:element name="choiceElement" type="ex:ChoiceElement" />
<xs:complexType name="ChoiceElement">
  <xs:choice>
    <xs:element name="AChoiceElement" type="xs:string" />
    <xs:element name="BChoiceElement" type="xs:string" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceElement01]:

  <ex:choiceElement>
      <ex:AChoiceElement>A</ex:AChoiceElement>
   </ex:choiceElement>

as is the following element when included in an instance document [ChoiceElement02]:

  <ex:choiceElement>
      <ex:BChoiceElement>B</ex:BChoiceElement>
   </ex:choiceElement>

2.7.6 AllElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AllElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AllElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:all/xs:element/(.)

The following example [XML Schema 1.0] extract illustrates the use of the AllElement pattern within an [XML Schema 1.0] document [AllElement]:

<xs:element name="allElement" type="ex:AllElement" />
<xs:complexType name="AllElement">
  <xs:all>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
    <xs:element name="element3" type="xs:string" />
    <xs:element name="element4" type="xs:string" />
    <xs:element name="element5" type="xs:string" />
  </xs:all>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AllElement01]:

  <ex:allElement>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element3>element3</ex:element3>
      <ex:element4>element4</ex:element4>
      <ex:element5>element5</ex:element5>
   </ex:allElement>

2.7.7 ElementFixed

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementFixed pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementFixed when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@fixed] / (@fixed)

The following example [XML Schema 1.0] extract illustrates the use of the ElementFixed pattern within an [XML Schema 1.0] document [ElementFixed]:

<xs:element name="elementFixed" type="xs:string"  fixed="yes" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementFixed01]:

  <ex:elementFixed>yes</ex:elementFixed>

2.7.8 AttributeElementNameClash

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeElementNameClash pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeElementNameClash when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:sequence/xs:element[@name = ../../xs:attribute/@name]/ (@name)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeElementNameClash pattern within an [XML Schema 1.0] document [AttributeElementNameClash]:

<xs:element name="clientDetails" type="ex:ClientDetails" />
<xs:complexType name="ClientDetails">
  <xs:sequence>
    <xs:element name="forename" type="xs:string" />
    <xs:element name="surname" type="xs:string" />
    <xs:element  name="title" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="phone" type="xs:string" />
  <xs:attribute name="title" type="xs:int" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeElementNameClash01]:

  <ex:clientDetails phone="+15556667788" title="1">
      <ex:forename>Bobby</ex:forename>
      <ex:surname>Sox</ex:surname>
      <ex:title>Mr</ex:title>
   </ex:clientDetails>

2.7.9 NillableOptionalElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NillableOptionalElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NillableOptionalElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@nillable = 'true' and @minOccurs = '0']/ (@nillable, @minOccurs)

Note, this specification places no particular semantics on the difference between annotating an element with xsi:nil and the absence of an element.

The following example [XML Schema 1.0] extract illustrates the use of the NillableOptionalElement pattern within an [XML Schema 1.0] document [NillableOptionalElement]:

<xs:element name="nillableOptionalMiddleName" type="ex:NillableOptionalMiddleName" />
<xs:complexType name="NillableOptionalMiddleName">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="middleName" type="xs:string"  minOccurs="0"  nillable="true" />
    <xs:element name="lastName" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NillableOptionalElement01]:

  <ex:nillableOptionalMiddleName>
      <ex:firstName>Paul</ex:firstName>
      <ex:lastName>Downey</ex:lastName>
   </ex:nillableOptionalMiddleName>

as is the following element when included in an instance document [NillableOptionalElement02]:

  <ex:nillableOptionalMiddleName>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
      <ex:lastName>Downey</ex:lastName>
   </ex:nillableOptionalMiddleName>

and the following element when included in an instance document [NillableOptionalElement03]:

  <ex:nillableOptionalMiddleName>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName xsi:nil="true"/>
      <ex:lastName>Downey</ex:lastName>
   </ex:nillableOptionalMiddleName>

2.7.10 ElementTypeReferenceUnqualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementTypeReferenceUnqualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementTypeReferenceUnqualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)

The following example [XML Schema 1.0] extract illustrates the use of the ElementTypeReferenceUnqualified pattern within an [XML Schema 1.0] document [ElementTypeReferenceUnqualified]:

<xs:element name="elementTypeReferenceUnqualified" type="ex:ElementTypeReferenceUnqualified" />
<xs:complexType name="ElementTypeReferenceUnqualifiedRef">
  <xs:sequence>
    <xs:element name="referenced" type="xs:string" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ElementTypeReferenceUnqualified">
  <xs:sequence>
    <xs:element name="text"  type="ElementTypeReferenceUnqualifiedRef" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementTypeReferenceUnqualified01]:

  <ex:elementTypeReferenceUnqualified>
      <ex:text>
         <ex:referenced>String</ex:referenced>
      </ex:text>
   </ex:elementTypeReferenceUnqualified>

2.7.11 ElementReferenceUnqualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementReferenceUnqualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementReferenceUnqualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@ref and not(contains(@ref, ':'))]/ (., @ref)

The following example [XML Schema 1.0] extract illustrates the use of the ElementReferenceUnqualified pattern within an [XML Schema 1.0] document [ElementReferenceUnqualified]:

<xs:element name="elementReferenceUnqualified" type="ex:ElementReferenceUnqualified" />
<xs:element name="elementReferenceUnqualifiedElement1" type="xs:string" />
<xs:element name="elementReferenceUnqualifiedElement2" type="xs:string" />
<xs:complexType name="ElementReferenceUnqualified">
  <xs:sequence>
    <xs:element ref="elementReferenceUnqualifiedElement1" />
    <xs:element ref="elementReferenceUnqualifiedElement2" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementReferenceUnqualified01]:

  <ex:elementReferenceUnqualified>
      <ex:elementReferenceUnqualifiedElement1>String</ex:elementReferenceUnqualifiedElement1>
      <ex:elementReferenceUnqualifiedElement2>String</ex:elementReferenceUnqualifiedElement2>
   </ex:elementReferenceUnqualified>

2.7.12 LocalElementSimpleType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LocalElementSimpleType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LocalElementSimpleType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[not(parent::xs:schema)]/xs:simpleType

The following example [XML Schema 1.0] extract illustrates the use of the LocalElementSimpleType pattern within an [XML Schema 1.0] document [LocalElementSimpleType]:

<xs:element name="localElementSimpleType" type="ex:LocalElementSimpleType" />
<xs:complexType name="LocalElementSimpleType">
  <xs:sequence>
    <xs:element name="localElement">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="First" />
          <xs:enumeration value="Second" />
          <xs:enumeration value="Third" />
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LocalElementSimpleType01]:

  <ex:localElementSimpleType>
      <ex:localElement>First</ex:localElement>
   </ex:localElementSimpleType>

2.7.13 LocalElementComplexTypeEmptyExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LocalElementComplexTypeEmptyExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LocalElementComplexTypeEmptyExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[not(parent::xs:schema)]/xs:complexType[not(@name)]/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))

The following example [XML Schema 1.0] extract illustrates the use of the LocalElementComplexTypeEmptyExtension pattern within an [XML Schema 1.0] document [LocalElementComplexTypeEmptyExtension]:

<xs:element name="localElementComplexTypeEmptyExtension">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="extensionElement">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="ex:ExtensionType" />
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:complexType name="ExtensionType">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LocalElementComplexTypeEmptyExtension01]:

  <ex:localElementComplexTypeEmptyExtension>
      <ex:extensionElement>
         <ex:element1>string</ex:element1>
         <ex:element2>string</ex:element2>
      </ex:extensionElement>
   </ex:localElementComplexTypeEmptyExtension>

2.7.14 ElementDefaultAnyType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementDefaultAnyType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementDefaultAnyType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@name and not(@type) and ./not(xs:simpleType or xs:complexType or xs:unique or xs:key or xs:keyref)]/(.)

The following example [XML Schema 1.0] extract illustrates the use of the ElementDefaultAnyType pattern within an [XML Schema 1.0] document [ElementDefaultAnyType]:

<xs:element name="elementDefaultAnyType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementDefaultAnyType01]:

  <ex:elementDefaultAnyType/>

2.7.15 ElementKey

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementKey pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementKey when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/xs:key[xs:selector and xs:field]/(., xs:selector, xs:selector/(@xpath), xs:field, xs:field/(@xpath))

The following example [XML Schema 1.0] extract illustrates the use of the ElementKey pattern within an [XML Schema 1.0] document [ElementKey]:

<xs:element name="elementKey" type="ex:ElementKey">
  <xs:key name="key">
    <xs:selector xpath=".//item" />
    <xs:field xpath="number" />
  </xs:key>
</xs:element>
<xs:complexType name="ElementKey">
  <xs:sequence>
    <xs:element name="item" type="ex:itemType" maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="itemType">
  <xs:sequence>
    <xs:element name="number" type="xs:integer" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementKey01]:

  <ex:elementKey>
      <ex:item>
         <ex:number>1234</ex:number>
      </ex:item>
   </ex:elementKey>

2.7.16 MaxOccurs0

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the MaxOccurs0 pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/MaxOccurs0 when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@maxOccurs='0']/(., @maxOccurs, @minOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the MaxOccurs0 pattern within an [XML Schema 1.0] document [MaxOccurs0]:

<xs:element name="maxOccurs0" type="ex:MaxOccurs0" />
<xs:complexType name="MaxOccurs0">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string"  maxOccurs="0"  minOccurs="0" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [MaxOccurs001]:

  <ex:maxOccurs0>
      <ex:element1>string1</ex:element1>
   </ex:maxOccurs0>

2.8 Attribute Declarations

2.8.1 AttributeFormQualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeFormQualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeFormQualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@form='qualified']/ (@form)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeFormQualified pattern within an [XML Schema 1.0] document [AttributeFormQualified]:

<xs:element name="attributeFormQualified" type="ex:AttributeFormQualified" />
<xs:complexType name="AttributeFormQualified">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="attribute"  form="qualified" type="xs:string" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeFormQualified01]:

  <ex:attributeFormQualified ex:attribute="string">
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:attributeFormQualified>

2.8.2 ElementDefault

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementDefault pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementDefault when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/ (@default)

The following example [XML Schema 1.0] extract illustrates the use of the ElementDefault pattern within an [XML Schema 1.0] document [GlobalElementDefault]:

<xs:element name="globalElementDefault" type="xs:string"  default="theDefaultValue" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementDefault01]:

  <ex:globalElementDefault/>

as is the following element when included in an instance document [GlobalElementDefault02]:

  <ex:globalElementDefault>theDefaultValue</ex:globalElementDefault>

and the following element when included in an instance document [GlobalElementDefault03]:

  <ex:globalElementDefault>anotherValue</ex:globalElementDefault>

The following example [XML Schema 1.0] extract illustrates the use of the ElementDefault pattern within an [XML Schema 1.0] document [ElementDefault]:

<xs:element name="elementDefault" type="ex:ElementDefault" />
<xs:complexType name="ElementDefault">
  <xs:sequence>
    <xs:element name="element" type="xs:string"  default="default" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementDefault01]:

  <ex:elementDefault>
      <ex:element>default</ex:element>
   </ex:elementDefault>

as is the following element when included in an instance document [ElementDefault02]:

  <ex:elementDefault>
      <ex:element>wrong value</ex:element>
   </ex:elementDefault>

2.8.3 AttributeRequired

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeRequired pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeRequired when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@use = 'required']/ (@use)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeRequired pattern within an [XML Schema 1.0] document [AttributeRequired]:

<xs:element name="attributeRequired" type="ex:AttributeRequired" />
<xs:complexType name="AttributeRequired">
  <xs:sequence>
    <xs:element name="percentage" type="xs:int" />
  </xs:sequence>
  <xs:attribute name="id" type="xs:string" />
  <xs:attribute name="seasonal" type="xs:string"  use="required" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeRequired01]:

  <ex:attributeRequired id="1611" seasonal="yes">
      <ex:percentage>5</ex:percentage>
   </ex:attributeRequired>

as is the following element when included in an instance document [AttributeRequired02]:

  <ex:attributeRequired id="1612" seasonal="no">
      <ex:percentage>2</ex:percentage>
   </ex:attributeRequired>

2.8.4 AttributeFixed

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeFixed pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeFixed when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@fixed] / (@fixed)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeFixed pattern within an [XML Schema 1.0] document [AttributeFixed]:

<xs:element name="attributeFixed" type="ex:AttributeFixed" />
<xs:complexType name="AttributeFixed">
  <xs:sequence>
    <xs:element name="fee" type="xs:int" />
  </xs:sequence>
  <xs:attribute name="id" type="xs:string" />
  <xs:attribute name="currency" type="xs:string"  fixed="GBP" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeFixed01]:

  <ex:attributeFixed id="1511" currency="GBP">
      <ex:fee>500</ex:fee>
   </ex:attributeFixed>

2.8.5 AttributeDefault

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeDefault pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeDefault when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@default] / (@default)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeDefault pattern within an [XML Schema 1.0] document [AttributeDefault]:

<xs:element name="attributeDefault" type="ex:AttributeDefault" />
<xs:complexType name="AttributeDefault">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="defaultedValue" type="xs:string"  default="theDefaultValue" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeDefault01]:

  <ex:attributeDefault/>

as is the following element when included in an instance document [AttributeDefault02]:

  <ex:attributeDefault defaultedValue="theDefaultValue"/>

and the following element when included in an instance document [AttributeDefault03]:

  <ex:attributeDefault defaultedValue=""/>

and the following element when included in an instance document [AttributeDefault04]:

  <ex:attributeDefault defaultedValue="anotherValue"/>

2.8.6 AttributeReferenceUnqualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeReferenceUnqualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeReferenceUnqualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@ref and not(contains(@ref, ':'))]/ (., @ref)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeReferenceUnqualified pattern within an [XML Schema 1.0] document [AttributeReferenceUnqualified]:

<xs:element name="attributeReferenceUnqualified" type="ex:AttributeReferenceUnqualified" />
<xs:attribute name="attributeReferenceUnqualifiedAtt" type="xs:string" />
<xs:complexType name="AttributeReferenceUnqualified">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
  </xs:sequence>
  <xs:attribute ref="attributeReferenceUnqualifiedAtt" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeReferenceUnqualified01]:

  <ex:attributeReferenceUnqualified ex:attributeReferenceUnqualifiedAtt="String">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:attributeReferenceUnqualified>

2.8.7 AttributeTypeReferenceUnqualified

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeTypeReferenceUnqualified pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeTypeReferenceUnqualified when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeTypeReferenceUnqualified pattern within an [XML Schema 1.0] document [AttributeTypeReferenceUnqualified]:

<xs:element name="attributeTypeReferenceUnqualified" type="ex:AttributeTypeReferenceUnqualified" />
<xs:simpleType name="AttributeTypeReferenceUnqualifiedType">
  <xs:restriction base="xs:decimal">
    <xs:totalDigits value="3" />
  </xs:restriction>
</xs:simpleType>
<xs:complexType name="AttributeTypeReferenceUnqualified">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="localAttribute"  type="AttributeTypeReferenceUnqualifiedType" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeTypeReferenceUnqualified01]:

  <ex:attributeTypeReferenceUnqualified localAttribute="123">
      <ex:firstElement>String</ex:firstElement>
   </ex:attributeTypeReferenceUnqualified>

2.8.8 LocalAttributeSimpleType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LocalAttributeSimpleType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LocalAttributeSimpleType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[not(parent::xs:schema)]/xs:simpleType

The following example [XML Schema 1.0] extract illustrates the use of the LocalAttributeSimpleType pattern within an [XML Schema 1.0] document [LocalAttributeSimpleType]:

<xs:element name="localAttributeSimpleType" type="ex:LocalAttributeSimpleType" />
<xs:complexType name="LocalAttributeSimpleType">
  <xs:sequence>
    <xs:element name="localElement1" type="xs:string" />
    <xs:element name="localElement2" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="localAttribute">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="First" />
        <xs:enumeration value="Second" />
        <xs:enumeration value="Third" />
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LocalAttributeSimpleType01]:

  <ex:localAttributeSimpleType localAttribute="First">
      <ex:localElement1>String</ex:localElement1>
      <ex:localElement2>String</ex:localElement2>
   </ex:localAttributeSimpleType>

2.8.9 AttributeProhibited

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeProhibited pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeProhibited when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute[@use = 'prohibited']/ (@use)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeProhibited pattern within an [XML Schema 1.0] document [AttributeProhibited]:

<xs:element name="attributeProhibited" type="ex:AttributeProhibited" />
<xs:complexType name="AttributeProhibited">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="prohibitedAttribute"  use="prohibited" type="xs:string" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeProhibited01]:

  <ex:attributeProhibited>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
   </ex:attributeProhibited>

2.9 Global ComplexType Declarations

2.9.1 GlobalComplexTypeAbstract

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalComplexTypeAbstract pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalComplexTypeAbstract when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:complexType[@abstract='true']/ (@abstract)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalComplexTypeAbstract pattern within an [XML Schema 1.0] document [GlobalComplexTypeAbstract]:

<xs:element name="globalComplexTypeAbstract" type="ex:GlobalComplexTypeAbstract" />
<xs:complexType name="GlobalComplexTypeExtra"  abstract="true">
  <xs:sequence>
    <xs:element name="premium" type="xs:string" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="GlobalComplexTypeAbstract">
  <xs:complexContent>
    <xs:extension base="ex:GlobalComplexTypeExtra" />
  </xs:complexContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalComplexTypeAbstractExample01]:

  <ex:globalComplexTypeAbstract>
      <ex:premium>1175</ex:premium>
   </ex:globalComplexTypeAbstract>

2.9.2 GlobalComplexTypeBlock

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalComplexTypeBlock pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalComplexTypeBlock when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:complexType/ (@block)

The following example [XML Schema 1.0] extract illustrates the use of the GlobalComplexTypeBlock pattern within an [XML Schema 1.0] document [GlobalComplexTypeBlock]:

<xs:element name="globalComplexTypeBlock" type="ex:BlockAll" />
<xs:complexType name="BlockAll"  block="#all">
  <xs:sequence>
    <xs:element name="amount" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalComplexTypeBlockExample01]:

  <ex:globalComplexTypeBlock>
      <ex:amount>1175</ex:amount>
   </ex:globalComplexTypeBlock>

2.9.3 GlobalComplexTypeEmptyExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalComplexTypeEmptyExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalComplexTypeEmptyExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:complexType[@name]/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalComplexTypeEmptyExtension pattern within an [XML Schema 1.0] document [GlobalComplexTypeEmptyExtension]:

<xs:complexType name="GlobalComplexTypeEmptyExtension">
  <xs:complexContent>
    <xs:extension base="xs:anyType" />
  </xs:complexContent>
</xs:complexType>
<xs:element name="globalComplexTypeEmptyExtension" type="ex:GlobalComplexTypeEmptyExtension" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalComplexTypeEmptyExtension01]:

  <ex:globalComplexTypeEmptyExtension/>

2.10 SimpleType Declarations

2.10.1 NMTOKENEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NMTOKENEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NMTOKENEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:NMTOKEN') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the NMTOKENEnumerationType pattern within an [XML Schema 1.0] document [NMTOKENEnumerationType]:

<xs:element name="nMTOKENEnumerationType" type="ex:NMTOKENEnumerationType" />
<xs:simpleType name="NMTOKENEnumerationType">
  <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="token1" />
    <xs:enumeration value="token2" />
    <xs:enumeration value="token3" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NMTOKENEnumerationType01]:

  <ex:nMTOKENEnumerationType>token1</ex:nMTOKENEnumerationType>

2.10.2 IntEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the IntEnumerationType pattern within an [XML Schema 1.0] document [IntEnumerationType]:

<xs:element name="intEnumerationType" type="ex:IntEnumerationType" />
<xs:simpleType name="IntEnumerationType">
  <xs:restriction base="xs:int">
    <xs:enumeration value="2" />
    <xs:enumeration value="3" />
    <xs:enumeration value="5" />
    <xs:enumeration value="7" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntEnumerationType01]:

  <ex:intEnumerationType>2</ex:intEnumerationType>

2.10.3 ShortEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ShortEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ShortEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the ShortEnumerationType pattern within an [XML Schema 1.0] document [ShortEnumerationType]:

<xs:element name="shortEnumerationType" type="ex:ShortEnumerationType" />
<xs:simpleType name="ShortEnumerationType">
  <xs:restriction base="xs:short">
    <xs:enumeration value="7" />
    <xs:enumeration value="11" />
    <xs:enumeration value="13" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ShortEnumerationType01]:

  <ex:shortEnumerationType>11</ex:shortEnumerationType>

2.10.4 LongEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LongEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LongEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the LongEnumerationType pattern within an [XML Schema 1.0] document [LongEnumerationType]:

<xs:element name="longEnumerationType" type="ex:LongEnumerationType" />
<xs:simpleType name="LongEnumerationType">
  <xs:restriction base="xs:long">
    <xs:enumeration value="9152052" />
    <xs:enumeration value="7816230" />
    <xs:enumeration value="7235733" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LongEnumerationType01]:

  <ex:longEnumerationType>9152052</ex:longEnumerationType>

2.10.5 DoubleEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DoubleEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DoubleEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the DoubleEnumerationType pattern within an [XML Schema 1.0] document [DoubleEnumerationType]:

<xs:element name="doubleEnumerationType" type="ex:DoubleEnumerationType" />
<xs:simpleType name="DoubleEnumerationType">
  <xs:restriction base="xs:double">
    <xs:enumeration value="1267.43233E12" />
    <xs:enumeration value="7234.34541E12" />
    <xs:enumeration value="5733.65565E12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DoubleEnumerationType01]:

  <ex:doubleEnumerationType>1267.43233E12</ex:doubleEnumerationType>

2.10.6 IntegerEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntegerEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntegerEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the IntegerEnumerationType pattern within an [XML Schema 1.0] document [IntegerEnumerationType]:

<xs:element name="integerEnumerationType" type="ex:IntegerEnumerationType" />
<xs:simpleType name="IntegerEnumerationType">
  <xs:restriction base="xs:integer">
    <xs:enumeration value="4000000" />
    <xs:enumeration value="5000000" />
    <xs:enumeration value="6000000" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntegerEnumerationType01]:

  <ex:integerEnumerationType>4000000</ex:integerEnumerationType>

2.10.7 DecimalEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the DecimalEnumerationType pattern within an [XML Schema 1.0] document [DecimalEnumerationType]:

<xs:element name="decimalEnumerationType" type="ex:DecimalEnumerationType" />
<xs:simpleType name="DecimalEnumerationType">
  <xs:restriction base="xs:decimal">
    <xs:enumeration value="+1000.0001" />
    <xs:enumeration value="-1000.0001" />
    <xs:enumeration value="1000.0002" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalEnumerationType01]:

  <ex:decimalEnumerationType>1000.0002</ex:decimalEnumerationType>

2.10.8 FloatEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the FloatEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/FloatEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the FloatEnumerationType pattern within an [XML Schema 1.0] document [FloatEnumerationType]:

<xs:element name="floatEnumerationType" type="ex:FloatEnumerationType" />
<xs:simpleType name="FloatEnumerationType">
  <xs:restriction base="xs:float">
    <xs:enumeration value="1267.43233E12" />
    <xs:enumeration value="7234.34541E12" />
    <xs:enumeration value="5733.65565E12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [FloatEnumerationType01]:

  <ex:floatEnumerationType>1267.43233E12</ex:floatEnumerationType>

2.10.9 NonNegativeIntegerEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NonNegativeIntegerEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NonNegativeIntegerEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the NonNegativeIntegerEnumerationType pattern within an [XML Schema 1.0] document [NonNegativeIntegerEnumerationType]:

<xs:element name="nonNegativeIntegerEnumerationType" type="ex:NonNegativeIntegerEnumerationType" />
<xs:simpleType name="NonNegativeIntegerEnumerationType">
  <xs:restriction base="xs:nonNegativeInteger">
    <xs:enumeration value="12" />
    <xs:enumeration value="24" />
    <xs:enumeration value="33" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NonNegativeIntegerEnumerationType01]:

  <ex:nonNegativeIntegerEnumerationType>12</ex:nonNegativeIntegerEnumerationType>

2.10.10 PositiveIntegerEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the PositiveIntegerEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/PositiveIntegerEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the PositiveIntegerEnumerationType pattern within an [XML Schema 1.0] document [PositiveIntegerEnumerationType]:

<xs:element name="positiveIntegerEnumerationType" type="ex:PositiveIntegerEnumerationType" />
<xs:simpleType name="PositiveIntegerEnumerationType">
  <xs:restriction base="xs:positiveInteger">
    <xs:enumeration value="12" />
    <xs:enumeration value="24" />
    <xs:enumeration value="33" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [PositiveIntegerEnumerationType01]:

  <ex:positiveIntegerEnumerationType>12</ex:positiveIntegerEnumerationType>

2.10.11 UnsignedIntEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedIntEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedIntEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedIntEnumerationType pattern within an [XML Schema 1.0] document [UnsignedIntEnumerationType]:

<xs:element name="unsignedIntEnumerationType" type="ex:UnsignedIntEnumerationType" />
<xs:simpleType name="UnsignedIntEnumerationType">
  <xs:restriction base="xs:unsignedInt">
    <xs:enumeration value="1111111111" />
    <xs:enumeration value="2222222222" />
    <xs:enumeration value="3333333333" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedIntEnumerationType01]:

  <ex:unsignedIntEnumerationType>3333333333</ex:unsignedIntEnumerationType>

2.10.12 UnsignedLongEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedLongEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedLongEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedLongEnumerationType pattern within an [XML Schema 1.0] document [UnsignedLongEnumerationType]:

<xs:element name="unsignedLongEnumerationType" type="ex:UnsignedLongEnumerationType" />
<xs:simpleType name="UnsignedLongEnumerationType">
  <xs:restriction base="xs:unsignedLong">
    <xs:enumeration value="11111111111111" />
    <xs:enumeration value="22222222222222" />
    <xs:enumeration value="33333333333333" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedLongEnumerationType01]:

  <ex:unsignedLongEnumerationType>33333333333333</ex:unsignedLongEnumerationType>

2.10.13 UnsignedShortEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedShortEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedShortEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedShortEnumerationType pattern within an [XML Schema 1.0] document [UnsignedShortEnumerationType]:

<xs:element name="unsignedShortEnumerationType" type="ex:UnsignedShortEnumerationType" />
<xs:simpleType name="UnsignedShortEnumerationType">
  <xs:restriction base="xs:unsignedShort">
    <xs:enumeration value="1111" />
    <xs:enumeration value="2222" />
    <xs:enumeration value="3333" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedShortEnumerationType01]:

  <ex:unsignedShortEnumerationType>3333</ex:unsignedShortEnumerationType>

2.10.14 TokenEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the TokenEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/TokenEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the TokenEnumerationType pattern within an [XML Schema 1.0] document [TokenEnumerationType]:

<xs:element name="tokenEnumerationType" type="ex:TokenEnumerationType" />
<xs:simpleType name="TokenEnumerationType">
  <xs:restriction base="xs:token">
    <xs:enumeration value="1" />
    <xs:enumeration value="2" />
    <xs:enumeration value="3" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [TokenEnumerationType01]:

  <ex:tokenEnumerationType>1</ex:tokenEnumerationType>

as is the following element when included in an instance document [TokenEnumerationType02]:

  <ex:tokenEnumerationType>2</ex:tokenEnumerationType>

2.10.15 LanguageEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LanguageEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LanguageEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:language') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

Note, best current practice for the use of the xs:language type is described in [BCP 47].

The following example [XML Schema 1.0] extract illustrates the use of the LanguageEnumerationType pattern within an [XML Schema 1.0] document [LanguageEnumerationType]:

<xs:element name="languageEnumerationType" type="ex:LanguageEnumerationType" />
<xs:simpleType name="LanguageEnumerationType">
  <xs:restriction base="xs:language">
    <xs:enumeration value="en" />
    <xs:enumeration value="en-US" />
    <xs:enumeration value="fr" />
    <xs:enumeration value="de" />
    <xs:enumeration value="it" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LanguageEnumerationType01]:

  <ex:languageEnumerationType>en</ex:languageEnumerationType>

as is the following element when included in an instance document [LanguageEnumerationType02]:

  <ex:languageEnumerationType>it</ex:languageEnumerationType>

2.10.16 SimpleTypeEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SimpleTypeEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SimpleTypeEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base and namespace-uri-from-QName(resolve-QName(@base,.)) != 'http://www.w3.org/2001/XMLSchema' ]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the SimpleTypeEnumerationType pattern within an [XML Schema 1.0] document [SimpleTypeEnumerationType]:

<xs:element name="simpleTypeEnumerationType" type="ex:SimpleTypeEnumerationType" />
<xs:simpleType name="SimpleTypeEnumerationType">
  <xs:restriction base="ex:SimpleTypeEnumerationTypeBase">
    <xs:enumeration value="One" />
    <xs:enumeration value="Two" />
  </xs:restriction>
</xs:simpleType>
<xs:simpleType name="SimpleTypeEnumerationTypeBase">
  <xs:restriction base="xs:string">
    <xs:enumeration value="One" />
    <xs:enumeration value="Two" />
    <xs:enumeration value="Three" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SimpleTypeEnumerationType01]:

  <ex:simpleTypeEnumerationType>One</ex:simpleTypeEnumerationType>

as is the following element when included in an instance document [SimpleTypeEnumerationType02]:

  <ex:simpleTypeEnumerationType>Two</ex:simpleTypeEnumerationType>

2.10.17 DecimalSimpleTypeTotalDigits

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalSimpleTypeTotalDigits pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalSimpleTypeTotalDigits when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:totalDigits/@value]/ (., @base, xs:totalDigits/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the DecimalSimpleTypeTotalDigits pattern within an [XML Schema 1.0] document [DecimalSimpleTypeTotalDigits]:

<xs:element name="decimalSimpleTypeTotalDigits" type="ex:DecimalSimpleTypeTotalDigits" />
<xs:simpleType name="DecimalSimpleTypeTotalDigits">
  <xs:restriction base="xs:decimal">
    <xs:totalDigits value="5" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalSimpleTypeTotalDigits01]:

  <ex:decimalSimpleTypeTotalDigits>1234</ex:decimalSimpleTypeTotalDigits>

as is the following element when included in an instance document [DecimalSimpleTypeTotalDigits02]:

  <ex:decimalSimpleTypeTotalDigits>12345</ex:decimalSimpleTypeTotalDigits>

2.10.18 DecimalSimpleTypeFractionDigits

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalSimpleTypeFractionDigits pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalSimpleTypeFractionDigits when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:fractionDigits/@value]/ (., @base, xs:fractionDigits/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the DecimalSimpleTypeFractionDigits pattern within an [XML Schema 1.0] document [DecimalSimpleTypeFractionDigits]:

<xs:element name="decimalSimpleTypeFractionDigits" type="ex:DecimalSimpleTypeFractionDigits" />
<xs:simpleType name="DecimalSimpleTypeFractionDigits">
  <xs:restriction base="xs:decimal">
    <xs:fractionDigits value="2" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalSimpleTypeFractionDigits01]:

  <ex:decimalSimpleTypeFractionDigits>1234.00</ex:decimalSimpleTypeFractionDigits>

as is the following element when included in an instance document [DecimalSimpleTypeFractionDigits02]:

  <ex:decimalSimpleTypeFractionDigits>1234</ex:decimalSimpleTypeFractionDigits>

2.10.19 QNameEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the QNameEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/QNameEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:QName') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the QNameEnumerationType pattern within an [XML Schema 1.0] document [QNameEnumerationType]:

<xs:element name="qNameEnumerationType" type="ex:QNameSimpleType" />
<xs:simpleType name="QNameSimpleType">
  <xs:restriction base="xs:QName">
    <xs:enumeration value="ex:firstQName" />
    <xs:enumeration value="ex:secondQName" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [QNameEnumerationType01]:

  <ex:qNameEnumerationType>ex:firstQName</ex:qNameEnumerationType>

2.10.20 AnyURIEnumerationType

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyURIEnumerationType pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyURIEnumerationType when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:anyURI') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the AnyURIEnumerationType pattern within an [XML Schema 1.0] document [AnyURIEnumerationType]:

<xs:element name="anyURIEnumerationType" type="ex:URISimpleType" />
<xs:simpleType name="URISimpleType">
  <xs:restriction base="xs:anyURI">
    <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyURIEnumerationType01]:

  <ex:anyURIEnumerationType>http://www.w3.org/2005/08/addressing/reply</ex:anyURIEnumerationType>

2.11 ComplexType Declarations

2.11.1 ComplexTypeAll

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeAll pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeAll when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:all/ (., xs:element/(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeAll pattern within an [XML Schema 1.0] document [ComplexTypeAll]:

<xs:element name="complexTypeAll" type="ex:ComplexTypeAll" />
<xs:complexType name="ComplexTypeAll">
  <xs:all>
    <xs:element name="name" type="xs:string" />
    <xs:element name="shade" type="xs:string" />
    <xs:element name="length" type="xs:int" />
  </xs:all>
  <xs:attribute name="id" type="xs:string" />
  <xs:attribute name="inStock" type="xs:int" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeAll01]:

  <ex:complexTypeAll id="6026" inStock="232">
      <ex:name>Widget</ex:name>
      <ex:length>33</ex:length>
      <ex:shade>Light Blue</ex:shade>
   </ex:complexTypeAll>

as is the following element when included in an instance document [ComplexTypeAll02]:

  <ex:complexTypeAll inStock="332" id="6026">
      <ex:shade>Green</ex:shade>
      <ex:length>21</ex:length>
      <ex:name>Widget</ex:name>
   </ex:complexTypeAll>

2.11.2 ComplexTypeChoice

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeChoice pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeChoice when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:choice/ (., xs:element/(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeChoice pattern within an [XML Schema 1.0] document [ComplexTypeChoice]:

<xs:element name="fruit" type="ex:Fruit" />
<xs:complexType name="Fruit">
  <xs:choice>
    <xs:element name="apple" type="xs:int" />
    <xs:element name="orange" type="xs:string" />
    <xs:element name="banana" type="xs:int" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeChoice01]:

  <ex:fruit>
      <ex:apple>21</ex:apple>
   </ex:fruit>

as is the following element when included in an instance document [ComplexTypeChoice02]:

  <ex:fruit>
      <ex:orange>Two Hundred</ex:orange>
   </ex:fruit>

and the following element when included in an instance document [ComplexTypeChoice03]:

  <ex:fruit>
      <ex:banana>329</ex:banana>
   </ex:fruit>

2.11.3 ComplexTypeOnlyAttributes

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeOnlyAttributes pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeOnlyAttributes when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:attribute[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group or xs:attributeGroup or xs:simpleContent or xs:complexContent)]/ (., ..,@use)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeOnlyAttributes pattern within an [XML Schema 1.0] document [ComplexTypeOnlyAttributes]:

<xs:element name="complexTypeOnlyAttributes" type="ex:ComplexTypeOnlyAttributes" />
<xs:complexType name="ComplexTypeOnlyAttributes">
  <xs:attribute name="a1" type="xs:string" />
  <xs:attribute name="a2" type="xs:int" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeOnlyAttributes01]:

  <ex:complexTypeOnlyAttributes a1="11226026" a2="223232"/>

2.11.4 ComplexTypeOnlyAttributeGroup

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeOnlyAttributeGroup pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeOnlyAttributeGroup when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:attributeGroup[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group or xs:simpleContent or xs:complexContent)]/(., ..,@ref)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeOnlyAttributeGroup pattern within an [XML Schema 1.0] document [ComplexTypeOnlyAttributeGroup]:

<xs:element name="complexTypeOnlyAttributeGroup" type="ex:ComplexTypeOnlyAttributeGroup" />
<xs:complexType name="ComplexTypeOnlyAttributeGroup">
  <xs:attributeGroup ref="ex:CommonOnlyAttributeGroup" />
</xs:complexType>
<xs:attributeGroup name="CommonOnlyAttributeGroup">
  <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" />
</xs:attributeGroup>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeOnlyAttributeGroup01]:

  <ex:complexTypeOnlyAttributeGroup id="AttributeGroup_contract_001"/>

2.11.5 GlobalElementSequenceAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GlobalElementSequenceAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GlobalElementSequenceAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:element[@name]/xs:complexType/xs:sequence[xs:any and not(xs:element)]/ (../../(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the GlobalElementSequenceAny pattern within an [XML Schema 1.0] document [GlobalElementSequenceAny]:

<xs:element name="globalElementSequenceAny">
  <xs:complexType>
    <xs:sequence>
      <xs:any processContents="skip" />
    </xs:sequence>
  </xs:complexType>
</xs:element>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GlobalElementSequenceAny01]:

  <ex:globalElementSequenceAny>
      <ex:data> some data </ex:data>
   </ex:globalElementSequenceAny>

2.11.6 ComplexTypeAnyAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeAnyAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeAnyAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeAnyAttribute pattern within an [XML Schema 1.0] document [ComplexTypeAnyAttribute]:

<xs:element name="complexTypeAnyAttribute" type="ex:ComplexTypeAnyAttribute" />
<xs:complexType name="ComplexTypeAnyAttribute">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="skip" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeAnyAttribute01]:

  <ex:complexTypeAnyAttribute anyattr="string">
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:complexTypeAnyAttribute>

2.11.7 AnyAttributeStrict

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeStrict pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeStrict when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeStrict pattern within an [XML Schema 1.0] document [AnyAttributeStrict]:

<xs:element name="anyAttributeStrict" type="ex:AnyAttributeStrict" />
<xs:complexType name="AnyAttributeStrict">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute />
</xs:complexType>
<xs:attribute name="eyeColor" type="xs:string" />
<xs:attribute name="hairColor" type="xs:string" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeStrict01]:

  <ex:anyAttributeStrict ex:eyeColor="blue">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>

as is the following element when included in an instance document [AnyAttributeStrict02]:

  <ex:anyAttributeStrict ex:hairColor="green">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>

and the following element when included in an instance document [AnyAttributeStrict03]:

  <ex:anyAttributeStrict ex:eyeColor="blue" ex:hairColor="green">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>

2.11.8 AnyAttributeLax

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeLax pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeLax when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(@processContents = 'lax') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeLax pattern within an [XML Schema 1.0] document [AnyAttributeLax]:

<xs:element name="anyAttributeLax" type="ex:AnyAttributeLax" />
<xs:complexType name="AnyAttributeLax">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="lax" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeLax01]:

  <ex:anyAttributeLax eyeColor="blue">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeLax>

2.11.9 AnyAttributeSkip

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeSkip pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeSkip when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(@processContents = 'skip') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeSkip pattern within an [XML Schema 1.0] document [AnyAttributeSkip]:

<xs:element name="anyAttributeSkip" type="ex:AnyAttributeSkip" />
<xs:complexType name="AnyAttributeSkip">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="skip" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeSkip01]:

  <ex:anyAttributeSkip eyeColor="blue">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeSkip>

2.11.10 AnyAttributeOtherStrict

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeOtherStrict pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeOtherStrict when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict') and (@namespace = '##other')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeOtherStrict pattern within an [XML Schema 1.0] document [AnyAttributeOtherStrict]:

<xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" />
<xs:element name="anyAttributeOtherStrict" type="ex:AnyAttributeOtherStrict" />
<xs:complexType name="AnyAttributeOtherStrict">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="strict"  namespace="##other" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeOtherStrict01]:

  <ex:anyAttributeOtherStrict ex2:strictAttribute="value1">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherStrict>

2.11.11 AnyAttributeOtherLax

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeOtherLax pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeOtherLax when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(@processContents = 'lax') and (@namespace = '##other')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeOtherLax pattern within an [XML Schema 1.0] document [AnyAttributeOtherLax]:

<xs:element name="anyAttributeOtherLax" type="ex:AnyAttributeOtherLax" />
<xs:complexType name="AnyAttributeOtherLax">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="lax"  namespace="##other" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeOtherLax01]:

  <ex:anyAttributeOtherLax ex2:otherAttribute="text">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherLax>

2.11.12 AnyAttributeOtherSkip

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeOtherSkip pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeOtherSkip when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[(@processContents = 'skip') and (@namespace = '##other')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeOtherSkip pattern within an [XML Schema 1.0] document [AnyAttributeOtherSkip]:

<xs:element name="anyAttributeOtherSkip" type="ex:AnyAttributeOtherSkip" />
<xs:complexType name="AnyAttributeOtherSkip">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="skip"  namespace="##other" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeOtherSkip01]:

  <ex:anyAttributeOtherSkip ex2:otherAttribute="text">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherSkip>

2.11.13 ExtendedSimpleContent

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSimpleContent pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSimpleContent when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:simpleContent/xs:extension[@base]/ (.., ., ./@base, xs:attribute/ (., @name))

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSimpleContent pattern within an [XML Schema 1.0] document [ExtendedSimpleContent]:

<xs:element name="extendedSimpleContent" type="ex:ExtendedSimpleContent" />
<xs:complexType name="ExtendedSimpleContent">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute name="attribute" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSimpleContent01]:

  <ex:extendedSimpleContent attribute="string">string</ex:extendedSimpleContent>

2.11.14 SOAPEncodedArray

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SOAPEncodedArray pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SOAPEncodedArray when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

./xs:complexType[@name]/xs:complexContent/xs:restriction[ @base/resolve-QName(.,..) = xs:QName('soap11enc:Array')]/ xs:attribute[(@ref/resolve-QName(.,..) = xs:QName('soap11enc:arrayType')) and @wsdl11:arrayType]/ (../.., ../(., @base), ., @ref, @wsdl11:arrayType)

The following example [XML Schema 1.0] document [SOAPEncodedArray] illustrates the use of the SOAPEncodedArray pattern:

<xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified">
  <xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
  <xs:element name="soapEncodedArray" type="ex:SOAPEncodedArray" />
  <xs:complexType name="SOAPEncodedArray">
    <xs:complexContent>
      <xs:restriction base="soap11enc:Array">
        <xs:attribute ref="soap11enc:arrayType"  wsdl11:arrayType="string[]" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SOAPEncodedArray01]:

  <ex:soapEncodedArray/>

2.11.15 RestrictedSimpleContent

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedSimpleContent pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedSimpleContent when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:simpleContent/xs:restriction[@base]/(.., ., @base, child::*, child::*/@value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedSimpleContent pattern within an [XML Schema 1.0] document [RestrictedSimpleContent]:

<xs:element name="restrictedSimpleContent" type="ex:RestrictedSimpleContent" />
<xs:complexType name="RestrictedSimpleContent">
  <xs:simpleContent>
    <xs:restriction base="ex:SomeSimpleContent">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="99" />
    </xs:restriction>
  </xs:simpleContent>
</xs:complexType>
<xs:complexType name="SomeSimpleContent">
  <xs:simpleContent>
    <xs:extension base="ex:SimpleType">
      <xs:attribute name="Currency" type="xs:string" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="SimpleType">
  <xs:restriction base="xs:int">
    <xs:minExclusive value="0" />
    <xs:maxExclusive value="100" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedSimpleContent01]:

  <ex:restrictedSimpleContent>1</ex:restrictedSimpleContent>

as is the following element when included in an instance document [RestrictedSimpleContent02]:

  <ex:restrictedSimpleContent>99</ex:restrictedSimpleContent>

2.11.16 ComplexTypeChoiceExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeChoiceExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeChoiceExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:choice]/ (., xs:extension/ (., @base, xs:choice/(., xs:element/(., @name))))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeChoiceExtension pattern within an [XML Schema 1.0] document [ComplexTypeChoiceExtension]:

<xs:element name="complexTypeChoiceExtension" type="ex:ComplexTypeChoiceExtension" />
<xs:complexType name="ComplexTypeChoiceBase">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ComplexTypeChoiceExtension">
  <xs:complexContent>
    <xs:extension base="ex:ComplexTypeChoiceBase">
      <xs:choice>
        <xs:element name="element3" type="xs:string" />
        <xs:element name="element4" type="xs:string" />
      </xs:choice>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeChoiceExtension01]:

  <ex:complexTypeChoiceExtension>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element3>element3</ex:element3>
   </ex:complexTypeChoiceExtension>

as is the following element when included in an instance document [ComplexTypeChoiceExtension02]:

  <ex:complexTypeChoiceExtension>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element4>element4</ex:element4>
   </ex:complexTypeChoiceExtension>

2.11.17 ComplexTypeAttributeGroupExtension

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeAttributeGroupExtension pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeAttributeGroupExtension when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attributeGroup]/ (., xs:extension/ (., @base, xs:attributeGroup))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeAttributeGroupExtension pattern within an [XML Schema 1.0] document [ComplexTypeAttributeGroupExtension]:

<xs:element name="complexTypeAttributeGroupExtension" type="ex:ComplexTypeAttributeGroupExtension" />
<xs:complexType name="ComplexTypeAttributeGroupBase">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ComplexTypeAttributeGroupExtension">
  <xs:complexContent>
    <xs:extension base="ex:ComplexTypeAttributeGroupBase">
      <xs:attributeGroup ref="ex:CommonAttributes" />
    </xs:extension>
  </xs:complexContent>
</xs:complexType>
<xs:attributeGroup name="CommonAttributes">
  <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" />
</xs:attributeGroup>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeAttributeGroupExtension01]:

  <ex:complexTypeAttributeGroupExtension id="ComplexTypeAttributeGroupExtension_01">
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
   </ex:complexTypeAttributeGroupExtension>

2.11.18 ComplexTypeAttributeRestriction

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeAttributeRestriction pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeAttributeRestriction when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:attribute]/ (., xs:restriction/(., @base, xs:attribute/(., @name)))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeAttributeRestriction pattern within an [XML Schema 1.0] document [ComplexTypeAttributeRestriction]:

<xs:element name="complexTypeAttributeRestriction" type="ex:ComplexTypeAttributeRestriction" />
<xs:complexType name="ComplexTypeAttributeRestrictionBase">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="attrRestriction" type="xs:string" />
</xs:complexType>
<xs:complexType name="ComplexTypeAttributeRestriction">
  <xs:complexContent>
    <xs:restriction base="ex:ComplexTypeAttributeRestrictionBase">
      <xs:sequence>
        <xs:element name="element1" type="xs:string" />
      </xs:sequence>
      <xs:attribute name="attrRestriction" type="xs:string" use="required" />
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeAttributeRestriction01]:

  <ex:complexTypeAttributeRestriction attrRestriction="value">
      <ex:element1>string</ex:element1>
   </ex:complexTypeAttributeRestriction>

2.11.19 ComplexTypeSequenceRestriction

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeSequenceRestriction pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeSequenceRestriction when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:sequence]/ (., xs:restriction/(., @base, xs:sequence))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeSequenceRestriction pattern within an [XML Schema 1.0] document [ComplexTypeSequenceRestriction]:

<xs:element name="complexTypeSequenceRestriction" type="ex:ComplexTypeSequenceRestriction" />
<xs:complexType name="ComplexTypeSequenceRestrictionBase">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ComplexTypeSequenceRestriction">
  <xs:complexContent>
    <xs:restriction base="ex:ComplexTypeSequenceRestrictionBase">
      <xs:sequence>
        <xs:element name="element1" type="xs:string" />
      </xs:sequence>
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeSequenceRestriction01]:

  <ex:complexTypeSequenceRestriction>
      <ex:element1>string</ex:element1>
   </ex:complexTypeSequenceRestriction>

2.11.20 ComplexContentRestrictionAnyAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexContentRestrictionAnyAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexContentRestrictionAnyAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent/xs:restriction/xs:anyAttribute/(., @namespace, @processContents)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexContentRestrictionAnyAttribute pattern within an [XML Schema 1.0] document [ComplexContentRestrictionAnyAttribute]:

<xs:element name="complexContentRestrictionAnyAttribute" type="ex:ComplexContentRestrictionAnyAttribute" />
<xs:complexType name="ComplexContentRestrictionAnyAttribute">
  <xs:complexContent>
    <xs:restriction base="ex:ComplexTypeToBeRestricted">
      <xs:sequence>
        <xs:element name="element1" type="xs:string" />
        <xs:element name="element2" type="xs:string" />
      </xs:sequence>
      <xs:anyAttribute processContents="skip" />
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>
<xs:complexType name="ComplexTypeToBeRestricted">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" minOccurs="0" />
    <xs:element name="element2" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:anyAttribute processContents="skip" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexContentRestrictionAnyAttribute01]:

  <ex:complexContentRestrictionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
   </ex:complexContentRestrictionAnyAttribute>

2.11.21 ComplexContentExtensionAnyAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexContentExtensionAnyAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexContentExtensionAnyAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent/xs:extension/xs:anyAttribute/(., @namespace, @processContents)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexContentExtensionAnyAttribute pattern within an [XML Schema 1.0] document [ComplexContentExtensionAnyAttribute]:

<xs:element name="complexContentExtensionAnyAttribute" type="ex:ComplexContentExtensionAnyAttribute" />
<xs:complexType name="ComplexContentExtensionAnyAttribute">
  <xs:complexContent>
    <xs:extension base="ex:ComplexTypeToBeExtended">
      <xs:sequence>
        <xs:element name="element3" type="xs:string" minOccurs="0" />
        <xs:element name="element4" type="xs:string" minOccurs="0" />
      </xs:sequence>
      <xs:anyAttribute processContents="skip" />
    </xs:extension>
  </xs:complexContent>
</xs:complexType>
<xs:complexType name="ComplexTypeToBeExtended">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="skip" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexContentExtensionAnyAttribute01]:

  <ex:complexContentExtensionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
   </ex:complexContentExtensionAnyAttribute>

as is the following element when included in an instance document [ComplexContentExtensionAnyAttribute02]:

  <ex:complexContentExtensionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
      <ex:element3>value3</ex:element3>
      <ex:element4>value4</ex:element4>
   </ex:complexContentExtensionAnyAttribute>

2.11.22 ComplexTypeFinal

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeFinal pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeFinal when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType[@final]/(., @final)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeFinal pattern within an [XML Schema 1.0] document [ComplexTypeFinal]:

<xs:element name="complexTypeFinal" type="ex:ComplexTypeFinal" />
<xs:complexType name="ComplexTypeFinal"  final="#all">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeFinal01]:

  <ex:complexTypeFinal>
      <ex:element1>value1</ex:element1>
      <ex:element1>value2</ex:element1>
      <ex:element1>value3</ex:element1>
   </ex:complexTypeFinal>

2.11.23 ComplexTypeExtensionAnnotationOnly

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeExtensionAnnotationOnly pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeExtensionAnnotationOnly when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:complexContent/xs:extension[@base]/xs:annotation[not(preceding-sibling::*) and not(following-sibling::*)]/ (../(., @base), ../../(.))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeExtensionAnnotationOnly pattern within an [XML Schema 1.0] document [ComplexTypeExtensionAnnotationOnly]:

<xs:element name="complexTypeExtensionAnnotationOnly" type="ex:ComplexTypeExtensionAnnotationOnly" />
<xs:complexType name="ComplexTypeExtensionAnnotationOnly">
  <xs:complexContent>
    <xs:extension base="ex:ComplexTypeExtension">
      <xs:annotation>
        <xs:documentation />
      </xs:annotation>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>
<xs:complexType name="ComplexTypeExtension">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeExtensionAnnotationOnly01]:

  <ex:complexTypeExtensionAnnotationOnly>
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:complexTypeExtensionAnnotationOnly>

2.11.24 SimpleContentAnyAttributeSkip

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SimpleContentAnyAttributeSkip pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SimpleContentAnyAttributeSkip when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'skip')]/ (., @processContents)

The following example [XML Schema 1.0] extract illustrates the use of the SimpleContentAnyAttributeSkip pattern within an [XML Schema 1.0] document [SimpleContentAnyAttributeSkip]:

<xs:element name="simpleContentAnyAttributeSkip" type="ex:SimpleContentAnyAttributeSkip" />
<xs:complexType name="SimpleContentAnyAttributeSkip">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:anyAttribute processContents="skip" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SimpleContentAnyAttributeSkip01]:

  <ex:simpleContentAnyAttributeSkip skipAttribute="string">string</ex:simpleContentAnyAttributeSkip>

2.11.25 SimpleContentAnyAttributeLax

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SimpleContentAnyAttributeLax pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SimpleContentAnyAttributeLax when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'lax') and (@namespace = '##other')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the SimpleContentAnyAttributeLax pattern within an [XML Schema 1.0] document [SimpleContentAnyAttributeLax]:

<xs:element name="simpleContentAnyAttributeLax" type="ex:SimpleContentAnyAttributeLax" />
<xs:complexType name="SimpleContentAnyAttributeLax">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:anyAttribute processContents="lax"  namespace="##other" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SimpleContentAnyAttributeLax01]:

  <ex:simpleContentAnyAttributeLax ex2:laxAttribute="string">some data</ex:simpleContentAnyAttributeLax>

2.11.26 SimpleContentAnyAttributeStrict

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SimpleContentAnyAttributeStrict pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SimpleContentAnyAttributeStrict when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[not(@processContents) or (@processContents = 'strict') and (@namespace = '##other')]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the SimpleContentAnyAttributeStrict pattern within an [XML Schema 1.0] document [SimpleContentAnyAttributeStrict]:

<xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" />
<xs:element name="simpleContentAnyAttributeStrict" type="ex:SimpleContentAnyAttributeStrict" />
<xs:complexType name="SimpleContentAnyAttributeStrict">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:anyAttribute processContents="strict"  namespace="##other" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SimpleContentAnyAttributeStrict01]:

  <ex:simpleContentAnyAttributeStrict ex2:strictAttribute="value1">some data</ex:simpleContentAnyAttributeStrict>

2.11.27 AnyAttributeNamespacedFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyAttributeNamespacedFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyAttributeNamespacedFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:anyAttribute[@processContents and @namespace and (not (@namespace = '##targetNamespace')) and (not (@namespace = '##any')) and (not (@namespace = '##local')) and (not (@namespace = '##other'))]/ (., @processContents, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the AnyAttributeNamespacedFinite pattern within an [XML Schema 1.0] document [AnyAttributeNamespacedFinite]:

<xs:element name="anyAttributeNamespacedFinite" type="ex:AnyAttributeNamespacedFinite" />
<xs:complexType name="AnyAttributeNamespacedFinite">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
  </xs:sequence>
  <xs:anyAttribute processContents="lax"  namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" />
</xs:complexType>
<xs:attribute name="otherAttribute">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:enumeration value="value1" />
      <xs:enumeration value="value2" />
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyAttributeNamespacedFinite01]:

  <ex:anyAttributeNamespacedFinite ex:otherAttribute="value1">
      <ex:firstElement>element1</ex:firstElement>
      <ex:lastElement>element2</ex:lastElement>
   </ex:anyAttributeNamespacedFinite>

2.12 Sequences

2.12.1 ComplexTypeSequenceChoice

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeSequenceChoice pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeSequenceChoice when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:sequence/xs:choice/ (., xs:element/(., @name))

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeSequenceChoice pattern within an [XML Schema 1.0] document [ComplexTypeSequenceChoice]:

<xs:element name="mortgage" type="ex:Mortgage" />
<xs:complexType name="Mortgage">
  <xs:sequence>
    <xs:element name="amount" type="xs:int" />
    <xs:choice>
      <xs:element name="repayment" type="ex:Repayment" />
      <xs:element name="interestonly" type="ex:InterestOnly" />
    </xs:choice>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="Repayment">
  <xs:sequence>
    <xs:element name="years" type="xs:int" />
    <xs:element name="months" type="xs:int" />
    <xs:element name="rate" type="xs:string" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="InterestOnly">
  <xs:sequence>
    <xs:element name="years" type="xs:int" />
    <xs:element name="rate" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeSequenceChoice01]:

  <ex:mortgage>
      <ex:amount>225000</ex:amount>
      <ex:repayment>
         <ex:years>20</ex:years>
         <ex:months>6</ex:months>
         <ex:rate>5.25</ex:rate>
      </ex:repayment>
   </ex:mortgage>

as is the following element when included in an instance document [ComplexTypeSequenceChoice02]:

  <ex:mortgage>
      <ex:amount>225000</ex:amount>
      <ex:interestonly>
         <ex:years>25</ex:years>
         <ex:rate>5.50</ex:rate>
      </ex:interestonly>
   </ex:mortgage>

2.12.2 SequenceSequenceElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceSequenceElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceSequenceElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:sequence/xs:element/ (., ..)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceSequenceElement pattern within an [XML Schema 1.0] document [SequenceSequenceElement]:

<xs:element name="sequenceSequenceElement" type="ex:SequenceSequenceElement" />
<xs:complexType name="SequenceSequenceElement">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:sequence minOccurs="0">
      <xs:element name="middleName" type="xs:string" />
      <xs:sequence minOccurs="0">
        <xs:element name="lastName" type="xs:string" />
      </xs:sequence>
    </xs:sequence>
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceSequenceElement01]:

  <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
   </ex:sequenceSequenceElement>

as is the following element when included in an instance document [SequenceSequenceElement02]:

  <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
   </ex:sequenceSequenceElement>

and the following element when included in an instance document [SequenceSequenceElement03]:

  <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
      <ex:lastName>Downey</ex:lastName>
   </ex:sequenceSequenceElement>

2.12.3 SequenceMinOccurs0

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceMinOccurs0 pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceMinOccurs0 when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMinOccurs0 pattern within an [XML Schema 1.0] document [SequenceMinOccurs0]:

<xs:element name="sequenceMinOccurs0" type="ex:SequenceMinOccurs0" />
<xs:complexType name="SequenceMinOccurs0">
  <xs:sequence  minOccurs="0">
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="middleName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMinOccurs001]:

  <ex:sequenceMinOccurs0>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
      <ex:lastName>Downey</ex:lastName>
   </ex:sequenceMinOccurs0>

as is the following element when included in an instance document [SequenceMinOccurs002]:

  <ex:sequenceMinOccurs0/>

2.12.4 SequenceMinOccurs0MaxOccursUnbounded

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceMinOccurs0MaxOccursUnbounded pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceMinOccurs0MaxOccursUnbounded when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence[@minOccurs = '0' and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMinOccurs0MaxOccursUnbounded pattern within an [XML Schema 1.0] document [SequenceMinOccurs0MaxOccursUnbounded]:

<xs:element name="durationListSequence" type="ex:DurationListSequence" />
<xs:complexType name="DurationListSequence">
  <xs:sequence  minOccurs="0"  maxOccurs="unbounded">
    <xs:element name="durationVal" type="xs:string" />
    <xs:element name="durationPercentage" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMinOccurs0MaxOccursUnbounded101]:

  <ex:durationListSequence>
      <ex:durationVal>44</ex:durationVal>
      <ex:durationPercentage>33</ex:durationPercentage>
      <ex:durationVal>24</ex:durationVal>
      <ex:durationPercentage>45</ex:durationPercentage>
      <ex:durationVal>64</ex:durationVal>
      <ex:durationPercentage>22</ex:durationPercentage>
   </ex:durationListSequence>

as is the following element when included in an instance document [SequenceMinOccurs0MaxOccursUnbounded102]:

  <ex:durationListSequence/>

2.12.5 SequenceMinOccurs1MaxOccursUnbounded

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceMinOccurs1MaxOccursUnbounded pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceMinOccurs1MaxOccursUnbounded when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMinOccurs1MaxOccursUnbounded pattern within an [XML Schema 1.0] document [SequenceMinOccurs1MaxOccursUnbounded]:

<xs:element name="ageListSequence" type="ex:AgeListSequence" />
<xs:complexType name="AgeListSequence">
  <xs:sequence  minOccurs="1"  maxOccurs="unbounded">
    <xs:element name="ageVal" type="xs:string" />
    <xs:element name="agePercentage" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMinOccurs1MaxOccursUnbounded101]:

  <ex:ageListSequence>
      <ex:ageVal>44</ex:ageVal>
      <ex:agePercentage>33</ex:agePercentage>
      <ex:ageVal>24</ex:ageVal>
      <ex:agePercentage>45</ex:agePercentage>
      <ex:ageVal>64</ex:ageVal>
      <ex:agePercentage>22</ex:agePercentage>
   </ex:ageListSequence>

as is the following element when included in an instance document [SequenceMinOccurs1MaxOccursUnbounded102]:

  <ex:ageListSequence>
      <ex:ageVal>44</ex:ageVal>
      <ex:agePercentage>33</ex:agePercentage>
   </ex:ageListSequence>

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMinOccurs1MaxOccursUnbounded pattern within an [XML Schema 1.0] document [SequenceMaxOccursUnbounded]:

<xs:element name="bookPublications" type="ex:BookPublications" />
<xs:complexType name="BookPublications">
  <xs:sequence  maxOccurs="unbounded">
    <xs:element name="pubDate" type="xs:string" />
    <xs:element name="pubISBN" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMaxOccursUnbounded01]:

  <ex:bookPublications>
      <ex:pubDate>2002-09-24</ex:pubDate>
      <ex:pubISBN>1-55960-907-6</ex:pubISBN>
      <ex:pubDate>2003-04-14</ex:pubDate>
      <ex:pubISBN>1-25466-908-6</ex:pubISBN>
      <ex:pubDate>2004-03-31</ex:pubDate>
      <ex:pubISBN>1-35460-909-6</ex:pubISBN>
      <ex:pubDate>2005-06-04</ex:pubDate>
      <ex:pubISBN>1-54560-910-6</ex:pubISBN>
      <ex:pubDate>2006-07-03</ex:pubDate>
      <ex:pubISBN>1-74869-911-6</ex:pubISBN>
   </ex:bookPublications>

as is the following element when included in an instance document [SequenceMaxOccursUnbounded02]:

  <ex:bookPublications>
      <ex:pubDate>2006-01-26</ex:pubDate>
      <ex:pubISBN>1-44795-912-6</ex:pubISBN>
   </ex:bookPublications>

2.12.6 SequenceMinOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceMinOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceMinOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence[xs:integer(@minOccurs) gt 1]/ (@minOccurs, @maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMinOccursFinite pattern within an [XML Schema 1.0] document [SequenceMinOccursFinite]:

<xs:element name="articleColors" type="ex:ArticleColors" />
<xs:complexType name="ArticleColors">
  <xs:sequence  minOccurs="2"  maxOccurs="unbounded">
    <xs:element name="articleColor" type="xs:string" />
    <xs:element name="articleContrast" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMinOccursFinite01]:

  <ex:articleColors>
      <ex:articleColor>Red</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
      <ex:articleColor>Black</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
      <ex:articleColor>White</ex:articleColor>
      <ex:articleContrast>Low</ex:articleContrast>
      <ex:articleColor>Yellow</ex:articleColor>
      <ex:articleContrast>Normal</ex:articleContrast>
   </ex:articleColors>

as is the following element when included in an instance document [SequenceMinOccursFinite02]:

  <ex:articleColors>
      <ex:articleColor>Black</ex:articleColor>
      <ex:articleContrast>Normal</ex:articleContrast>
      <ex:articleColor>White</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
   </ex:articleColors>

2.12.7 SequenceMaxOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceMaxOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceMaxOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceMaxOccursFinite pattern within an [XML Schema 1.0] document [SequenceMaxOccursFinite]:

<xs:element name="winter" type="ex:Winter" />
<xs:complexType name="Winter">
  <xs:sequence  maxOccurs="4">
    <xs:element name="mnth" type="xs:string" />
    <xs:element name="weather" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceMaxOccursFinite01]:

  <ex:winter>
      <ex:mnth>November</ex:mnth>
      <ex:weather>Rain</ex:weather>
      <ex:mnth>December</ex:mnth>
      <ex:weather>Snow</ex:weather>
      <ex:mnth>January</ex:mnth>
      <ex:weather>Snow</ex:weather>
      <ex:mnth>February</ex:mnth>
      <ex:weather>Rain</ex:weather>
   </ex:winter>

as is the following element when included in an instance document [SequenceMaxOccursFinite02]:

  <ex:winter>
      <ex:mnth>December</ex:mnth>
      <ex:weather>Snow</ex:weather>
   </ex:winter>

2.12.8 ExtendedSequenceStrict

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceStrict pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceStrict when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceStrict pattern within an [XML Schema 1.0] document [ExtendedSequenceStrict]:

<xs:element name="extendedSequenceStrict" type="ex:ExtendedSequenceStrict" />
<xs:complexType name="ExtendedSequenceStrict">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
    <xs:element name="extension" type="ex:StrictExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:element name="title" type="xs:string" />
<xs:element name="middleName" type="xs:string" />
<xs:complexType name="StrictExtension">
  <xs:sequence>
    <xs:any processContents="strict"  minOccurs="0"  maxOccurs="unbounded"  namespace="##targetNamespace" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceStrict01]:

  <ex:extendedSequenceStrict>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:extendedSequenceStrict>

as is the following element when included in an instance document [ExtendedSequenceStrict02]:

  <ex:extendedSequenceStrict>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
      <ex:extension>
         <ex:middleName>William</ex:middleName>
         <ex:title>Mr</ex:title>
      </ex:extension>
   </ex:extendedSequenceStrict>

2.12.9 ExtendedSequenceLax

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceLax pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceLax when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceLax pattern within an [XML Schema 1.0] document [ExtendedSequenceLax]:

<xs:element name="extendedSequenceLax" type="ex:ExtendedSequenceLax" />
<xs:complexType name="ExtendedSequenceLax">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
    <xs:element name="extension" type="ex:LaxExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="LaxExtension">
  <xs:sequence>
    <xs:any processContents="lax"  minOccurs="0"  maxOccurs="unbounded"  namespace="##targetNamespace" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceLax01]:

  <ex:extendedSequenceLax>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:extendedSequenceLax>

as is the following element when included in an instance document [ExtendedSequenceLax02]:

  <ex:extendedSequenceLax>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
      <ex:extension>
         <ex:middleName>William</ex:middleName>
         <ex:title>Mr</ex:title>
      </ex:extension>
   </ex:extendedSequenceLax>

2.12.10 ExtendedSequenceSkip

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceSkip pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceSkip when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceSkip pattern within an [XML Schema 1.0] document [ExtendedSequenceSkip]:

<xs:element name="extendedSequenceSkip" type="ex:ExtendedSequenceSkip" />
<xs:complexType name="ExtendedSequenceSkip">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string" />
    <xs:element name="lastName" type="xs:string" />
    <xs:element name="extension" type="ex:SkipExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="SkipExtension">
  <xs:sequence>
    <xs:any processContents="skip"  minOccurs="0"  maxOccurs="unbounded"  namespace="##targetNamespace" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceSkip01]:

  <ex:extendedSequenceSkip>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:extendedSequenceSkip>

as is the following element when included in an instance document [ExtendedSequenceSkip02]:

  <ex:extendedSequenceSkip>
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
      <ex:extension>
         <ex:middleName>William</ex:middleName>
         <ex:title>Mr</ex:title>
      </ex:extension>
   </ex:extendedSequenceSkip>

2.12.11 ExtendedSequenceStrictAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceStrictAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceStrictAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceStrictAny pattern within an [XML Schema 1.0] document [ExtendedSequenceStrictAny]:

<xs:element name="extendedSequenceStrictAny" type="ex:ExtendedSequenceStrictAny" />
<xs:element name="extendedSequenceStrictAnyElement" type="xs:string" />
<xs:complexType name="ExtendedSequenceStrictAny">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceStrictAnyExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceStrictAnyExtension">
  <xs:sequence>
    <xs:any namespace="##any"  processContents="strict"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceStrictAny01]:

  <ex:extendedSequenceStrictAny>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex:extendedSequenceStrictAnyElement>Stuff</ex:extendedSequenceStrictAnyElement>
      </ex:extension>
   </ex:extendedSequenceStrictAny>

2.12.12 ExtendedSequenceLaxAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceLaxAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceLaxAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceLaxAny pattern within an [XML Schema 1.0] document [ExtendedSequenceLaxAny]:

<xs:element name="extendedSequenceLaxAny" type="ex:ExtendedSequenceLaxAny" />
<xs:complexType name="ExtendedSequenceLaxAny">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceLaxAnyExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceLaxAnyExtension">
  <xs:sequence>
    <xs:any namespace="##any"  processContents="lax"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceLaxAny01]:

  <ex:extendedSequenceLaxAny>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceLaxAny>

2.12.13 ExtendedSequenceSkipAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceSkipAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceSkipAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceSkipAny pattern within an [XML Schema 1.0] document [ExtendedSequenceSkipAny]:

<xs:element name="extendedSequenceSkipAny" type="ex:ExtendedSequenceSkipAny" />
<xs:complexType name="ExtendedSequenceSkipAny">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceSkipAnyExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceSkipAnyExtension">
  <xs:sequence>
    <xs:any namespace="##any"  processContents="skip"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceSkipAny01]:

  <ex:extendedSequenceSkipAny>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceSkipAny>

2.12.14 ExtendedSequenceStrictOther

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceStrictOther pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceStrictOther when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceStrictOther pattern within an [XML Schema 1.0] document [ExtendedSequenceStrictOther]:

<xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" />
<xs:element name="extendedSequenceStrictOther" type="ex:ExtendedSequenceStrictOther" />
<xs:complexType name="ExtendedSequenceStrictOther">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceStrictOtherExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceStrictOtherExtension">
  <xs:sequence>
    <xs:any namespace="##other"  processContents="strict"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceStrictOther01]:

  <ex:extendedSequenceStrictOther>
      <ex:element1>firstElement</ex:element1>
      <ex:element2>lastElement</ex:element2>
      <ex:extension>
         <strictElement>strictElement</strictElement>
      </ex:extension>
   </ex:extendedSequenceStrictOther>

2.12.15 ExtendedSequenceLaxOther

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceLaxOther pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceLaxOther when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceLaxOther pattern within an [XML Schema 1.0] document [ExtendedSequenceLaxOther]:

<xs:element name="extendedSequenceLaxOther" type="ex:ExtendedSequenceLaxOther" />
<xs:complexType name="ExtendedSequenceLaxOther">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceLaxOtherExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceLaxOtherExtension">
  <xs:sequence>
    <xs:any namespace="##other"  processContents="lax"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceLaxOther01]:

  <ex:extendedSequenceLaxOther>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceLaxOther>

2.12.16 ExtendedSequenceSkipOther

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceSkipOther pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceSkipOther when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceSkipOther pattern within an [XML Schema 1.0] document [ExtendedSequenceSkipOther]:

<xs:element name="extendedSequenceSkipOther" type="ex:ExtendedSequenceSkipOther" />
<xs:complexType name="ExtendedSequenceSkipOther">
  <xs:sequence>
    <xs:element name="firstElement" type="xs:string" />
    <xs:element name="lastElement" type="xs:string" />
    <xs:element name="extension" type="ex:ExtendedSequenceSkipOtherExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ExtendedSequenceSkipOtherExtension">
  <xs:sequence>
    <xs:any namespace="##other"  processContents="skip"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceSkipOther01]:

  <ex:extendedSequenceSkipOther>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceSkipOther>

2.12.17 SequenceAnyStrict

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceAnyStrict pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceAnyStrict when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not (@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceAnyStrict pattern within an [XML Schema 1.0] document [SequenceAnyStrict]:

<xs:element name="sequenceAnyStrict" type="ex:SequenceAnyStrict" />
<xs:complexType name="SequenceAnyStrict">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:any processContents="strict"  namespace="##any"  minOccurs="0"  maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceAnyStrict01]:

  <ex:sequenceAnyStrict>
      <ex:element1>string</ex:element1>
   </ex:sequenceAnyStrict>

2.12.18 ExtendedSequenceNamespacedFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ExtendedSequenceNamespacedFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ExtendedSequenceNamespacedFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:any[@processContents and @namespace and @maxOccurs and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs = '1') ) and (not (@maxOccurs='unbounded')) and (not (@namespace = '##targetNamespace')) and (not (@namespace = '##any')) and (not (@namespace = '##local')) and (not (@namespace = '##other'))]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)

The following example [XML Schema 1.0] extract illustrates the use of the ExtendedSequenceNamespacedFinite pattern within an [XML Schema 1.0] document [ExtendedSequenceNamespacedFinite]:

<xs:element name="extendedSequenceNamespacedFinite" type="ex:ExtendedSequenceNamespacedFinite" />
<xs:complexType name="ExtendedSequenceNamespacedFinite">
  <xs:sequence>
    <xs:any maxOccurs="2"  processContents="lax"  namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ExtendedSequenceNamespacedFinite01]:

  <ex:extendedSequenceNamespacedFinite>
      <ex:anyElement>any data</ex:anyElement>
   </ex:extendedSequenceNamespacedFinite>

2.12.19 SequenceSequenceGroup

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceSequenceGroup pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceSequenceGroup when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:sequence/xs:group/(., ..)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceSequenceGroup pattern within an [XML Schema 1.0] document [SequenceSequenceGroup]:

<xs:element name="sequenceSequenceGroup" type="ex:SequenceSequenceGroup" />
<xs:complexType name="SequenceSequenceGroup">
  <xs:sequence>
    <xs:sequence>
      <xs:group ref="ex:SeqSeqGroup" />
    </xs:sequence>
  </xs:sequence>
</xs:complexType>
<xs:group name="SeqSeqGroup">
  <xs:sequence>
    <xs:element name="element1" type="xs:string" />
    <xs:element name="element2" type="xs:string" />
  </xs:sequence>
</xs:group>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceSequenceGroup01]:

  <ex:sequenceSequenceGroup>
      <ex:element1>string1</ex:element1>
      <ex:element2>string2</ex:element2>
   </ex:sequenceSequenceGroup>

2.13 Choices

2.13.1 ChoiceSequence

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceSequence pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceSequence when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice/xs:sequence/(.)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceSequence pattern within an [XML Schema 1.0] document [ChoiceSequence]:

<xs:element name="choiceSequence" type="ex:ChoiceSequenceType" />
<xs:complexType name="ChoiceSequenceType">
  <xs:choice>
    <xs:element name="Avalue" type="xs:string" />
    <xs:sequence>
      <xs:element name="Bvalue" type="xs:string" />
      <xs:element name="Cvalue" type="xs:string" />
    </xs:sequence>
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceSequence01]:

  <ex:choiceSequence>
      <ex:Avalue>home</ex:Avalue>
   </ex:choiceSequence>

as is the following element when included in an instance document [ChoiceSequence02]:

  <ex:choiceSequence>
      <ex:Bvalue>home</ex:Bvalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:choiceSequence>

2.13.2 SequenceChoice

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SequenceChoice pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceChoice when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:sequence/xs:choice/(.)

The following example [XML Schema 1.0] extract illustrates the use of the SequenceChoice pattern within an [XML Schema 1.0] document [SequenceChoice]:

<xs:element name="sequenceChoice" type="ex:SequenceChoiceType" />
<xs:complexType name="SequenceChoiceType">
  <xs:sequence>
    <xs:choice>
      <xs:element name="Avalue" type="xs:string" />
      <xs:element name="Bvalue" type="xs:string" />
    </xs:choice>
    <xs:element name="Cvalue" type="xs:string" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SequenceChoice01]:

  <ex:sequenceChoice>
      <ex:Avalue>home</ex:Avalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:sequenceChoice>

as is the following element when included in an instance document [SequenceChoice02]:

  <ex:sequenceChoice>
      <ex:Bvalue>home</ex:Bvalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:sequenceChoice>

2.13.3 ChoiceChoice

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceChoice pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceChoice when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice/xs:choice/(.)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceChoice pattern within an [XML Schema 1.0] document [ChoiceChoice]:

<xs:element name="choiceChoice" type="ex:ChoiceChoice" />
<xs:complexType name="ChoiceChoice">
  <xs:choice>
    <xs:element name="Avalue" type="xs:string" />
    <xs:choice>
      <xs:element name="Bvalue" type="xs:string" />
      <xs:element name="Cvalue" type="xs:string" />
    </xs:choice>
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceChoice01]:

  <ex:choiceChoice>
      <ex:Avalue>home</ex:Avalue>
   </ex:choiceChoice>

as is the following element when included in an instance document [ChoiceChoice02]:

  <ex:choiceChoice>
      <ex:Bvalue>home</ex:Bvalue>
   </ex:choiceChoice>

and the following element when included in an instance document [ChoiceChoice03]:

  <ex:choiceChoice>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:choiceChoice>

2.13.4 ChoiceMaxOccursUnbounded

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceMaxOccursUnbounded pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceMaxOccursUnbounded when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice[@maxOccurs = 'unbounded']/ (@maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceMaxOccursUnbounded pattern within an [XML Schema 1.0] document [ChoiceMaxOccursUnbounded]:

<xs:element name="choiceMaxOccursUnbounded" type="ex:ChoiceMaxOccursUnbounded" />
<xs:complexType name="ChoiceMaxOccursUnbounded">
  <xs:choice  maxOccurs="unbounded">
    <xs:element name="choiceA" type="xs:string" />
    <xs:element name="choiceB" type="xs:string" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceMaxOccursUnbounded01]:

  <ex:choiceMaxOccursUnbounded>
      <ex:choiceB>1st</ex:choiceB>
      <ex:choiceB>2nd</ex:choiceB>
      <ex:choiceB>3rd</ex:choiceB>
   </ex:choiceMaxOccursUnbounded>

as is the following element when included in an instance document [ChoiceMaxOccursUnbounded02]:

  <ex:choiceMaxOccursUnbounded>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceA>second</ex:choiceA>
   </ex:choiceMaxOccursUnbounded>

and the following element when included in an instance document [ChoiceMaxOccursUnbounded03]:

  <ex:choiceMaxOccursUnbounded>
      <ex:choiceA>1st</ex:choiceA>
      <ex:choiceB>second</ex:choiceB>
      <ex:choiceA>3rd</ex:choiceA>
   </ex:choiceMaxOccursUnbounded>

2.13.5 ChoiceMaxOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceMaxOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceMaxOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@maxOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceMaxOccursFinite pattern within an [XML Schema 1.0] document [ChoiceMaxOccursFinite]:

<xs:element name="choiceMaxOccursFinite" type="ex:ChoiceMaxOccursFinite" />
<xs:complexType name="ChoiceMaxOccursFinite">
  <xs:choice  maxOccurs="2">
    <xs:element name="choiceA" type="xs:string" />
    <xs:element name="choiceB" type="xs:string" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceMaxOccursFinite01]:

  <ex:choiceMaxOccursFinite>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceB>second</ex:choiceB>
   </ex:choiceMaxOccursFinite>

as is the following element when included in an instance document [ChoiceMaxOccursFinite02]:

  <ex:choiceMaxOccursFinite>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceA>second</ex:choiceA>
   </ex:choiceMaxOccursFinite>

and the following element when included in an instance document [ChoiceMaxOccursFinite03]:

  <ex:choiceMaxOccursFinite>
      <ex:choiceA>only</ex:choiceA>
   </ex:choiceMaxOccursFinite>

2.13.6 ChoiceMinOccurs0

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceMinOccurs0 pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceMinOccurs0 when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice[@minOccurs='0']/ (@minOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceMinOccurs0 pattern within an [XML Schema 1.0] document [ChoiceMinOccurs0]:

<xs:element name="choiceMinOccurs0" type="ex:ChoiceMinOccurs0" />
<xs:complexType name="ChoiceMinOccurs0">
  <xs:choice  minOccurs="0">
    <xs:element name="AChoiceMinOccurs0" type="xs:string" />
    <xs:element name="BChoiceMinOccurs0" type="xs:string" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceMinOccurs001]:

  <ex:choiceMinOccurs0>
      <ex:AChoiceMinOccurs0>A</ex:AChoiceMinOccurs0>
   </ex:choiceMinOccurs0>

as is the following element when included in an instance document [ChoiceMinOccurs002]:

  <ex:choiceMinOccurs0>
      <ex:BChoiceMinOccurs0>B</ex:BChoiceMinOccurs0>
   </ex:choiceMinOccurs0>

and the following element when included in an instance document [ChoiceMinOccurs003]:

  <ex:choiceMinOccurs0/>

2.13.7 ChoiceMinOccursFinite

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ChoiceMinOccursFinite pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ChoiceMinOccursFinite when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:choice[@minOccurs and not(@minOccurs = '0' or @minOccurs = '1')]/ (@minOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ChoiceMinOccursFinite pattern within an [XML Schema 1.0] document [ChoiceMinOccursFinite]:

<xs:element name="choiceMinOccursFinite" type="ex:ChoiceMinOccursFinite" />
<xs:complexType name="ChoiceMinOccursFinite">
  <xs:choice  minOccurs="2" maxOccurs="2">
    <xs:element name="AChoiceMinOccursFinite" type="xs:string" />
    <xs:element name="BChoiceMinOccursFinite" type="xs:string" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ChoiceMinOccursFinite01]:

  <ex:choiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>A</ex:AChoiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>AA</ex:AChoiceMinOccursFinite>
   </ex:choiceMinOccursFinite>

as is the following element when included in an instance document [ChoiceMinOccursFinite02]:

  <ex:choiceMinOccursFinite>
      <ex:BChoiceMinOccursFinite>B</ex:BChoiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>BA</ex:AChoiceMinOccursFinite>
   </ex:choiceMinOccursFinite>

2.13.8 ComplexTypeChoiceAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeChoiceAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeChoiceAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeChoiceAny pattern within an [XML Schema 1.0] document [ComplexTypeChoiceAny]:

<xs:element name="complexTypeChoiceAny" type="ex:ComplexTypeChoiceAny" />
<xs:complexType name="ComplexTypeChoiceAny">
  <xs:choice>
    <xs:any minOccurs="0"  maxOccurs="unbounded"  namespace="##any"  processContents="lax" />
  </xs:choice>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeChoiceAny01]:

  <ex:complexTypeChoiceAny>
      <ex:anything>
         <ex:element>any data</ex:element>
      </ex:anything>
   </ex:complexTypeChoiceAny>

2.13.9 ComplexTypeSequenceChoiceAny

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ComplexTypeSequenceChoiceAny pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ComplexTypeSequenceChoiceAny when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:complexType/xs:sequence/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)

The following example [XML Schema 1.0] extract illustrates the use of the ComplexTypeSequenceChoiceAny pattern within an [XML Schema 1.0] document [ComplexTypeSequenceChoiceAny]:

<xs:element name="complexTypeSequenceChoiceAny" type="ex:ComplexTypeSequenceChoiceAny" />
<xs:complexType name="ComplexTypeSequenceChoiceAny">
  <xs:sequence>
    <xs:choice>
      <xs:any minOccurs="0"  maxOccurs="unbounded"  namespace="##any"  processContents="lax" />
    </xs:choice>
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ComplexTypeSequenceChoiceAny01]:

  <ex:complexTypeSequenceChoiceAny>
      <ex:anyElement>any data</ex:anyElement>
   </ex:complexTypeSequenceChoiceAny>

2.14 Unions

2.14.1 UnionMemberTypes

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnionMemberTypes pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnionMemberTypes when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:union[@memberTypes and not(xs:simpleType)]/ (., @memberTypes)

The following example [XML Schema 1.0] extract illustrates the use of the UnionMemberTypes pattern within an [XML Schema 1.0] document [UnionMemberTypes]:

<xs:simpleType name="UnionMemberTypes">
  <xs:union memberTypes="xs:int xs:string" />
</xs:simpleType>
<xs:element name="unionMemberTypes" type="ex:UnionMemberTypes" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnionMemberTypes01]:

  <ex:unionMemberTypes>22</ex:unionMemberTypes>

as is the following element when included in an instance document [UnionMemberTypes02]:

  <ex:unionMemberTypes>a string?</ex:unionMemberTypes>

The following example [XML Schema 1.0] extract illustrates the use of the UnionMemberTypes pattern within an [XML Schema 1.0] document [UnionDateString]:

<xs:simpleType name="UnionDateString">
  <xs:union memberTypes="xs:date xs:string" />
</xs:simpleType>
<xs:element name="unionDateString" type="ex:UnionDateString" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnionDateString01]:

  <ex:unionDateString>Tonight</ex:unionDateString>

as is the following element when included in an instance document [UnionDateString02]:

  <ex:unionDateString>2006-06-06</ex:unionDateString>

2.14.2 UnionSimpleTypes

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnionSimpleTypes pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnionSimpleTypes when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:union[not(@memberTypes)]/xs:simpleType/ (.., .)

The following example [XML Schema 1.0] extract illustrates the use of the UnionSimpleTypes pattern within an [XML Schema 1.0] document [UnionSimpleDateString]:

<xs:simpleType name="UnionSimpleDateString">
  <xs:union>
    <xs:simpleType>
      <xs:restriction base="xs:date" />
    </xs:simpleType>
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:union>
</xs:simpleType>
<xs:element name="unionSimpleDateString" type="ex:UnionSimpleDateString" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnionSimpleDateString01]:

  <ex:unionSimpleDateString>Monday Night</ex:unionSimpleDateString>

as is the following element when included in an instance document [UnionSimpleDateString02]:

  <ex:unionSimpleDateString>2006-06-06</ex:unionSimpleDateString>

2.14.3 UnionSimpleAndMemberTypes

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnionSimpleAndMemberTypes pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnionSimpleAndMemberTypes when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:union[@memberTypes and xs:simpleType]/ (., @memberTypes, xs:simpleType)

The following example [XML Schema 1.0] extract illustrates the use of the UnionSimpleAndMemberTypes pattern within an [XML Schema 1.0] document [UnionSimpleAndMemberTypes]:

<xs:element name="unionSimpleAndMemberTypes" type="ex:UnionSimpleAndMemberTypes" />
<xs:simpleType name="UnionSimpleAndMemberTypes">
  <xs:union memberTypes="xs:string">
    <xs:simpleType>
      <xs:restriction base="xs:date" />
    </xs:simpleType>
  </xs:union>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnionSimpleAndMemberTypes01]:

  <ex:unionSimpleAndMemberTypes>string</ex:unionSimpleAndMemberTypes>

2.15 Lists

2.15.1 List

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the List pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/List when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:list[@itemType]/ (., @itemType)

The following example [XML Schema 1.0] extract illustrates the use of the List pattern within an [XML Schema 1.0] document [List]:

<xs:element name="list" type="ex:List" />
<xs:simpleType name="List">
  <xs:list itemType="xs:string" />
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [List01]:

  <ex:list>This is a list of strings</ex:list>

2.16 Element Predefined Types

2.16.1 AnySimpleTypeElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnySimpleTypeElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnySimpleTypeElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]

The following example [XML Schema 1.0] extract illustrates the use of the AnySimpleTypeElement pattern within an [XML Schema 1.0] document [AnySimpleTypeElement]:

<xs:element name="anySimpleTypeElement"  type="xs:anySimpleType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnySimpleTypeElement01]:

  <ex:anySimpleTypeElement/>

as is the following element when included in an instance document [AnySimpleTypeElement02]:

  <ex:anySimpleTypeElement>anySimpleTypeValue</ex:anySimpleTypeElement>

2.16.2 AnyTypeElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnyTypeElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyTypeElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyType')]

The following example [XML Schema 1.0] extract illustrates the use of the AnyTypeElement pattern within an [XML Schema 1.0] document [AnyTypeElement]:

<xs:element name="anyTypeElement"  type="xs:anyType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnyTypeElement01]:

  <ex:anyTypeElement/>

as is the following element when included in an instance document [AnyTypeElement02]:

  <ex:anyTypeElement>
      <foo>
         <bar>cheese</bar>
      </foo>
   </ex:anyTypeElement>

2.16.3 DecimalElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]

The following example [XML Schema 1.0] extract illustrates the use of the DecimalElement pattern within an [XML Schema 1.0] document [DecimalElement]:

<xs:element name="decimalElement"  type="xs:decimal" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalElement01]:

  <ex:decimalElement>0</ex:decimalElement>

as is the following element when included in an instance document [DecimalElement02]:

  <ex:decimalElement>-1.23</ex:decimalElement>

and the following element when included in an instance document [DecimalElement03]:

  <ex:decimalElement>12678967.543233</ex:decimalElement>

and the following element when included in an instance document [DecimalElement04]:

  <ex:decimalElement>+1000000.00</ex:decimalElement>

and the following element when included in an instance document [DecimalElement05]:

  <ex:decimalElement>+100000000000000000000000000000000000000000000.00</ex:decimalElement>

and the following element when included in an instance document [DecimalElement06]:

  <ex:decimalElement>210</ex:decimalElement>

and the following element when included in an instance document [DecimalElement07]:

  <ex:decimalElement>210.00</ex:decimalElement>

2.16.4 FloatElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the FloatElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/FloatElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:float')]

The following example [XML Schema 1.0] extract illustrates the use of the FloatElement pattern within an [XML Schema 1.0] document [FloatElement]:

<xs:element name="floatElement"  type="xs:float" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [FloatElement01]:

  <ex:floatElement>-1E4</ex:floatElement>

as is the following element when included in an instance document [FloatElement02]:

  <ex:floatElement>1267.43233E12</ex:floatElement>

and the following element when included in an instance document [FloatElement03]:

  <ex:floatElement>12.78e-2</ex:floatElement>

and the following element when included in an instance document [FloatElement04]:

  <ex:floatElement>12</ex:floatElement>

and the following element when included in an instance document [FloatElement05]:

  <ex:floatElement>INF</ex:floatElement>

2.16.5 DurationElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DurationElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DurationElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:duration')]

The following example [XML Schema 1.0] extract illustrates the use of the DurationElement pattern within an [XML Schema 1.0] document [DurationElement]:

<xs:element name="durationElement"  type="xs:duration" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DurationElement01]:

  <ex:durationElement>P1Y2M3DT10H30M</ex:durationElement>

as is the following element when included in an instance document [DurationElement02]:

  <ex:durationElement>-P1347M</ex:durationElement>

and the following element when included in an instance document [DurationElement03]:

  <ex:durationElement>P1347Y</ex:durationElement>

and the following element when included in an instance document [DurationElement04]:

  <ex:durationElement>P1M</ex:durationElement>

2.16.6 TimeElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the TimeElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/TimeElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:time')]

The following example [XML Schema 1.0] extract illustrates the use of the TimeElement pattern within an [XML Schema 1.0] document [TimeElement]:

<xs:element name="timeElement"  type="xs:time" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [TimeElement01]:

  <ex:timeElement>00:00:00</ex:timeElement>

as is the following element when included in an instance document [TimeElement02]:

  <ex:timeElement>12:00:01</ex:timeElement>

and the following element when included in an instance document [TimeElement03]:

  <ex:timeElement>23:59:59</ex:timeElement>

and the following element when included in an instance document [TimeElement04]:

  <ex:timeElement>13:21:03Z</ex:timeElement>

and the following element when included in an instance document [TimeElement05]:

  <ex:timeElement>13:21:03-04:32</ex:timeElement>

2.16.7 DateElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DateElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DateElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:date')]

The following example [XML Schema 1.0] extract illustrates the use of the DateElement pattern within an [XML Schema 1.0] document [DateElement]:

<xs:element name="dateElement"  type="xs:date" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DateElement01]:

  <ex:dateElement>1999-05-31</ex:dateElement>

as is the following element when included in an instance document [DateElement02]:

  <ex:dateElement>0739-05-31</ex:dateElement>

and the following element when included in an instance document [DateElement03]:

  <ex:dateElement>2038-05-31Z</ex:dateElement>

and the following element when included in an instance document [DateElement04]:

  <ex:dateElement>1999-05-31+05:43</ex:dateElement>

and the following element when included in an instance document [DateElement05]:

  <ex:dateElement>10739-05-31</ex:dateElement>

2.16.8 GYearMonthElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearMonthElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearMonthElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]

The following example [XML Schema 1.0] extract illustrates the use of the GYearMonthElement pattern within an [XML Schema 1.0] document [GYearMonthElement]:

<xs:element name="gYearMonthElement"  type="xs:gYearMonth" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearMonthElement01]:

  <ex:gYearMonthElement>1999-05</ex:gYearMonthElement>

as is the following element when included in an instance document [GYearMonthElement02]:

  <ex:gYearMonthElement>0739-05</ex:gYearMonthElement>

and the following element when included in an instance document [GYearMonthElement03]:

  <ex:gYearMonthElement>2038-02</ex:gYearMonthElement>

and the following element when included in an instance document [GYearMonthElement04]:

  <ex:gYearMonthElement>2007-05+01:00</ex:gYearMonthElement>

and the following element when included in an instance document [GYearMonthElement05]:

  <ex:gYearMonthElement>2007-05-01:00</ex:gYearMonthElement>

and the following element when included in an instance document [GYearMonthElement06]:

  <ex:gYearMonthElement>2007-05Z</ex:gYearMonthElement>

and the following element when included in an instance document [GYearMonthElement07]:

  <ex:gYearMonthElement>10739-05</ex:gYearMonthElement>

2.16.9 GYearElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]

The following example [XML Schema 1.0] extract illustrates the use of the GYearElement pattern within an [XML Schema 1.0] document [GYearElement]:

<xs:element name="gYearElement"  type="xs:gYear" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearElement01]:

  <ex:gYearElement>1999</ex:gYearElement>

as is the following element when included in an instance document [GYearElement02]:

  <ex:gYearElement>0739</ex:gYearElement>

and the following element when included in an instance document [GYearElement03]:

  <ex:gYearElement>2039</ex:gYearElement>

and the following element when included in an instance document [GYearElement04]:

  <ex:gYearElement>2007-13:00</ex:gYearElement>

and the following element when included in an instance document [GYearElement05]:

  <ex:gYearElement>1999+02:00</ex:gYearElement>

and the following element when included in an instance document [GYearElement06]:

  <ex:gYearElement>2008Z</ex:gYearElement>

and the following element when included in an instance document [GYearElement07]:

  <ex:gYearElement>10739</ex:gYearElement>

2.16.10 GMonthDayElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthDayElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthDayElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]

The following example [XML Schema 1.0] extract illustrates the use of the GMonthDayElement pattern within an [XML Schema 1.0] document [GMonthDayElement]:

<xs:element name="gMonthDayElement"  type="xs:gMonthDay" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthDayElement01]:

  <ex:gMonthDayElement>--12-31</ex:gMonthDayElement>

as is the following element when included in an instance document [GMonthDayElement02]:

  <ex:gMonthDayElement>--12-31Z</ex:gMonthDayElement>

and the following element when included in an instance document [GMonthDayElement03]:

  <ex:gMonthDayElement>--12-31-05:00</ex:gMonthDayElement>

and the following element when included in an instance document [GMonthDayElement04]:

  <ex:gMonthDayElement>--12-31+01:00</ex:gMonthDayElement>

2.16.11 GDayElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GDayElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GDayElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]

The following example [XML Schema 1.0] extract illustrates the use of the GDayElement pattern within an [XML Schema 1.0] document [GDayElement]:

<xs:element name="gDayElement"  type="xs:gDay" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GDayElement01]:

  <ex:gDayElement>---05</ex:gDayElement>

as is the following element when included in an instance document [GDayElement02]:

  <ex:gDayElement>---12Z</ex:gDayElement>

and the following element when included in an instance document [GDayElement03]:

  <ex:gDayElement>---31-12:00</ex:gDayElement>

and the following element when included in an instance document [GDayElement04]:

  <ex:gDayElement>---05+01:00</ex:gDayElement>

2.16.12 GMonthElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]

The following example [XML Schema 1.0] extract illustrates the use of the GMonthElement pattern within an [XML Schema 1.0] document [GMonthElement]:

<xs:element name="gMonthElement"  type="xs:gMonth" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthElement01]:

  <ex:gMonthElement>--02</ex:gMonthElement>

as is the following element when included in an instance document [GMonthElement02]:

  <ex:gMonthElement>--12-01:33</ex:gMonthElement>

and the following element when included in an instance document [GMonthElement03]:

  <ex:gMonthElement>--12+01:02</ex:gMonthElement>

and the following element when included in an instance document [GMonthElement04]:

  <ex:gMonthElement>--12Z</ex:gMonthElement>

2.16.13 HexBinaryElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the HexBinaryElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/HexBinaryElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]

The following example [XML Schema 1.0] extract illustrates the use of the HexBinaryElement pattern within an [XML Schema 1.0] document [HexBinaryElement]:

<xs:element name="hexBinaryElement"  type="xs:hexBinary" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [HexBinaryElement01]:

  <ex:hexBinaryElement>76</ex:hexBinaryElement>

as is the following element when included in an instance document [HexBinaryElement02]:

  <ex:hexBinaryElement>77696f646d6f6e7974637174716a7169696e6b65616f76786f746e66716b707875757261736e686469796b65706c656d7465626661637661646e6b65636662647669726d6f6e757361</ex:hexBinaryElement>

2.16.14 LanguageElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LanguageElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LanguageElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:language')]

Note, best current practice for the use of the xs:language type is described in [BCP 47].

The following example [XML Schema 1.0] extract illustrates the use of the LanguageElement pattern within an [XML Schema 1.0] document [LanguageElement]:

<xs:element name="languageElement"  type="xs:language" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LanguageElement01]:

  <ex:languageElement>en</ex:languageElement>

as is the following element when included in an instance document [LanguageElement02]:

  <ex:languageElement>fr</ex:languageElement>

2.16.15 NMTOKENElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NMTOKENElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NMTOKENElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]

The following example [XML Schema 1.0] extract illustrates the use of the NMTOKENElement pattern within an [XML Schema 1.0] document [NMTOKENElement]:

<xs:element name="NMTOKENElement"  type="xs:NMTOKEN" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NMTOKENElement01]:

  <ex:NMTOKENElement>id</ex:NMTOKENElement>

as is the following element when included in an instance document [NMTOKENElement02]:

  <ex:NMTOKENElement>vocabularies:that.as:clean:assuring-s_to:The_we:contain</ex:NMTOKENElement>

2.16.16 NMTOKENSElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NMTOKENSElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NMTOKENSElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]

The following example [XML Schema 1.0] extract illustrates the use of the NMTOKENSElement pattern within an [XML Schema 1.0] document [NMTOKENSElement]:

<xs:element name="NMTOKENSElement"  type="xs:NMTOKENS" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NMTOKENSElement01]:

  <ex:NMTOKENSElement>a b c d e.b:s-w_x:q</ex:NMTOKENSElement>

2.16.17 IDElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ID')]

The following example [XML Schema 1.0] extract illustrates the use of the IDElement pattern within an [XML Schema 1.0] document [IDElement]:

<xs:element name="IDElement"  type="xs:ID" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDElement01]:

  <ex:IDElement>foo</ex:IDElement>

2.16.18 IDREFElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDREFElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDREFElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]

The following example [XML Schema 1.0] extract illustrates the use of the IDREFElement pattern within an [XML Schema 1.0] document [IDREFElement]:

<xs:element name="IDREFElement" type="ex:IDREFElementComplextType" />
<xs:complexType name="IDREFElementComplextType">
  <xs:sequence>
    <xs:element name="element"  type="xs:IDREF" />
    <xs:element name="id" type="xs:ID" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDREFElement01]:

  <ex:IDREFElement>
      <ex:element>idref</ex:element>
      <ex:id>idref</ex:id>
   </ex:IDREFElement>

2.16.19 IDREFSElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDREFSElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDREFSElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]

The following example [XML Schema 1.0] extract illustrates the use of the IDREFSElement pattern within an [XML Schema 1.0] document [IDREFSElement]:

<xs:element name="IDREFSElement" type="ex:IDREFSElementComplextType" />
<xs:complexType name="IDREFSElementComplextType">
  <xs:sequence>
    <xs:element name="element"  type="xs:IDREFS" />
    <xs:element name="id1" type="xs:ID" />
    <xs:element name="id2" type="xs:ID" />
    <xs:element name="id3" type="xs:ID" />
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDREFSElement01]:

  <ex:IDREFSElement>
      <ex:element>id1 id2 id3</ex:element>
      <ex:id1>id1</ex:id1>
      <ex:id2>id2</ex:id2>
      <ex:id3>id3</ex:id3>
   </ex:IDREFSElement>

2.16.20 ENTITYElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ENTITYElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ENTITYElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]

The following example [XML Schema 1.0] extract illustrates the use of the ENTITYElement pattern within an [XML Schema 1.0] document [ENTITYElement]:

<xs:element name="ENTITYElement"  type="xs:ENTITY" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ENTITYElement01]:

  <ex:ENTITYElement>lt</ex:ENTITYElement>

2.16.21 ENTITIESElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ENTITIESElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ENTITIESElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]

The following example [XML Schema 1.0] extract illustrates the use of the ENTITIESElement pattern within an [XML Schema 1.0] document [ENTITIESElement]:

<xs:element name="ENTITIESElement"  type="xs:ENTITIES" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ENTITIESElement01]:

  <ex:ENTITIESElement>lt gt apos quot</ex:ENTITIESElement>

2.16.22 IntegerElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntegerElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntegerElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:integer')]

The following example [XML Schema 1.0] extract illustrates the use of the IntegerElement pattern within an [XML Schema 1.0] document [IntegerElement]:

<xs:element name="integerElement"  type="xs:integer" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntegerElement01]:

  <ex:integerElement>0</ex:integerElement>

as is the following element when included in an instance document [IntegerElement02]:

  <ex:integerElement>1</ex:integerElement>

and the following element when included in an instance document [IntegerElement03]:

  <ex:integerElement>-42</ex:integerElement>

and the following element when included in an instance document [IntegerElement04]:

  <ex:integerElement>12678967543233</ex:integerElement>

and the following element when included in an instance document [IntegerElement05]:

  <ex:integerElement>+10000</ex:integerElement>

and the following element when included in an instance document [IntegerElement06]:

  <ex:integerElement>1234567891234567838475834753838887348573489123456789123456789</ex:integerElement>

and the following element when included in an instance document [IntegerElement07]:

  <ex:integerElement>-1234567891234567838475834753838887348573489123456789123456789</ex:integerElement>

2.16.23 NonPositiveIntegerElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NonPositiveIntegerElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NonPositiveIntegerElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]

The following example [XML Schema 1.0] extract illustrates the use of the NonPositiveIntegerElement pattern within an [XML Schema 1.0] document [NonPositiveIntegerElement]:

<xs:element name="nonPositiveIntegerElement"  type="xs:nonPositiveInteger" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NonPositiveIntegerElement01]:

  <ex:nonPositiveIntegerElement>-1</ex:nonPositiveIntegerElement>

as is the following element when included in an instance document [NonPositiveIntegerElement02]:

  <ex:nonPositiveIntegerElement>0</ex:nonPositiveIntegerElement>

and the following element when included in an instance document [NonPositiveIntegerElement03]:

  <ex:nonPositiveIntegerElement>+0</ex:nonPositiveIntegerElement>

and the following element when included in an instance document [NonPositiveIntegerElement04]:

  <ex:nonPositiveIntegerElement>-1234324234532534254325234534252345342534253425324534253244</ex:nonPositiveIntegerElement>

2.16.24 NegativeIntegerElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NegativeIntegerElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NegativeIntegerElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]

The following example [XML Schema 1.0] extract illustrates the use of the NegativeIntegerElement pattern within an [XML Schema 1.0] document [NegativeIntegerElement]:

<xs:element name="negativeIntegerElement"  type="xs:negativeInteger" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NegativeIntegerElement01]:

  <ex:negativeIntegerElement>-1</ex:negativeIntegerElement>

as is the following element when included in an instance document [NegativeIntegerElement02]:

  <ex:negativeIntegerElement>-12343242342345345346453643564536543645363456</ex:negativeIntegerElement>

2.16.25 NonNegativeIntegerElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NonNegativeIntegerElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NonNegativeIntegerElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]

The following example [XML Schema 1.0] extract illustrates the use of the NonNegativeIntegerElement pattern within an [XML Schema 1.0] document [NonNegativeIntegerElement]:

<xs:element name="nonNegativeIntegerElement"  type="xs:nonNegativeInteger" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NonNegativeIntegerElement01]:

  <ex:nonNegativeIntegerElement>1</ex:nonNegativeIntegerElement>

as is the following element when included in an instance document [NonNegativeIntegerElement02]:

  <ex:nonNegativeIntegerElement>-0</ex:nonNegativeIntegerElement>

and the following element when included in an instance document [NonNegativeIntegerElement03]:

  <ex:nonNegativeIntegerElement>0</ex:nonNegativeIntegerElement>

and the following element when included in an instance document [NonNegativeIntegerElement04]:

  <ex:nonNegativeIntegerElement>+42</ex:nonNegativeIntegerElement>

and the following element when included in an instance document [NonNegativeIntegerElement05]:

  <ex:nonNegativeIntegerElement>3141592653531415926536106615151970884848347234273984723</ex:nonNegativeIntegerElement>

2.16.26 UnsignedLongElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedLongElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedLongElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedLongElement pattern within an [XML Schema 1.0] document [UnsignedLongElement]:

<xs:element name="unsignedLongElement"  type="xs:unsignedLong" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedLongElement01]:

  <ex:unsignedLongElement>1</ex:unsignedLongElement>

as is the following element when included in an instance document [UnsignedLongElement02]:

  <ex:unsignedLongElement>-0</ex:unsignedLongElement>

and the following element when included in an instance document [UnsignedLongElement03]:

  <ex:unsignedLongElement>+42</ex:unsignedLongElement>

and the following element when included in an instance document [UnsignedLongElement04]:

  <ex:unsignedLongElement>18446744073709551615</ex:unsignedLongElement>

2.16.27 UnsignedIntElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedIntElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedIntElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedIntElement pattern within an [XML Schema 1.0] document [UnsignedIntElement]:

<xs:element name="unsignedIntElement"  type="xs:unsignedInt" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedIntElement01]:

  <ex:unsignedIntElement>1</ex:unsignedIntElement>

as is the following element when included in an instance document [UnsignedIntElement02]:

  <ex:unsignedIntElement>-0</ex:unsignedIntElement>

and the following element when included in an instance document [UnsignedIntElement03]:

  <ex:unsignedIntElement>+42</ex:unsignedIntElement>

and the following element when included in an instance document [UnsignedIntElement04]:

  <ex:unsignedIntElement>4294967295</ex:unsignedIntElement>

2.16.28 UnsignedShortElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedShortElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedShortElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedShortElement pattern within an [XML Schema 1.0] document [UnsignedShortElement]:

<xs:element name="unsignedShortElement"  type="xs:unsignedShort" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedShortElement01]:

  <ex:unsignedShortElement>1</ex:unsignedShortElement>

as is the following element when included in an instance document [UnsignedShortElement02]:

  <ex:unsignedShortElement>-0</ex:unsignedShortElement>

and the following element when included in an instance document [UnsignedShortElement03]:

  <ex:unsignedShortElement>+42</ex:unsignedShortElement>

and the following element when included in an instance document [UnsignedShortElement04]:

  <ex:unsignedShortElement>65535</ex:unsignedShortElement>

2.16.29 UnsignedByteElement

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedByteElement pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedByteElement when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedByteElement pattern within an [XML Schema 1.0] document [UnsignedByteElement]:

<xs:element name="unsignedByteElement"  type="xs:unsignedByte" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedByteElement01]:

  <ex:unsignedByteElement>1</ex:unsignedByteElement>

as is the following element when included in an instance document [UnsignedByteElement02]:

  <ex:unsignedByteElement>-0</ex:unsignedByteElement>

and the following element when included in an instance document [UnsignedByteElement03]:

  <ex:unsignedByteElement>+42</ex:unsignedByteElement>

and the following element when included in an instance document [UnsignedByteElement04]:

  <ex:unsignedByteElement>255</ex:unsignedByteElement>

2.17 Attribute Predefined Types

2.17.1 AnySimpleTypeAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AnySimpleTypeAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AnySimpleTypeAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]

The following example [XML Schema 1.0] extract illustrates the use of the AnySimpleTypeAttribute pattern within an [XML Schema 1.0] document [AnySimpleTypeAttribute]:

<xs:element name="anySimpleTypeAttribute" type="ex:AnySimpleTypeAttribute" />
<xs:complexType name="AnySimpleTypeAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="anySimpleType"  type="xs:anySimpleType" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AnySimpleTypeAttribute01]:

  <ex:anySimpleTypeAttribute anySimpleType="hello"/>

as is the following element when included in an instance document [AnySimpleTypeAttribute02]:

  <ex:anySimpleTypeAttribute anySimpleType="1"/>

2.17.2 DecimalAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]

The following example [XML Schema 1.0] extract illustrates the use of the DecimalAttribute pattern within an [XML Schema 1.0] document [DecimalAttribute]:

<xs:element name="decimalAttribute" type="ex:DecimalAttribute" />
<xs:complexType name="DecimalAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="decimal"  type="xs:decimal" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalAttribute01]:

  <ex:decimalAttribute decimal="+10000000999829292922093443563.32423442"/>

2.17.3 FloatAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the FloatAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/FloatAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:float')]

The following example [XML Schema 1.0] extract illustrates the use of the FloatAttribute pattern within an [XML Schema 1.0] document [FloatAttribute]:

<xs:element name="floatAttribute" type="ex:FloatAttribute" />
<xs:complexType name="FloatAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="float"  type="xs:float" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [FloatAttribute01]:

  <ex:floatAttribute float="-7446.445E5"/>

2.17.4 DurationAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DurationAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DurationAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:duration')]

The following example [XML Schema 1.0] extract illustrates the use of the DurationAttribute pattern within an [XML Schema 1.0] document [DurationAttribute]:

<xs:element name="durationAttribute" type="ex:DurationAttribute" />
<xs:complexType name="DurationAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="duration"  type="xs:duration" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DurationAttribute01]:

  <ex:durationAttribute duration="P1M"/>

2.17.5 TimeAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the TimeAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/TimeAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:time')]

The following example [XML Schema 1.0] extract illustrates the use of the TimeAttribute pattern within an [XML Schema 1.0] document [TimeAttribute]:

<xs:element name="timeAttribute" type="ex:TimeAttribute" />
<xs:complexType name="TimeAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="time"  type="xs:time" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [TimeAttribute01]:

  <ex:timeAttribute time="00:00:00"/>

as is the following element when included in an instance document [TimeAttribute02]:

  <ex:timeAttribute time="12:00:01"/>

and the following element when included in an instance document [TimeAttribute03]:

  <ex:timeAttribute time="23:59:59"/>

and the following element when included in an instance document [TimeAttribute04]:

  <ex:timeAttribute time="12:34:56Z"/>

and the following element when included in an instance document [TimeAttribute05]:

  <ex:timeAttribute time="12:34:56+01:23"/>

2.17.6 DateAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DateAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DateAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:date')]

The following example [XML Schema 1.0] extract illustrates the use of the DateAttribute pattern within an [XML Schema 1.0] document [DateAttribute]:

<xs:element name="dateAttribute" type="ex:DateAttribute" />
<xs:complexType name="DateAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="date"  type="xs:date" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DateAttribute01]:

  <ex:dateAttribute date="2006-05-30"/>

as is the following element when included in an instance document [DateAttribute02]:

  <ex:dateAttribute date="0739-05-31"/>

and the following element when included in an instance document [DateAttribute03]:

  <ex:dateAttribute date="2038-12-31Z"/>

and the following element when included in an instance document [DateAttribute04]:

  <ex:dateAttribute date="2006-05-30-01:00"/>

and the following element when included in an instance document [DateAttribute05]:

  <ex:dateAttribute date="10739-05-31"/>

2.17.7 GYearMonthAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearMonthAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearMonthAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]

The following example [XML Schema 1.0] extract illustrates the use of the GYearMonthAttribute pattern within an [XML Schema 1.0] document [GYearMonthAttribute]:

<xs:element name="gYearMonthAttribute" type="ex:GYearMonthAttribute" />
<xs:complexType name="GYearMonthAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="gYearMonth"  type="xs:gYearMonth" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearMonthAttribute01]:

  <ex:gYearMonthAttribute gYearMonth="2006-09"/>

as is the following element when included in an instance document [GYearMonthAttribute02]:

  <ex:gYearMonthAttribute gYearMonth="0739-09"/>

and the following element when included in an instance document [GYearMonthAttribute03]:

  <ex:gYearMonthAttribute gYearMonth="2038-09"/>

and the following element when included in an instance document [GYearMonthAttribute04]:

  <ex:gYearMonthAttribute gYearMonth="2006-09+01:00"/>

and the following element when included in an instance document [GYearMonthAttribute05]:

  <ex:gYearMonthAttribute gYearMonth="2006-09-01:00"/>

and the following element when included in an instance document [GYearMonthAttribute06]:

  <ex:gYearMonthAttribute gYearMonth="2007-05Z"/>

and the following element when included in an instance document [GYearMonthAttribute07]:

  <ex:gYearMonthAttribute gYearMonth="10739-09"/>

2.17.8 GYearAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]

The following example [XML Schema 1.0] extract illustrates the use of the GYearAttribute pattern within an [XML Schema 1.0] document [GYearAttribute]:

<xs:element name="gYearAttribute" type="ex:GYearAttribute" />
<xs:complexType name="GYearAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="gYear"  type="xs:gYear" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearAttribute01]:

  <ex:gYearAttribute gYear="1999"/>

as is the following element when included in an instance document [GYearAttribute02]:

  <ex:gYearAttribute gYear="0739"/>

and the following element when included in an instance document [GYearAttribute03]:

  <ex:gYearAttribute gYear="2039"/>

and the following element when included in an instance document [GYearAttribute04]:

  <ex:gYearAttribute gYear="2007-13:00"/>

and the following element when included in an instance document [GYearAttribute05]:

  <ex:gYearAttribute gYear="1999+02:00"/>

and the following element when included in an instance document [GYearAttribute06]:

  <ex:gYearAttribute gYear="2008Z"/>

and the following element when included in an instance document [GYearAttribute07]:

  <ex:gYearAttribute gYear="10739"/>

2.17.9 GMonthDayAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthDayAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthDayAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]

The following example [XML Schema 1.0] extract illustrates the use of the GMonthDayAttribute pattern within an [XML Schema 1.0] document [GMonthDayAttribute]:

<xs:element name="gMonthDayAttribute" type="ex:GMonthDayAttribute" />
<xs:complexType name="GMonthDayAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="gMonthDay"  type="xs:gMonthDay" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthDayAttribute01]:

  <ex:gMonthDayAttribute gMonthDay="--09-28"/>

as is the following element when included in an instance document [GMonthDayAttribute02]:

  <ex:gMonthDayAttribute gMonthDay="--09-28Z"/>

and the following element when included in an instance document [GMonthDayAttribute03]:

  <ex:gMonthDayAttribute gMonthDay="--09-28-13:00"/>

and the following element when included in an instance document [GMonthDayAttribute04]:

  <ex:gMonthDayAttribute gMonthDay="--09-28+01:00"/>

2.17.10 GDayAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GDayAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GDayAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]

The following example [XML Schema 1.0] extract illustrates the use of the GDayAttribute pattern within an [XML Schema 1.0] document [GDayAttribute]:

<xs:element name="gDayAttribute" type="ex:GDayAttribute" />
<xs:complexType name="GDayAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="gDay"  type="xs:gDay" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GDayAttribute01]:

  <ex:gDayAttribute gDay="---09"/>

as is the following element when included in an instance document [GDayAttribute02]:

  <ex:gDayAttribute gDay="---12Z"/>

and the following element when included in an instance document [GDayAttribute03]:

  <ex:gDayAttribute gDay="---24-12:00"/>

and the following element when included in an instance document [GDayAttribute04]:

  <ex:gDayAttribute gDay="---31+01:00"/>

2.17.11 GMonthAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]

The following example [XML Schema 1.0] extract illustrates the use of the GMonthAttribute pattern within an [XML Schema 1.0] document [GMonthAttribute]:

<xs:element name="gMonthAttribute" type="ex:GMonthAttribute" />
<xs:complexType name="GMonthAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="gMonth"  type="xs:gMonth" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthAttribute01]:

  <ex:gMonthAttribute gMonth="--04--"/>

as is the following element when included in an instance document [GMonthAttribute02]:

  <ex:gMonthAttribute gMonth="--04Z"/>

and the following element when included in an instance document [GMonthAttribute03]:

  <ex:gMonthAttribute gMonth="--12+02:00"/>

and the following element when included in an instance document [GMonthAttribute04]:

  <ex:gMonthAttribute gMonth="--04-10:00"/>

2.17.12 HexBinaryAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the HexBinaryAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/HexBinaryAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]

The following example [XML Schema 1.0] extract illustrates the use of the HexBinaryAttribute pattern within an [XML Schema 1.0] document [HexBinaryAttribute]:

<xs:element name="hexBinaryAttribute" type="ex:HexBinaryAttribute" />
<xs:complexType name="HexBinaryAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="hexBinary"  type="xs:hexBinary" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [HexBinaryAttribute01]:

  <ex:hexBinaryAttribute hexBinary="77696f"/>

2.17.13 Base64BinaryAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the Base64BinaryAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/Base64BinaryAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]

The following example [XML Schema 1.0] extract illustrates the use of the Base64BinaryAttribute pattern within an [XML Schema 1.0] document [Base64BinaryAttribute]:

<xs:element name="base64BinaryAttribute" type="ex:Base64BinaryAttribute" />
<xs:complexType name="Base64BinaryAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="base64Binary"  type="xs:base64Binary" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [Base64BinaryAttribute01]:

  <ex:base64BinaryAttribute base64Binary="cnRjbGNyZW9scg=="/>

2.17.14 LanguageAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LanguageAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LanguageAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:language')]

Note, best current practice for the use of the xs:language type is described in [BCP 47].

The following example [XML Schema 1.0] extract illustrates the use of the LanguageAttribute pattern within an [XML Schema 1.0] document [LanguageAttribute]:

<xs:element name="languageAttribute" type="ex:LanguageAttribute" />
<xs:complexType name="LanguageAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="language"  type="xs:language" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LanguageAttribute01]:

  <ex:languageAttribute language="en"/>

2.17.15 NMTOKENAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NMTOKENAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NMTOKENAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]

The following example [XML Schema 1.0] extract illustrates the use of the NMTOKENAttribute pattern within an [XML Schema 1.0] document [NMTOKENAttribute]:

<xs:element name="NMTOKENAttribute" type="ex:NMTOKENAttribute" />
<xs:complexType name="NMTOKENAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="NMTOKEN"  type="xs:NMTOKEN" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NMTOKENAttribute01]:

  <ex:NMTOKENAttribute NMTOKEN="id"/>

2.17.16 NMTOKENSAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NMTOKENSAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NMTOKENSAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]

The following example [XML Schema 1.0] extract illustrates the use of the NMTOKENSAttribute pattern within an [XML Schema 1.0] document [NMTOKENSAttribute]:

<xs:element name="NMTOKENSAttribute" type="ex:NMTOKENSAttribute" />
<xs:complexType name="NMTOKENSAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="NMTOKENS"  type="xs:NMTOKENS" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NMTOKENSAttribute01]:

  <ex:NMTOKENSAttribute NMTOKENS="id a b e.b:s-dd:q"/>

2.17.17 IDAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ID')]

The following example [XML Schema 1.0] extract illustrates the use of the IDAttribute pattern within an [XML Schema 1.0] document [IDAttribute]:

<xs:element name="IDAttribute" type="ex:IDAttribute" />
<xs:complexType name="IDAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="ID"  type="xs:ID" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDAttribute01]:

  <ex:IDAttribute ID="bar"/>

2.17.18 IDREFAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDREFAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDREFAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]

The following example [XML Schema 1.0] extract illustrates the use of the IDREFAttribute pattern within an [XML Schema 1.0] document [IDREFAttribute]:

<xs:element name="IDREFAttribute" type="ex:IDREFAttributeComplexType" />
<xs:complexType name="IDREFAttributeComplexType">
  <xs:sequence>
    <xs:element name="id" type="xs:ID" />
  </xs:sequence>
  <xs:attribute name="IDREF"  type="xs:IDREF" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDREFAttribute01]:

  <ex:IDREFAttribute IDREF="id1">
      <ex:id>id1</ex:id>
   </ex:IDREFAttribute>

2.17.19 IDREFSAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IDREFSAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IDREFSAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]

The following example [XML Schema 1.0] extract illustrates the use of the IDREFSAttribute pattern within an [XML Schema 1.0] document [IDREFSAttribute]:

<xs:element name="IDREFSAttribute" type="ex:IDREFSAttributeComplexType" />
<xs:complexType name="IDREFSAttributeComplexType">
  <xs:sequence>
    <xs:element name="id1" type="xs:ID" />
    <xs:element name="id2" type="xs:ID" />
    <xs:element name="id3" type="xs:ID" />
  </xs:sequence>
  <xs:attribute name="IDREFS"  type="xs:IDREFS" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IDREFSAttribute01]:

  <ex:IDREFSAttribute IDREFS="id1 id2 id3">
      <ex:id1>id1</ex:id1>
      <ex:id2>id2</ex:id2>
      <ex:id3>id3</ex:id3>
   </ex:IDREFSAttribute>

2.17.20 ENTITYAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ENTITYAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ENTITYAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]

The following example [XML Schema 1.0] extract illustrates the use of the ENTITYAttribute pattern within an [XML Schema 1.0] document [ENTITYAttribute]:

<xs:element name="ENTITYAttribute" type="ex:ENTITYAttribute" />
<xs:complexType name="ENTITYAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="ENTITY"  type="xs:ENTITY" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ENTITYAttribute01]:

  <ex:ENTITYAttribute ENTITY="lt"/>

2.17.21 ENTITIESAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ENTITIESAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ENTITIESAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]

The following example [XML Schema 1.0] extract illustrates the use of the ENTITIESAttribute pattern within an [XML Schema 1.0] document [ENTITIESAttribute]:

<xs:element name="ENTITIESAttribute" type="ex:ENTITIESAttribute" />
<xs:complexType name="ENTITIESAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="ENTITIES"  type="xs:ENTITIES" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ENTITIESAttribute01]:

  <ex:ENTITIESAttribute ENTITIES="lt gt"/>

2.17.22 IntegerAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntegerAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntegerAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:integer')]

The following example [XML Schema 1.0] extract illustrates the use of the IntegerAttribute pattern within an [XML Schema 1.0] document [IntegerAttribute]:

<xs:element name="integerAttribute" type="ex:IntegerAttribute" />
<xs:complexType name="IntegerAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="integer"  type="xs:integer" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntegerAttribute01]:

  <ex:integerAttribute integer="10002"/>

as is the following element when included in an instance document [IntegerAttribute02]:

  <ex:integerAttribute integer="-0"/>

and the following element when included in an instance document [IntegerAttribute03]:

  <ex:integerAttribute integer="+42"/>

and the following element when included in an instance document [IntegerAttribute04]:

  <ex:integerAttribute integer="-42"/>

and the following element when included in an instance document [IntegerAttribute05]:

  <ex:integerAttribute integer="-45345384593849583945843453454293405930495309450394503"/>

and the following element when included in an instance document [IntegerAttribute06]:

  <ex:integerAttribute integer="123456789013234235435325235325325345432543253425324534253245"/>

2.17.23 NonPositiveIntegerAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NonPositiveIntegerAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NonPositiveIntegerAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]

The following example [XML Schema 1.0] extract illustrates the use of the NonPositiveIntegerAttribute pattern within an [XML Schema 1.0] document [NonPositiveIntegerAttribute]:

<xs:element name="nonPositiveIntegerAttribute" type="ex:NonPositiveIntegerAttribute" />
<xs:complexType name="NonPositiveIntegerAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="nonPositiveInteger"  type="xs:nonPositiveInteger" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NonPositiveIntegerAttribute01]:

  <ex:nonPositiveIntegerAttribute nonPositiveInteger="-20"/>

as is the following element when included in an instance document [NonPositiveIntegerAttribute02]:

  <ex:nonPositiveIntegerAttribute nonPositiveInteger="0"/>

and the following element when included in an instance document [NonPositiveIntegerAttribute03]:

  <ex:nonPositiveIntegerAttribute nonPositiveInteger="+0"/>

and the following element when included in an instance document [NonPositiveIntegerAttribute04]:

  <ex:nonPositiveIntegerAttribute nonPositiveInteger="-202342353425435345342567965342969786978679"/>

2.17.24 NegativeIntegerAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NegativeIntegerAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NegativeIntegerAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]

The following example [XML Schema 1.0] extract illustrates the use of the NegativeIntegerAttribute pattern within an [XML Schema 1.0] document [NegativeIntegerAttribute]:

<xs:element name="negativeIntegerAttribute" type="ex:NegativeIntegerAttribute" />
<xs:complexType name="NegativeIntegerAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="negativeInteger"  type="xs:negativeInteger" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NegativeIntegerAttribute01]:

  <ex:negativeIntegerAttribute negativeInteger="-100"/>

as is the following element when included in an instance document [NegativeIntegerAttribute02]:

  <ex:negativeIntegerAttribute negativeInteger="-12343242342345345346453643564536543645363456"/>

2.17.25 UnsignedLongAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedLongAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedLongAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedLongAttribute pattern within an [XML Schema 1.0] document [UnsignedLongAttribute]:

<xs:element name="unsignedLongAttribute" type="ex:UnsignedLongAttribute" />
<xs:complexType name="UnsignedLongAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="unsignedLong"  type="xs:unsignedLong" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedLongAttribute01]:

  <ex:unsignedLongAttribute unsignedLong="2034"/>

as is the following element when included in an instance document [UnsignedLongAttribute02]:

  <ex:unsignedLongAttribute unsignedLong="-0"/>

and the following element when included in an instance document [UnsignedLongAttribute03]:

  <ex:unsignedLongAttribute unsignedLong="+42"/>

and the following element when included in an instance document [UnsignedLongAttribute04]:

  <ex:unsignedLongAttribute unsignedLong="18446744073709551615"/>

2.17.26 UnsignedIntAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedIntAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedIntAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedIntAttribute pattern within an [XML Schema 1.0] document [UnsignedIntAttribute]:

<xs:element name="unsignedIntAttribute" type="ex:UnsignedIntAttribute" />
<xs:complexType name="UnsignedIntAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="unsignedInt"  type="xs:unsignedInt" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedIntAttribute01]:

  <ex:unsignedIntAttribute unsignedInt="32334"/>

as is the following element when included in an instance document [UnsignedIntAttribute02]:

  <ex:unsignedIntAttribute unsignedInt="-0"/>

and the following element when included in an instance document [UnsignedIntAttribute03]:

  <ex:unsignedIntAttribute unsignedInt="+42"/>

and the following element when included in an instance document [UnsignedIntAttribute04]:

  <ex:unsignedIntAttribute unsignedInt="4294967295"/>

2.17.27 UnsignedShortAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedShortAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedShortAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedShortAttribute pattern within an [XML Schema 1.0] document [UnsignedShortAttribute]:

<xs:element name="unsignedShortAttribute" type="ex:UnsignedShortAttribute" />
<xs:complexType name="UnsignedShortAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="unsignedShort"  type="xs:unsignedShort" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedShortAttribute01]:

  <ex:unsignedShortAttribute unsignedShort="22"/>

as is the following element when included in an instance document [UnsignedShortAttribute02]:

  <ex:unsignedShortAttribute unsignedShort="-0"/>

and the following element when included in an instance document [UnsignedShortAttribute03]:

  <ex:unsignedShortAttribute unsignedShort="+42"/>

and the following element when included in an instance document [UnsignedShortAttribute04]:

  <ex:unsignedShortAttribute unsignedShort="65535"/>

2.17.28 UnsignedByteAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedByteAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedByteAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedByteAttribute pattern within an [XML Schema 1.0] document [UnsignedByteAttribute]:

<xs:element name="unsignedByteAttribute" type="ex:UnsignedByteAttribute" />
<xs:complexType name="UnsignedByteAttribute">
  <xs:sequence>
    <xs:element name="text" type="xs:string" minOccurs="0" />
  </xs:sequence>
  <xs:attribute name="unsignedByte"  type="xs:unsignedByte" />
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedByteAttribute01]:

  <ex:unsignedByteAttribute unsignedByte="64"/>

as is the following element when included in an instance document [UnsignedByteAttribute02]:

  <ex:unsignedByteAttribute unsignedByte="-0"/>

and the following element when included in an instance document [UnsignedByteAttribute03]:

  <ex:unsignedByteAttribute unsignedByte="+42"/>

and the following element when included in an instance document [UnsignedByteAttribute04]:

  <ex:unsignedByteAttribute unsignedByte="255"/>

2.18 Restricted Schema Types

2.18.1 StringSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the StringSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/StringSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the StringSimpleTypePattern pattern within an [XML Schema 1.0] document [StringSimpleTypePattern]:

<xs:element name="stringSimpleTypePattern" type="ex:StringSimpleTypePattern" />
<xs:simpleType name="StringSimpleTypePattern">
  <xs:restriction base="xs:string">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [StringSimpleTypePattern01]:

  <ex:stringSimpleTypePattern>123</ex:stringSimpleTypePattern>

as is the following element when included in an instance document [StringSimpleTypePattern02]:

  <ex:stringSimpleTypePattern>009</ex:stringSimpleTypePattern>

2.18.2 IntSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the IntSimpleTypePattern pattern within an [XML Schema 1.0] document [IntSimpleTypePattern]:

<xs:element name="intSimpleTypePattern" type="ex:IntSimpleTypePattern" />
<xs:simpleType name="IntSimpleTypePattern">
  <xs:restriction base="xs:int">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntSimpleTypePattern01]:

  <ex:intSimpleTypePattern>123</ex:intSimpleTypePattern>

as is the following element when included in an instance document [IntSimpleTypePattern02]:

  <ex:intSimpleTypePattern>009</ex:intSimpleTypePattern>

2.18.3 IntegerSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the IntegerSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/IntegerSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the IntegerSimpleTypePattern pattern within an [XML Schema 1.0] document [IntegerSimpleTypePattern]:

<xs:element name="integerSimpleTypePattern" type="ex:IntegerSimpleTypePattern" />
<xs:simpleType name="IntegerSimpleTypePattern">
  <xs:restriction base="xs:integer">
    <xs:pattern value="[+\-]?([1-9][0-9]*)|0" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [IntegerSimpleTypePattern01]:

  <ex:integerSimpleTypePattern>123</ex:integerSimpleTypePattern>

as is the following element when included in an instance document [IntegerSimpleTypePattern02]:

  <ex:integerSimpleTypePattern>9</ex:integerSimpleTypePattern>

2.18.4 LongSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the LongSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/LongSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the LongSimpleTypePattern pattern within an [XML Schema 1.0] document [LongSimpleTypePattern]:

<xs:element name="longSimpleTypePattern" type="ex:LongSimpleTypePattern" />
<xs:simpleType name="LongSimpleTypePattern">
  <xs:restriction base="xs:long">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [LongSimpleTypePattern01]:

  <ex:longSimpleTypePattern>123</ex:longSimpleTypePattern>

as is the following element when included in an instance document [LongSimpleTypePattern02]:

  <ex:longSimpleTypePattern>009</ex:longSimpleTypePattern>

2.18.5 DecimalSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DecimalSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DecimalSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the DecimalSimpleTypePattern pattern within an [XML Schema 1.0] document [DecimalSimpleTypePattern]:

<xs:element name="decimalSimpleTypePattern" type="ex:DecimalSimpleTypePattern" />
<xs:simpleType name="DecimalSimpleTypePattern">
  <xs:restriction base="xs:decimal">
    <xs:pattern value="\d{4}\.\d{2}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DecimalSimpleTypePattern01]:

  <ex:decimalSimpleTypePattern>1234.12</ex:decimalSimpleTypePattern>

as is the following element when included in an instance document [DecimalSimpleTypePattern02]:

  <ex:decimalSimpleTypePattern>9898.00</ex:decimalSimpleTypePattern>

2.18.6 FloatSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the FloatSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/FloatSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the FloatSimpleTypePattern pattern within an [XML Schema 1.0] document [FloatSimpleTypePattern]:

<xs:element name="floatSimpleTypePattern" type="ex:FloatSimpleTypePattern" />
<xs:simpleType name="FloatSimpleTypePattern">
  <xs:restriction base="xs:float">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [FloatSimpleTypePattern01]:

  <ex:floatSimpleTypePattern>123</ex:floatSimpleTypePattern>

as is the following element when included in an instance document [FloatSimpleTypePattern02]:

  <ex:floatSimpleTypePattern>009</ex:floatSimpleTypePattern>

2.18.7 DoubleSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DoubleSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DoubleSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the DoubleSimpleTypePattern pattern within an [XML Schema 1.0] document [DoubleSimpleTypePattern]:

<xs:element name="doubleSimpleTypePattern" type="ex:DoubleSimpleTypePattern" />
<xs:simpleType name="DoubleSimpleTypePattern">
  <xs:restriction base="xs:double">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DoubleSimpleTypePattern01]:

  <ex:doubleSimpleTypePattern>123</ex:doubleSimpleTypePattern>

as is the following element when included in an instance document [DoubleSimpleTypePattern02]:

  <ex:doubleSimpleTypePattern>009</ex:doubleSimpleTypePattern>

2.18.8 ShortSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ShortSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ShortSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the ShortSimpleTypePattern pattern within an [XML Schema 1.0] document [ShortSimpleTypePattern]:

<xs:element name="shortSimpleTypePattern" type="ex:ShortSimpleTypePattern" />
<xs:simpleType name="ShortSimpleTypePattern">
  <xs:restriction base="xs:short">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ShortSimpleTypePattern01]:

  <ex:shortSimpleTypePattern>123</ex:shortSimpleTypePattern>

as is the following element when included in an instance document [ShortSimpleTypePattern02]:

  <ex:shortSimpleTypePattern>009</ex:shortSimpleTypePattern>

2.18.9 ByteSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ByteSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ByteSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:byte')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the ByteSimpleTypePattern pattern within an [XML Schema 1.0] document [ByteSimpleTypePattern]:

<xs:element name="byteSimpleTypePattern" type="ex:ByteSimpleTypePattern" />
<xs:simpleType name="ByteSimpleTypePattern">
  <xs:restriction base="xs:byte">
    <xs:pattern value="1" />
    <xs:pattern value="2" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ByteSimpleTypePattern01]:

  <ex:byteSimpleTypePattern>1</ex:byteSimpleTypePattern>

2.18.10 NonNegativeIntegerSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the NonNegativeIntegerSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/NonNegativeIntegerSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the NonNegativeIntegerSimpleTypePattern pattern within an [XML Schema 1.0] document [NonNegativeIntegerSimpleTypePattern]:

<xs:element name="nonNegativeIntegerSimpleTypePattern" type="ex:NonNegativeIntegerSimpleTypePattern" />
<xs:simpleType name="NonNegativeIntegerSimpleTypePattern">
  <xs:restriction base="xs:nonNegativeInteger">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [NonNegativeIntegerSimpleTypePattern01]:

  <ex:nonNegativeIntegerSimpleTypePattern>123</ex:nonNegativeIntegerSimpleTypePattern>

as is the following element when included in an instance document [NonNegativeIntegerSimpleTypePattern02]:

  <ex:nonNegativeIntegerSimpleTypePattern>009</ex:nonNegativeIntegerSimpleTypePattern>

2.18.11 PositiveIntegerSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the PositiveIntegerSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/PositiveIntegerSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the PositiveIntegerSimpleTypePattern pattern within an [XML Schema 1.0] document [PositiveIntegerSimpleTypePattern]:

<xs:element name="positiveIntegerSimpleTypePattern" type="ex:PositiveIntegerSimpleTypePattern" />
<xs:simpleType name="PositiveIntegerSimpleTypePattern">
  <xs:restriction base="xs:positiveInteger">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [PositiveIntegerSimpleTypePattern01]:

  <ex:positiveIntegerSimpleTypePattern>123</ex:positiveIntegerSimpleTypePattern>

as is the following element when included in an instance document [PositiveIntegerSimpleTypePattern02]:

  <ex:positiveIntegerSimpleTypePattern>009</ex:positiveIntegerSimpleTypePattern>

2.18.12 UnsignedLongSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedLongSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedLongSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedLongSimpleTypePattern pattern within an [XML Schema 1.0] document [UnsignedLongSimpleTypePattern]:

<xs:element name="unsignedLongSimpleTypePattern" type="ex:UnsignedLongSimpleTypePattern" />
<xs:simpleType name="UnsignedLongSimpleTypePattern">
  <xs:restriction base="xs:unsignedLong">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedLongSimpleTypePattern01]:

  <ex:unsignedLongSimpleTypePattern>123</ex:unsignedLongSimpleTypePattern>

as is the following element when included in an instance document [UnsignedLongSimpleTypePattern02]:

  <ex:unsignedLongSimpleTypePattern>009</ex:unsignedLongSimpleTypePattern>

2.18.13 UnsignedIntSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedIntSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedIntSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedIntSimpleTypePattern pattern within an [XML Schema 1.0] document [UnsignedIntSimpleTypePattern]:

<xs:element name="unsignedIntSimpleTypePattern" type="ex:UnsignedIntSimpleTypePattern" />
<xs:simpleType name="UnsignedIntSimpleTypePattern">
  <xs:restriction base="xs:unsignedInt">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedIntSimpleTypePattern01]:

  <ex:unsignedIntSimpleTypePattern>123</ex:unsignedIntSimpleTypePattern>

as is the following element when included in an instance document [UnsignedIntSimpleTypePattern02]:

  <ex:unsignedIntSimpleTypePattern>009</ex:unsignedIntSimpleTypePattern>

2.18.14 UnsignedShortSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the UnsignedShortSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/UnsignedShortSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the UnsignedShortSimpleTypePattern pattern within an [XML Schema 1.0] document [UnsignedShortSimpleTypePattern]:

<xs:element name="unsignedShortSimpleTypePattern" type="ex:UnsignedShortSimpleTypePattern" />
<xs:simpleType name="UnsignedShortSimpleTypePattern">
  <xs:restriction base="xs:unsignedShort">
    <xs:pattern value="\d{3}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [UnsignedShortSimpleTypePattern01]:

  <ex:unsignedShortSimpleTypePattern>123</ex:unsignedShortSimpleTypePattern>

as is the following element when included in an instance document [UnsignedShortSimpleTypePattern02]:

  <ex:unsignedShortSimpleTypePattern>009</ex:unsignedShortSimpleTypePattern>

2.18.15 DateSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the DateSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/DateSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:date')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the DateSimpleTypePattern pattern within an [XML Schema 1.0] document [DateSimpleTypePattern]:

<xs:element name="dateSimpleTypePattern" type="ex:DateSimpleTypePattern" />
<xs:simpleType name="DateSimpleTypePattern">
  <xs:restriction base="xs:date">
    <xs:pattern value="[^\-]{4}\-[^\-]{2}\-[^\-]{2}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [DateSimpleTypePattern01]:

  <ex:dateSimpleTypePattern>2006-12-18</ex:dateSimpleTypePattern>

as is the following element when included in an instance document [DateSimpleTypePattern02]:

  <ex:dateSimpleTypePattern>2007-01-01</ex:dateSimpleTypePattern>

2.18.16 GYearSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYear')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the GYearSimpleTypePattern pattern within an [XML Schema 1.0] document [GYearSimpleTypePattern]:

<xs:element name="gYearSimpleTypePattern" type="ex:GYearSimpleTypePattern" />
<xs:simpleType name="GYearSimpleTypePattern">
  <xs:restriction base="xs:gYear">
    <xs:pattern value="2008|2009|2010" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearSimpleTypePattern01]:

  <ex:gYearSimpleTypePattern>2009</ex:gYearSimpleTypePattern>

2.18.17 GMonthSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonth')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the GMonthSimpleTypePattern pattern within an [XML Schema 1.0] document [GMonthSimpleTypePattern]:

<xs:element name="gMonthSimpleTypePattern" type="ex:GMonthSimpleTypePattern" />
<xs:simpleType name="GMonthSimpleTypePattern">
  <xs:restriction base="xs:gMonth">
    <xs:pattern value="--10|--11|--12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthSimpleTypePattern01]:

  <ex:gMonthSimpleTypePattern>--11</ex:gMonthSimpleTypePattern>

2.18.18 GDaySimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GDaySimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GDaySimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gDay')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the GDaySimpleTypePattern pattern within an [XML Schema 1.0] document [GDaySimpleTypePattern]:

<xs:element name="gDaySimpleTypePattern" type="ex:GDaySimpleTypePattern" />
<xs:simpleType name="GDaySimpleTypePattern">
  <xs:restriction base="xs:gDay">
    <xs:pattern value="---01|---11|---31" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GDaySimpleTypePattern01]:

  <ex:gDaySimpleTypePattern>---01</ex:gDaySimpleTypePattern>

2.18.19 GYearMonthSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GYearMonthSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GYearMonthSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYearMonth')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the GYearMonthSimpleTypePattern pattern within an [XML Schema 1.0] document [GYearMonthSimpleTypePattern]:

<xs:element name="gYearMonthSimpleTypePattern" type="ex:GYearMonthSimpleTypePattern" />
<xs:simpleType name="GYearMonthSimpleTypePattern">
  <xs:restriction base="xs:gYearMonth">
    <xs:pattern value="2001-12|2002-12|2003-12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GYearMonthSimpleTypePattern01]:

  <ex:gYearMonthSimpleTypePattern>2001-12</ex:gYearMonthSimpleTypePattern>

2.18.20 GMonthDaySimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the GMonthDaySimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/GMonthDaySimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonthDay')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the GMonthDaySimpleTypePattern pattern within an [XML Schema 1.0] document [GMonthDaySimpleTypePattern]:

<xs:element name="gMonthDaySimpleTypePattern" type="ex:GMonthDaySimpleTypePattern" />
<xs:simpleType name="GMonthDaySimpleTypePattern">
  <xs:restriction base="xs:gMonthDay">
    <xs:pattern value="--12-01|--11-01|--10-01" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [GMonthDaySimpleTypePattern01]:

  <ex:gMonthDaySimpleTypePattern>--12-01</ex:gMonthDaySimpleTypePattern>

2.18.21 TokenSimpleTypePattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the TokenSimpleTypePattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/TokenSimpleTypePattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token')]/xs:pattern[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the TokenSimpleTypePattern pattern within an [XML Schema 1.0] document [TokenSimpleTypePattern]:

<xs:element name="tokenSimpleTypePattern" type="ex:TokenSimpleTypePattern" />
<xs:simpleType name="TokenSimpleTypePattern">
  <xs:restriction base="xs:token">
    <xs:pattern value="1" />
    <xs:pattern value="2" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [TokenSimpleTypePattern01]:

  <ex:tokenSimpleTypePattern>1</ex:tokenSimpleTypePattern>

2.18.22 RestrictedStringMinLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedStringMinLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedStringMinLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:minLength[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedStringMinLength pattern within an [XML Schema 1.0] document [RestrictedStringMinLength]:

<xs:element name="restrictedStringMinLength" type="ex:RestrictedStringMinLength" />
<xs:simpleType name="RestrictedStringMinLength">
  <xs:restriction base="xs:string">
    <xs:minLength value="1" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedStringMinLength01]:

  <ex:restrictedStringMinLength>String Value</ex:restrictedStringMinLength>

2.18.23 RestrictedStringMaxLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedStringMaxLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedStringMaxLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:maxLength[@value]/ (.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedStringMaxLength pattern within an [XML Schema 1.0] document [RestrictedStringMaxLength]:

<xs:element name="restrictedStringMaxLength" type="ex:RestrictedStringMaxLength" />
<xs:simpleType name="RestrictedStringMaxLength">
  <xs:restriction base="xs:string">
    <xs:maxLength value="12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedStringMaxLength01]:

  <ex:restrictedStringMaxLength>String Value</ex:restrictedStringMaxLength>

2.18.24 RestrictedStringMinMaxLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedStringMinMaxLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedStringMinMaxLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') and xs:minLength/@value and xs:maxLength/@value]/ (., @base, xs:minLength/(., @value), xs:maxLength/(., @value))

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedStringMinMaxLength pattern within an [XML Schema 1.0] document [RestrictedStringMinMaxLength]:

<xs:element name="restrictedStringMinMaxLength" type="ex:RestrictedStringMinMaxLength" />
<xs:simpleType name="RestrictedStringMinMaxLength">
  <xs:restriction base="xs:string">
    <xs:minLength value="12" />
    <xs:maxLength value="15" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedStringMinMaxLength01]:

  <ex:restrictedStringMinMaxLength>String Value 2</ex:restrictedStringMinMaxLength>

2.18.25 SimpleTypeRenamed

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SimpleTypeRenamed pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SimpleTypeRenamed when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction[@base and count(./*) = 0]/ (., @base)

The following example [XML Schema 1.0] extract illustrates the use of the SimpleTypeRenamed pattern within an [XML Schema 1.0] document [SimpleTypeRenamed]:

<xs:element name="simpleTypeRenamed" type="ex:SimpleTypeRenamed" />
<xs:simpleType name="SimpleTypeRenamed">
  <xs:restriction base="xs:string" />
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SimpleTypeRenamed01]:

  <ex:simpleTypeRenamed>String</ex:simpleTypeRenamed>

2.18.26 RestrictedMinInclusive

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMinInclusive pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMinInclusive when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:minInclusive[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMinInclusive pattern within an [XML Schema 1.0] document [RestrictedMinInclusive]:

<xs:element name="restrictedMinInclusive" type="ex:RestrictedMinInclusive" />
<xs:simpleType name="RestrictedMinInclusive">
  <xs:restriction base="xs:integer">
    <xs:minInclusive value="1" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMinInclusive01]:

  <ex:restrictedMinInclusive>1</ex:restrictedMinInclusive>

as is the following element when included in an instance document [RestrictedMinInclusive02]:

  <ex:restrictedMinInclusive>2</ex:restrictedMinInclusive>

2.18.27 RestrictedMaxInclusive

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMaxInclusive pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMaxInclusive when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:maxInclusive[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMaxInclusive pattern within an [XML Schema 1.0] document [RestrictedMaxInclusive]:

<xs:element name="restrictedMaxInclusive" type="ex:RestrictedMaxInclusive" />
<xs:simpleType name="RestrictedMaxInclusive">
  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="3" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMaxInclusive01]:

  <ex:restrictedMaxInclusive>1</ex:restrictedMaxInclusive>

as is the following element when included in an instance document [RestrictedMaxInclusive02]:

  <ex:restrictedMaxInclusive>3</ex:restrictedMaxInclusive>

2.18.28 RestrictedMinExclusive

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMinExclusive pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMinExclusive when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:minExclusive[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMinExclusive pattern within an [XML Schema 1.0] document [RestrictedMinExclusive]:

<xs:element name="restrictedMinExclusive" type="ex:RestrictedMinExclusive" />
<xs:simpleType name="RestrictedMinExclusive">
  <xs:restriction base="xs:integer">
    <xs:minExclusive value="1" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMinExclusive01]:

  <ex:restrictedMinExclusive>2</ex:restrictedMinExclusive>

as is the following element when included in an instance document [RestrictedMinExclusive02]:

  <ex:restrictedMinExclusive>3</ex:restrictedMinExclusive>

2.18.29 RestrictedMaxExclusive

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMaxExclusive pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMaxExclusive when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:maxExclusive[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMaxExclusive pattern within an [XML Schema 1.0] document [RestrictedMaxExclusive]:

<xs:element name="restrictedMaxExclusive" type="ex:RestrictedMaxExclusive" />
<xs:simpleType name="RestrictedMaxExclusive">
  <xs:restriction base="xs:integer">
    <xs:maxExclusive value="3" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMaxExclusive01]:

  <ex:restrictedMaxExclusive>1</ex:restrictedMaxExclusive>

as is the following element when included in an instance document [RestrictedMaxExclusive02]:

  <ex:restrictedMaxExclusive>2</ex:restrictedMaxExclusive>

2.18.30 RestrictedLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:length[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedLength pattern within an [XML Schema 1.0] document [RestrictedLength]:

<xs:element name="restrictedLength" type="ex:RestrictedLength" />
<xs:simpleType name="RestrictedLength">
  <xs:restriction base="xs:language">
    <xs:length value="2" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedLength01]:

  <ex:restrictedLength>en</ex:restrictedLength>

as is the following element when included in an instance document [RestrictedLength02]:

  <ex:restrictedLength>FR</ex:restrictedLength>

2.18.31 RestrictedMaxLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMaxLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMaxLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:maxLength[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMaxLength pattern within an [XML Schema 1.0] document [RestrictedMaxLength]:

<xs:element name="restrictedMaxLength" type="ex:RestrictedMaxLength" />
<xs:simpleType name="RestrictedMaxLength">
  <xs:restriction base="xs:string">
    <xs:maxLength value="12" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMaxLength01]:

  <ex:restrictedMaxLength>AUSTRALIA</ex:restrictedMaxLength>

as is the following element when included in an instance document [RestrictedMaxLength02]:

  <ex:restrictedMaxLength>N AMERICA</ex:restrictedMaxLength>

2.18.32 RestrictedMinLength

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedMinLength pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedMinLength when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:minLength[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedMinLength pattern within an [XML Schema 1.0] document [RestrictedMinLength]:

<xs:element name="restrictedMinLength" type="ex:RestrictedMinLength" />
<xs:simpleType name="RestrictedMinLength">
  <xs:restriction base="xs:string">
    <xs:minLength value="2" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedMinLength01]:

  <ex:restrictedMinLength>AUS</ex:restrictedMinLength>

as is the following element when included in an instance document [RestrictedMinLength02]:

  <ex:restrictedMinLength>GB</ex:restrictedMinLength>

2.18.33 RestrictedPattern

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedPattern pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedPattern when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:pattern[@value]/(.., ../@base, ., @value)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedPattern pattern within an [XML Schema 1.0] document [RestrictedPattern]:

<xs:element name="restrictedPattern" type="ex:RestrictedPattern" />
<xs:simpleType name="RestrictedPattern">
  <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="6" />
    <xs:pattern value="[0-9]{1,6}" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedPattern01]:

  <ex:restrictedPattern>123456</ex:restrictedPattern>

as is the following element when included in an instance document [RestrictedPattern02]:

  <ex:restrictedPattern>1234</ex:restrictedPattern>

2.18.34 RestrictedWhitespacePreserve

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedWhitespacePreserve pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedWhitespacePreserve when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='preserve']/(.., ../@base, ., @value, @fixed)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedWhitespacePreserve pattern within an [XML Schema 1.0] document [RestrictedWhitespacePreserve]:

<xs:element name="restrictedWhitespacePreserve" type="ex:RestrictedWhitespacePreserve" />
<xs:simpleType name="RestrictedWhitespacePreserve">
  <xs:restriction base="xs:string">
    <xs:whiteSpace value="preserve" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedWhitespacePreserve01]:

  <ex:restrictedWhitespacePreserve>restricted  whitespace  preserve</ex:restrictedWhitespacePreserve>

2.18.35 RestrictedWhitespaceCollapse

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedWhitespaceCollapse pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedWhitespaceCollapse when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='collapse']/(.., ../@base, ., @value, @fixed)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedWhitespaceCollapse pattern within an [XML Schema 1.0] document [RestrictedWhitespaceCollapse]:

<xs:element name="restrictedWhitespaceCollapse" type="ex:RestrictedWhitespaceCollapse" />
<xs:simpleType name="RestrictedWhitespaceCollapse">
  <xs:restriction base="xs:string">
    <xs:whiteSpace value="collapse" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedWhitespaceCollapse01]:

  <ex:restrictedWhitespaceCollapse>restricted  whitespace  collapse</ex:restrictedWhitespaceCollapse>

2.18.36 RestrictedWhitespaceReplace

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the RestrictedWhitespaceReplace pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/RestrictedWhitespaceReplace when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='replace']/(.., ../@base, ., @value, @fixed)

The following example [XML Schema 1.0] extract illustrates the use of the RestrictedWhitespaceReplace pattern within an [XML Schema 1.0] document [RestrictedWhitespaceReplace]:

<xs:element name="restrictedWhitespaceReplace" type="ex:RestrictedWhitespaceReplace" />
<xs:simpleType name="RestrictedWhitespaceReplace">
  <xs:restriction base="xs:string">
    <xs:whiteSpace value="replace" />
  </xs:restriction>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [RestrictedWhitespaceReplace01]:

  <ex:restrictedWhitespaceReplace>restricted  whitespace  replace</ex:restrictedWhitespaceReplace>

2.19 Numbers

2.19.1 PrecisionDecimal

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the PrecisionDecimal pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/PrecisionDecimal when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:simpleType/xs:union[ xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:totalDigits[@value ='16'] and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')] and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') and xs:enumeration/@value='NaN' and xs:enumeration/@value='-INF' and not(xs:enumeration[3])] and not(xs:simpleType[4] | xs:simpleType[@*]) ]/(., xs:simpleType/(., xs:restriction/(., @base, xs:totalDigits/(., @value), xs:enumeration/(., @value))))

The following example [XML Schema 1.0] extract illustrates the use of the PrecisionDecimal pattern within an [XML Schema 1.0] document [PrecisionDecimal]:

<xs:element name="precisionDecimal" type="ex:PrecisionDecimal" />
<xs:simpleType name="PrecisionDecimal">
  <xs:union>
    <xs:simpleType>
      <xs:restriction base="xs:decimal">
        <xs:totalDigits value="16" />
      </xs:restriction>
    </xs:simpleType>
    <xs:simpleType>
      <xs:restriction base="xs:double" />
    </xs:simpleType>
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="NaN" />
        <xs:enumeration value="-INF" />
      </xs:restriction>
    </xs:simpleType>
  </xs:union>
</xs:simpleType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [PrecisionDecimal01]:

  <ex:precisionDecimal>1000.20</ex:precisionDecimal>

as is the following element when included in an instance document [PrecisionDecimal02]:

  <ex:precisionDecimal>NaN</ex:precisionDecimal>

and the following element when included in an instance document [PrecisionDecimal03]:

  <ex:precisionDecimal>-INF</ex:precisionDecimal>

2.20 Group

2.20.1 AttributeGroup

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeGroup pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeGroup when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attributeGroup/(.,@name,@ref,xs:attribute)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeGroup pattern within an [XML Schema 1.0] document [AttributeGroup]:

<xs:element name="attributeGroup" type="ex:AttributeGroup" />
<xs:complexType name="AttributeGroup">
  <xs:sequence>
    <xs:element name="contract" type="xs:string" />
  </xs:sequence>
  <xs:attributeGroup ref="ex:CommonAttributes" />
</xs:complexType>
<xs:attributeGroup name="CommonAttributes">
  <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" />
</xs:attributeGroup>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeGroup01]:

  <ex:attributeGroup id="AttributeGroup_contract_001">
      <ex:contract>12345678910</ex:contract>
   </ex:attributeGroup>

as is the following element when included in an instance document [AttributeGroup02]:

  <ex:attributeGroup>
      <ex:contract>9876543210</ex:contract>
   </ex:attributeGroup>

2.20.2 SubstitutionGroup

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the SubstitutionGroup pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/SubstitutionGroup when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element[@substitutionGroup]/(.,@name,@substitutionGroup)

The following example [XML Schema 1.0] extract illustrates the use of the SubstitutionGroup pattern within an [XML Schema 1.0] document [SubstitutionGroup]:

<xs:element name="substitutionGroup" type="xs:string" />
<xs:element name="substitutionElement"  substitutionGroup="ex:substitutionGroup" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [SubstitutionGroup01]:

  <ex:substitutionElement>String</ex:substitutionElement>

as is the following element when included in an instance document [SubstitutionGroup02]:

  <ex:substitutionGroup>String</ex:substitutionGroup>

2.20.3 ElementGroup

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the ElementGroup pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementGroup when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:group/(.,@name,@ref,@minOccurs,@maxOccurs,xs:sequence,xs:all,xs:choice)

The following example [XML Schema 1.0] extract illustrates the use of the ElementGroup pattern within an [XML Schema 1.0] document [ElementGroup]:

<xs:element name="elementGroup" type="ex:ElementGroup" />
<xs:complexType name="ElementGroup">
  <xs:sequence>
    <xs:group ref="ex:ElementGroupGroup" />
  </xs:sequence>
</xs:complexType>
<xs:group name="ElementGroupGroup">
  <xs:sequence>
    <xs:element name="value1" type="xs:string" />
    <xs:element name="value2" type="xs:string" />
  </xs:sequence>
</xs:group>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [ElementGroup01]:

  <ex:elementGroup>
      <ex:value1>foo</ex:value1>
      <ex:value2>bar</ex:value2>
   </ex:elementGroup>

2.20.4 AttributeGroupAnyAttribute

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the AttributeGroupAnyAttribute pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/AttributeGroupAnyAttribute when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:attributeGroup/xs:anyAttribute/(.,@namespace,@processContents)

The following example [XML Schema 1.0] extract illustrates the use of the AttributeGroupAnyAttribute pattern within an [XML Schema 1.0] document [AttributeGroupAnyAttribute]:

<xs:element name="attributeGroupAnyAttribute" type="ex:AttributeGroupAnyAttribute" />
<xs:complexType name="AttributeGroupAnyAttribute">
  <xs:attributeGroup ref="ex:CommonAttributes" />
</xs:complexType>
<xs:attributeGroup name="CommonAttributes">
  <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" />
  <xs:anyAttribute processContents="skip" />
</xs:attributeGroup>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [AttributeGroupAnyAttribute01]:

  <ex:attributeGroupAnyAttribute id="id1" ex:anyattr="value1"/>

2.21 Redefines

2.21.1 Redefine

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the Redefine pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/Redefine when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:redefine[@schemaLocation] / (., @schemaLocation, child::*, child::*/@name, child::*/@base)

The following example [XML Schema 1.0] extract illustrates the use of the Redefine pattern within an [XML Schema 1.0] document [Redefine]:

<xs:redefine schemaLocation="../redefineschema.xsd">
  <xs:complexType name="RedefineType">
    <xs:complexContent>
      <xs:extension base="ex:RedefineType">
        <xs:sequence>
          <xs:element name="element3" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:redefine>
<xs:element name="redefined" type="ex:RedefineType" />
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [Redefine01]:

  <ex:redefined>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
      <ex:element3>value3</ex:element3>
   </ex:redefined>

2.22 Unique

2.22.1 Unique

An [XML Schema 1.0], or other [XML 1.0] document containing an [XML Schema 1.0] element <xs:schema>, exhibits the Unique pattern identified using the URI [RFC 3986] http://www.w3.org/2002/ws/databinding/patterns/6/09/Unique when the following [XPath 2.0] expression applied to a document or element node with a context node of //xs:schema results in an [XPath 2.0] node-set containing at least one node:

.//xs:element/xs:unique/(.., .,xs:selector,xs:selector/@xpath,xs:field,xs:field/@xpath)

The following example [XML Schema 1.0] extract illustrates the use of the Unique pattern within an [XML Schema 1.0] document [Unique]:

<xs:element name="unique" type="ex:Unique">
  <xs:unique name="nameUniqueness">
    <xs:selector xpath="ex:character" />
    <xs:field xpath="ex:name" />
  </xs:unique>
</xs:element>
<xs:complexType name="Unique">
  <xs:sequence>
    <xs:element name="character" maxOccurs="unbounded">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
          <xs:element name="age" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:sequence>
</xs:complexType>
    

The following example [XML 1.0] element is valid against the above example [XML Schema 1.0] when included inside an instance document [Unique01]:

  <ex:unique>
      <ex:character>
         <ex:name>String</ex:name>
         <ex:age>String</ex:age>
      </ex:character>
   </ex:unique>

3. Data Types & Structures

This section offers one or more patterns which may be used to represent an abstract data structure. Each data structure presented is intended to be independent of any particular programming language, database or modeling environment. No semantics are implied by the order in which patterns are listed for a given abstract data structure.

3.1 Default Value

Definition
A preselected value used by when no alternative is explicitly specified.
Patterns

3.2 Map

Editorial note: pdowney 2006-10-25
ISSUE-25: need to incorporate examples for Hash tables and maps

3.3 Extensible Enumeration

Editorial note: pdowney 2006-10-25
ISSUE-5: need to incorporate extensible enum examples

4. References

4.1 Normative References

[Basic Patterns]
XML Schema Patterns for Databinding 1.0, Jonathan Calladine, George Cowe, Paul Downey, Yves Lafon, Editors. World Wide Web Consortium, May, 2009. The latest version of Basic Patterns is available at http://www.w3.org/TR/xmlschema-patterns/. (See http://www.w3.org/TR/2009/NOTE-xmlschema-patterns-20090505/.)
[XML Schema 1.0]
Henry S. Thompson, David Beech, Murray Maloney, and Noah Mendelsohn, Editors. World Wide Web Consortium. XML Schema, Parts 0, 1, and 2 (Second Edition). W3C Recommendation, 28 October 2004. See http://www.w3.org/TR/xmlschema-0/, http://www.w3.org/TR/xmlschema-1/, and http://www.w3.org/TR/xmlschema-2/.
[XPath 2.0]
XML Path Language (XPath) 2.0, Don Chamberlin , Anders Berglund, Scott Boag, et. al., Editors. World Wide Web Consortium, 3 Nov 2005. The latest version is available at http://www.w3.org/TR/xpath20/. (See http://www.w3.org/TR/2006/CR-xpath20-20060608/.)
[XML Namespaces]
Namespaces in XML, T. Bray, D. Hollander, and A. Layman, Editors. World Wide Web Consortium, 14 January 1999. The latest version is available at http://www.w3.org/TR/REC-xml-names. (See http://www.w3.org/TR/1999/REC-xml-names-19990114.)
[XML 1.0]
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. (Fourth Edition) W3C Recommendation, 16 August 2006. See http://www.w3.org/TR/REC-xml
[RFC 2119]
Key words for use in RFCs to Indicate Requirement Levels, S. Bradner, Editor. IETF, March 1997. (See http://www.ietf.org/rfc/rfc2119.txt.)
[RFC 3986]
Uniform Resource Identifiers (URI): Generic Syntax, T. Berners-Lee, R. Fielding, L. Masinter, Authors. Internet Engineering Task Force, January 2005. (See http://www.ietf.org/rfc/rfc3986.txt.)
[Unicode]
The Unicode Consortium. The Unicode Standard, Version 4.0. Reading, Mass.: Addison-Wesley, 2003, as updated from time to time by the publication of new versions. (See http://www.unicode.org/unicode/standard/versions for the latest version and additional information on versions of the standard and of the Unicode Character Database)

4.2 Informative References

[WSDL 2.0]
Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language, R. Chinnici, J. J. Moreau, A. Ryman, S. Weerawarana, Editors. World Wide Web Consortium, 6 January 2006. The latest version is available at http://www.w3.org/TR/wsdl20. (See http://www.w3.org/TR/2006/CR-wsdl20-20060106/.)
[WSDL 1.1]
E. Christensen, et al, Web Services Description Language (WSDL) 1.1, March 2001. (See http://www.w3.org/TR/2001/NOTE-wsdl-20010315.)
[SOAP 1.2]
SOAP Version 1.2 Part 1: Messaging Framework, M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. Frystyk Nielsen, Editors. World Wide Web Consortium, 24 June 2003. The latest version is available at http://www.w3.org/TR/soap12-part1/. (See http://www.w3.org/TR/2003/REC-soap12-part1-20030624/.)
[SOAP 1.1]
Simple Object Access Protocol (SOAP) 1.1, D. Box, D. Ehnebuske, G. Kakivaya, A. Layman, N. Mendelsohn, H Frystyk Nielsen, S. Thatte, D. Winer, Editors. W3C Member Submission, 8 May 2000. (See http://www.w3.org/TR/2000/NOTE-SOAP-20000508/.)
[XSLT 2.0]
XSL Transformations (XSLT) Version 2.0, M. Kay, Editor. World Wide Web Consortium, 8 June 2006. The latest version is available at http://www.w3.org/TR/xslt20. (See http://www.w3.org/TR/2006/CR-xslt20-20060608/.)
[WS-I Basic Profile 1.1]
WS-I Basic Profile 1.1, Web Services Interoperability Organization, April 2004 The latest version and errata is available from http://www.ws-i.org/Profiles/BasicProfile-1.1.html. (See http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html.)
[X.694]
Information technology - ASN.1 encoding rules: Mapping W3C XML schema definitions into ASN.1, International Telecommunications Union Recommendation. X.694 January 2004. (See http://www.itu.int/ITU-T/studygroups/com17/languages/X694.pdf.)
[Schematron]
ISO/IEC 19757-3:2006, Information technology - Document Schema Definition Languages (DSDL) - Part 3: Rule-based validation - International Standards Organization (JTC1/SC34) - Schematron. (See http://standards.iso.org/ittf/PubliclyAvailableStandards/c040833_ISO_IEC_19757-3_2006%28E%29.zip.)
[BOM]
Unicode Frequently Asked Questions (See http://www.unicode.org/unicode/faq/utf_bom.html#BOM.)
[BCP 47]
Best Current Practice Tags for Identifying Languages, A. Phillips, M. Davis, Authors. The Internet Society, September 2006. (See http://www.rfc-editor.org/rfc/bcp/bcp47.txt.)
[Timezone]
Working with Time Zones, Addison Phillips, Felix Sasaki, Mark Davis, Martin Dürst, Editors. World Wide Web Consortium, 13 October 2005. The latest version is available at http://www.w3.org/TR/timezone/. (See http://www.w3.org/TR/2005/NOTE-timezone-20051013/.)

A. Detecting Patterns (Non-Normative)

The patterns defined by this specification may be detected in a description such as an [XML Schema 1.0], [WSDL 2.0] or [WSDL 1.1] document using an [XPath 2.0] processor. The following example illustrates detecting a pattern using an [XSLT 2.0] stylesheet:

<xsl:stylesheet version="2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:ex="http://www.w3.org/2002/ws/databinding/examples/6/09/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/">

    <xsl:output method="text" />

    <xsl:template match="/">
        <xsl:apply-templates select="//xs:schema" mode="detect"/>
    </xsl:template>

    <xsl:template match="*" mode="detect">
        <xsl:if test="count(.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]) gt 0">
            http://www.w3.org/2002/ws/databinding/patterns/6/09/StringElement
        </xsl:if>

        <!-- tests to detect other patterns .. -->

    </xsl:template>

    <xsl:template match="text()"/>
</xsl:stylesheet> 

Similarly a [Schematron] schema may be assembled from this specification and used in conjunction with a processor which supports [XPath 2.0] as follows:

<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
    <sch:ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"></sch:ns>
    <sch:pattern name="Basic">
        <sch:rule>
            <sch:report 
            test="count(.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]) gt 0">
                http://www.w3.org/2002/ws/databinding/patterns/6/09/StringElement
            </sch:report>
        </sch:rule>

        <!-- reports to detect other patterns .. -->

    </sch:pattern>
</sch:schema>

The [XPath 2.0] for each [XML Schema 1.0] pattern is constructed to return a set containing all of the Element and Attribute nodes covered by an individual pattern. Elements and attributes contained within a [XML Schema 1.0] document not covered by a set of patterns may be detected using an [XPath2.0] expression as in the following [XSLT 2.0] extract:

  <xsl:if select="(.//* | .//@*)   except
        ( @targetNamespace
            | .//xs:element[resolve-QName(@type,.) = xs:QName('xs:string')]/(@type)
            | .. other pattern XPaths ..
        )"> 
            unexpected elements or attributes detected
        </xsl:if>         
            

B. XPath 2.0 Idioms (Non-Normative)

The following [XPath2.0] examples are intended to illustrate the idiomatic use of [XPath2.0] by this specification when defining [XML Schema 1.0] patterns.

Table B. XPath 2.0 Idioms
XPath 2.0 Sample Description
./(@elementFormDefault) returns the elementFormDefault attribute of the xs:schema element
.[@elementFormDefault='qualified']/(@elementFormDefault) returns the elementFormDefault attribute of the xs:schema element, where the contents of the elementFormDefault attribute is the string 'qualified'.
.//.[@mixed = 'false']/(@mixed) returns the set of mixed attributes contained on any element found beneath the xs:schema element, where the contents of the mixed attribute is the string value 'false'.
.//xs:element[not(parent::xs:schema)]/xs:complexType returns the xs:complexType element where the parent node is not the element xs:schema.
.//xs:annotation/xs:documentation/ (.., ., .//*, .//@*) returns the parent node, the current node, all descendant elements and all descendant attributes for all xs:documentation elements.
.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')] returns the type attribute where the QName value of the type attribute is a local part string in the namespace found by resolving the prefix xs in 1.2 Namespaces, i.e 'http://www.w3.org/2001/XMLSchema'.
.//xs:element[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and contains(@type, ':')]/ (., @name, @type) returns the xs:element, name and type attributes where the string value of the type attribute contains a ':' character, and the resultant QName value is not the [XML 1.0] datatypes namespace, i.e. an explicitly qualified datatype in the ##targetNamespace or ##other namespace.
./xs:import[@namespace and not(@schemaLocation) and not(@namespace = 'http://www.w3.org/2001/XMLSchema')]/ (., @namespace) returns the xs:import element and namespace attribute for an xs:import element with an absent schemaLocation attribute or one matching the [XML Schema 1.0] datatypes namespace.
.//xs:element[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/ (@minOccurs, @maxOccurs) returns the minOccurs and maxOccurs attributes for an xs:element element where the minOccurs attribute has a string value of '0' and the maxOccurs attribute is absent or has a string value of '1'.
.//xs:sequence[count(xs:element) = 1]/xs:element[@maxOccurs = 'unbounded']/ (., @maxOccurs) returns the xs:element element and maxOccurs attribute where a sequence has a single xs:element element that is defined with maxOccurs attribute string value of 'unbounded'.
.//xs:element[@name]/xs:complexType[not(node())]/(., .., ../@name) returns the xs:complexType and xs:element element, and the xs:element name attribute where the complexType does not have any child nodes.

C. Pattern Summary (Non-Normative)

Table C-1. Summary of Patterns
Id Pattern
pattern-AllElement .//xs:all/xs:element/(.)
pattern-AnyAttributeLax .//xs:complexType/xs:anyAttribute[(@processContents = 'lax') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)
pattern-AnyAttributeNamespacedFinite .//xs:complexType/xs:anyAttribute[@processContents and @namespace and (not (@namespace = '##targetNamespace')) and (not (@namespace = '##any')) and (not (@namespace = '##local')) and (not (@namespace = '##other'))]/ (., @processContents, @namespace)
pattern-AnyAttributeOtherLax .//xs:complexType/xs:anyAttribute[(@processContents = 'lax') and (@namespace = '##other')]/ (., @processContents, @namespace)
pattern-AnyAttributeOtherSkip .//xs:complexType/xs:anyAttribute[(@processContents = 'skip') and (@namespace = '##other')]/ (., @processContents, @namespace)
pattern-AnyAttributeOtherStrict .//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict') and (@namespace = '##other')]/ (., @processContents, @namespace)
pattern-AnyAttributeSkip .//xs:complexType/xs:anyAttribute[(@processContents = 'skip') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)
pattern-AnyAttributeStrict .//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @namespace)
pattern-AnySimpleTypeAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]
pattern-AnySimpleTypeElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]
pattern-AnyTypeElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyType')]
pattern-AnyURIEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:anyURI') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-AppinfoElement .//xs:annotation/xs:appinfo/ (.., ., .//*, .//@*)
pattern-AttributeDefault .//xs:attribute[@default] / (@default)
pattern-AttributeElementNameClash .//xs:complexType/xs:sequence/xs:element[@name = ../../xs:attribute/@name]/ (@name)
pattern-AttributeFixed .//xs:attribute[@fixed] / (@fixed)
pattern-AttributeFormQualified .//xs:attribute[@form='qualified']/ (@form)
pattern-AttributeGroup .//xs:attributeGroup/(.,@name,@ref,xs:attribute)
pattern-AttributeGroupAnyAttribute .//xs:attributeGroup/xs:anyAttribute/(.,@namespace,@processContents)
pattern-AttributeProhibited .//xs:attribute[@use = 'prohibited']/ (@use)
pattern-AttributeReferenceUnqualified .//xs:attribute[@ref and not(contains(@ref, ':'))]/ (., @ref)
pattern-AttributeRequired .//xs:attribute[@use = 'required']/ (@use)
pattern-AttributeTypeReferenceUnqualified .//xs:attribute[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)
pattern-Base64BinaryAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]
pattern-BlockDefault ./@blockDefault
pattern-ByteSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:byte')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-ChoiceChoice .//xs:choice/xs:choice/(.)
pattern-ChoiceElement .//xs:choice/xs:element/(.)
pattern-ChoiceMaxOccursFinite .//xs:choice[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@maxOccurs)
pattern-ChoiceMaxOccursUnbounded .//xs:choice[@maxOccurs = 'unbounded']/ (@maxOccurs)
pattern-ChoiceMinOccurs0 .//xs:choice[@minOccurs='0']/ (@minOccurs)
pattern-ChoiceMinOccursFinite .//xs:choice[@minOccurs and not(@minOccurs = '0' or @minOccurs = '1')]/ (@minOccurs)
pattern-ChoiceSequence .//xs:choice/xs:sequence/(.)
pattern-ComplexContentExtensionAnyAttribute .//xs:complexType/xs:complexContent/xs:extension/xs:anyAttribute/(., @namespace, @processContents)
pattern-ComplexContentRestrictionAnyAttribute .//xs:complexType/xs:complexContent/xs:restriction/xs:anyAttribute/(., @namespace, @processContents)
pattern-ComplexTypeAll .//xs:complexType/xs:all/ (., xs:element/(., @name))
pattern-ComplexTypeAnyAttribute .//xs:complexType/xs:anyAttribute
pattern-ComplexTypeAttributeGroupExtension .//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attributeGroup]/ (., xs:extension/ (., @base, xs:attributeGroup))
pattern-ComplexTypeAttributeRestriction .//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:attribute]/ (., xs:restriction/(., @base, xs:attribute/(., @name)))
pattern-ComplexTypeChoice .//xs:complexType/xs:choice/ (., xs:element/(., @name))
pattern-ComplexTypeChoiceAny .//xs:complexType/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)
pattern-ComplexTypeChoiceExtension .//xs:complexType/xs:complexContent[xs:extension[@base]/xs:choice]/ (., xs:extension/ (., @base, xs:choice/(., xs:element/(., @name))))
pattern-ComplexTypeExtensionAnnotationOnly .//xs:complexType/xs:complexContent/xs:extension[@base]/xs:annotation[not(preceding-sibling::*) and not(following-sibling::*)]/ (../(., @base), ../../(.))
pattern-ComplexTypeFinal .//xs:complexType[@final]/(., @final)
pattern-ComplexTypeOnlyAttributeGroup .//xs:complexType/xs:attributeGroup[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group or xs:simpleContent or xs:complexContent)]/(., ..,@ref)
pattern-ComplexTypeOnlyAttributes .//xs:complexType/xs:attribute[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group or xs:attributeGroup or xs:simpleContent or xs:complexContent)]/ (., ..,@use)
pattern-ComplexTypeSequenceChoice .//xs:complexType/xs:sequence/xs:choice/ (., xs:element/(., @name))
pattern-ComplexTypeSequenceChoiceAny .//xs:complexType/xs:sequence/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)
pattern-ComplexTypeSequenceRestriction .//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:sequence]/ (., xs:restriction/(., @base, xs:sequence))
pattern-DateAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:date')]
pattern-DateElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:date')]
pattern-DateSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:date')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-DecimalAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]
pattern-DecimalElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]
pattern-DecimalEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-DecimalSimpleTypeFractionDigits .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:fractionDigits/@value]/ (., @base, xs:fractionDigits/(., @value))
pattern-DecimalSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-DecimalSimpleTypeTotalDigits .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:totalDigits/@value]/ (., @base, xs:totalDigits/(., @value))
pattern-DoubleEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-DoubleSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-DurationAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:duration')]
pattern-DurationElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:duration')]
pattern-ENTITIESAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]
pattern-ENTITIESElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]
pattern-ENTITYAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]
pattern-ENTITYElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]
pattern-ElementDefault .//xs:element/ (@default)
pattern-ElementDefaultAnyType .//xs:element[@name and not(@type) and ./not(xs:simpleType or xs:complexType or xs:unique or xs:key or xs:keyref)]/(.)
pattern-ElementFixed .//xs:element[@fixed] / (@fixed)
pattern-ElementFormUnqualified .//xs:element[@form='unqualified']/ (@form)
pattern-ElementGroup .//xs:group/(.,@name,@ref,@minOccurs,@maxOccurs,xs:sequence,xs:all,xs:choice)
pattern-ElementKey .//xs:element/xs:key[xs:selector and xs:field]/(., xs:selector, xs:selector/(@xpath), xs:field, xs:field/(@xpath))
pattern-ElementMaxOccursFinite .//xs:element[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@maxOccurs)
pattern-ElementMinOccurs0MaxOccursFinite .//xs:element[@minOccurs = '0' and @maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/ (@minOccurs, @maxOccurs)
pattern-ElementMinOccursFinite .//xs:element[xs:integer(@minOccurs) gt 1]/ (@minOccurs, @maxOccurs)
pattern-ElementReferenceUnqualified .//xs:element[@ref and not(contains(@ref, ':'))]/ (., @ref)
pattern-ElementTypeDefaultNamespace .//xs:element[@name and @type and not(contains(@type, ':'))]/ (@name, @type)
pattern-ElementTypeReferenceUnqualified .//xs:element[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)
pattern-ExtendedSequenceLax .//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceLaxAny .//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceLaxOther .//xs:sequence/xs:any[@processContents = 'lax' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceNamespacedFinite .//xs:sequence/xs:any[@processContents and @namespace and @maxOccurs and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs = '1') ) and (not (@maxOccurs='unbounded')) and (not (@namespace = '##targetNamespace')) and (not (@namespace = '##any')) and (not (@namespace = '##local')) and (not (@namespace = '##other'))]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceSkip .//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceSkipAny .//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceSkipOther .//xs:sequence/xs:any[@processContents = 'skip' and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceStrict .//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##targetNamespace']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceStrictAny .//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and (not(@namespace) or @namespace = '##any')]/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSequenceStrictOther .//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict') and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0') and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded') and @namespace = '##other']/ (., @processContents, @minOccurs, @maxOccurs, @namespace)
pattern-ExtendedSimpleContent .//xs:complexType/xs:simpleContent/xs:extension[@base]/ (.., ., ./@base, xs:attribute/ (., @name))
pattern-FinalDefault ./@finalDefault
pattern-FloatAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:float')]
pattern-FloatElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:float')]
pattern-FloatEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-FloatSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GDayAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]
pattern-GDayElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]
pattern-GDaySimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gDay')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GMonthAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]
pattern-GMonthDayAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]
pattern-GMonthDayElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]
pattern-GMonthDaySimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonthDay')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GMonthElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]
pattern-GMonthSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonth')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GYearAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]
pattern-GYearElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]
pattern-GYearMonthAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]
pattern-GYearMonthElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]
pattern-GYearMonthSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYearMonth')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GYearSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYear')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-GlobalAttributeSimpleType ./xs:attribute/xs:simpleType/(../(., @name), .., ., descendant::*, descendant::*/@value, descendant::*/@base)
pattern-GlobalAttributeUnqualifiedType ./xs:attribute[@name and @type and not(contains(@type, ':'))]/ (., @name, @type)
pattern-GlobalComplexTypeAbstract ./xs:complexType[@abstract='true']/ (@abstract)
pattern-GlobalComplexTypeBlock ./xs:complexType/ (@block)
pattern-GlobalComplexTypeEmptyExtension ./xs:complexType[@name]/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))
pattern-GlobalElementAbstract ./xs:element[@abstract='true']/ (@abstract)
pattern-GlobalElementAll ./xs:element[@name]/xs:complexType/xs:all[xs:element]/ (../../(., @name), .., ., xs:element/(., @name))
pattern-GlobalElementBlock ./xs:element/ (@block)
pattern-GlobalElementChoice ./xs:element[@name]/xs:complexType/xs:choice[xs:element]/ (../../(., @name), .., ., xs:element/(., @name))
pattern-GlobalElementComplexTypeEmptyExtension ./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))
pattern-GlobalElementComplexTypeSequenceExtension ./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/ (../../(., @name), .., ., xs:extension/(., @base, xs:sequence/(., xs:element/(., @name), xs:attribute/(., @name))))
pattern-GlobalElementFinal ./xs:element/ (@final)
pattern-GlobalElementSequenceAny ./xs:element[@name]/xs:complexType/xs:sequence[xs:any and not(xs:element)]/ (../../(., @name))
pattern-GlobalElementSimpleType ./xs:element[@name]/xs:simpleType/ (../(., @name), .)
pattern-GlobalElementUnqualifiedType ./xs:element[@name and @type and not(contains(@type, ':'))]/ (., @name, @type)
pattern-HexBinaryAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]
pattern-HexBinaryElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]
pattern-IDAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ID')]
pattern-IDElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ID')]
pattern-IDREFAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]
pattern-IDREFElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]
pattern-IDREFSAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]
pattern-IDREFSElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]
pattern-ImportSchemaNamespace ./xs:import[not(@schemaLocation) and @namespace = 'http://www.w3.org/2001/XMLSchema']/ (., @namespace)
pattern-IntEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-IntSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-IntegerAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:integer')]
pattern-IntegerElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:integer')]
pattern-IntegerEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-IntegerSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-LanguageAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:language')]
pattern-LanguageElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:language')]
pattern-LanguageEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:language') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-List .//xs:list[@itemType]/ (., @itemType)
pattern-LocalAttributeSimpleType .//xs:attribute[not(parent::xs:schema)]/xs:simpleType
pattern-LocalElementComplexTypeEmptyExtension .//xs:element[not(parent::xs:schema)]/xs:complexType[not(@name)]/xs:complexContent[xs:extension[@base]/not(*)]/ (../../(., @name), .., ., xs:extension/(., @base))
pattern-LocalElementSimpleType .//xs:element[not(parent::xs:schema)]/xs:simpleType
pattern-LongEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-LongSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long')]/xs:pattern[@value]/ (.., ../@base, ., @value)
pattern-MaxOccurs0 .//xs:element[@maxOccurs='0']/(., @maxOccurs, @minOccurs)
pattern-MixedComplexContent .//xs:complexContent[@mixed = 'true']/ (@mixed)
pattern-MixedContentType .//xs:complexType[@mixed = 'true']/ (@mixed)
pattern-NMTOKENAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]
pattern-NMTOKENElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]
pattern-NMTOKENEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:NMTOKEN') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
pattern-NMTOKENSAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]
pattern-NMTOKENSElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]
pattern-NegativeIntegerAttribute .//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]