W3C

ItemList Example

<xs:element name="itemList" type="ex:ItemList"/>

<xs:complexType name="ItemList">
            <xs:sequence>
               <xs:element name="item" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
            </xs:sequence>
         </xs:complexType>

The example schema [ItemList.xsd] has been classified as being a Basic XML Schema Patterns for Databinding 1.0 conformant document as it only exhibits the following patterns:

Status Name XPath
basic TargetNamespace ./@targetNamespace
basic QualifiedLocalElements .[not(@elementFormDefault) or @elementFormDefault = 'qualified']/(., @elementFormDefault)
basic UnqualifiedLocalAttributes .[not(@attributeFormDefault)] |.[@attributeFormDefault = 'unqualified']/@attributeFormDefault
basic GlobalElement ./xs:element[@name and @type and contains(@type, ':')]/(., @name, @type)
basic IdentifierName //.[matches(@name, "[A-Za-z_]([A-Za-z0-9_]0 31)")]/(@name)
basic ElementMinOccurs0 .//xs:element[@minOccurs = '0']/(@minOccurs)
basic ElementMaxOccursUnbounded .//xs:element[@maxOccurs = 'unbounded']/(@maxOccurs)
basic GlobalComplexType ./xs:complexType[@name]/(., @name)
basic ComplexTypeSequence .//xs:complexType/xs:sequence/(., xs:element/(., @name))
basic ItemList .//xs:sequence[count(xs:element) = 1]/xs:element[@maxOccurs = 'unbounded']/(@maxOccurs)
basic ElementTypeReference .//xs:element[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and contains(@type, ':')]/(., @name, @type)
basic StringElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]

To facilitate testing, the example schema element has been wrapped in the following descriptions:

The following valid instance documents are provided:

Instance Validity
ItemList01 true
ItemList02 true
ItemList03 true

<ex:itemList>
            <ex:item>item one</ex:item>
            <ex:item>item two</ex:item>
            <ex:item>item three</ex:item>
            <ex:item>item four</ex:item>
         </ex:itemList>
<ex:itemList>
            <ex:item>item one</ex:item>
         </ex:itemList>
<ex:itemList/>

This document was produced by the W3C XML Schema Patterns for Databinding Working Group. Comments on this document may be sent to the public public-xsd-databinding-comments@w3.org mailing list (public archive).

Generated from examples.xml $Date$