ZVON > References > XML Schema 2001 Reference
index | >> Schema << | DTD

element

Go to standard
In: group nestedParticle
Schema

<xs:element name="element" type="xs:localElement"/>

In: schema
Schema

<xs:element name="element" type="xs:topLevelElement" id="element"> </xs:element>

In: group allModel
Schema

<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
     <xs:complexType mixed="false">
          <xs:complexContent>
               <xs:restriction base="xs:localElement">
                    <xs:sequence>
                         <xs:element ref="xs:annotation" minOccurs="0"/>
                         <xs:choice minOccurs="0">
                              <xs:element name="simpleType" type="xs:localSimpleType"/>
                              <xs:element name="complexType" type="xs:localComplexType"/>
                         </xs:choice>
                         <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="minOccurs" use="optional" default="1">
                         <xs:simpleType>
                              <xs:restriction base="xs:nonNegativeInteger">
                                   <xs:enumeration value="0"/>
                                   <xs:enumeration value="1"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="maxOccurs" use="optional" default="1">
                         <xs:simpleType>
                              <xs:restriction base="xs:allNNI">
                                   <xs:enumeration value="0"/>
                                   <xs:enumeration value="1"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:attribute>
               </xs:restriction>
          </xs:complexContent>
     </xs:complexType>
</xs:element>


Occurs in Schema Tutorial examples:
The document root element is from null namespace
The document root element is from some particular namespace
Top-level elements, null namespace
Top-level elements, non-null namespace
elementFormDefault unqualified for not-top-level elements, namespace non-null
elementFormDefault qualified for not-top-level elements, namespace non-null
Empty element
Element with text only
Element with mixed content (text and only one element)
Element which contains elements only (order does not matter)
Element which contains elements only (order is important)
Element which contains mixture of two elements (can appear more times)
Element which contains one of two elements
Element which contains two "patterns" (sequences), in any order
Element contains text only and one attribute
Accessing data-types
Restrictions
Multiple restrictions
Element is either a fixed string or an integer
Element can contain a string from an enumerated set
Element can contain a mixture of elements
Defining a group of attributes
Attribute contains a list of values
Element contains a list of values
Attribute from any namespace
Attributes from namespace other then target namespace (which is null)
Attributes from namespace other than target namespace (which is not null)
Attributes from some particular namespace
Just one element from any namespace
Arbitrary number of elements from any namespace
Exact number of elements from any namespace
Elements from namespace other than target namespace (which is not null)
Elements from namespace other than target namespace (which is null)
Definition of a custom simpleType - temperature must be greater than -273.15
Limiting string length
Limiting the number of decimal places
Limiting both the number of decimal places and total places
String must contain e-mail address
Element contains date
Element represents time duration
The number must not be in scientific notation
nillable, xsi:nil
xsi:type
definition of a simpleType, target namespace is null
definition of a simpleType, target namespace is not null
Element and type have the same name
Error - simpleType and complexType have the same name
Uniqueness
Key
Uniqueness - comparison of numbers
Unique and nillable
Keyref
XML Schema - finalDefault attribute
Importing schema and processContents "strict"
Importing schema and processContents "lax"
Importing schema and processContents "skip"
Redefine element
Abstract element, substitutionGroup
Attribute block
Attribute block set to "restriction"
Attribute block set to "extension"
XML Schema - blockDefault attribute
Combining block and blockDefault attributes
Attribute block and xsi:type
Abstract type
Annotating your schema
Extending schema
Target namespace is not null, attributeFormDefault is qualified
Target namespace is not null, attributeFormDefault is unqualified
Target namespace is null
Extension of a sequence
Extension of a choice
Restriction of a sequence
Restriction of a choice
Error in restriction - namespaces in wildcards
"Sequence" from "all"
"Sequence" from "choice"
Element from any
Target namespaces are the same (non-null)
Target namespaces are the same (null)
Including document has non-null target namespaces, included null target namespace
The wildcard "xsd:any" and inclusions
The wildcard "xsd:anyAttribute" and inclusions