XML Schema Reference Manual
XSD Elements
| Element |
Description |
| all |
Specifies that child elements can appear in any order, and each child element can appear zero or one time. |
| annotation |
The annotation element is a top-level element that specifies comments for a schema. |
| any |
Allows creators to extend XML documents with elements not specified by the schema. |
| anyAttribute |
Allows creators to extend XML documents with attributes not specified by the schema. |
| appInfo |
Specifies information to be used by applications within the annotation element. |
| attribute |
Defines an attribute. |
| attributeGroup |
Defines an attribute group used in complex type definitions. |
| choice |
Allows only one element to appear within the containing element in a <choice> declaration. |
| complexContent |
Defines extensions or restrictions on complex types (containing mixed content or elements only). |
| complexType |
Defines a complex type. |
| documentation |
Defines text comments in a schema. |
| element |
Defines an element. |
| extension |
Extends an existing simpleType or complexType element. |
| field |
Specifies an XPath expression that specifies the values used to define identity constraints. |
| group |
Defines an element group used in complex type definitions. |
| import |
Adds multiple schemas with different target namespaces to a document. |
| include |
Adds multiple schemas with the same target namespace to a document. |
| key |
Specifies that an attribute or element value (or a set of values) must be a key within a specified scope. |
| keyref |
Specifies that attribute or element values (or a set of values) correspond to the values of a specified key or unique element. |
| list |
Defines a simple type as a list of values of a specified data type. |
| notation |
Describes the format of non-XML data in an XML document. |
| redefine |
Redefines simple and complex types, groups, and attribute groups obtained from an external schema file. |
| restriction |
Defines constraints on simpleType, simpleContent, or complexContent. |
| schema |
Defines the root element of a schema. |
| selector |
Specifies an XPath expression that selects a set of elements for identity constraints. |
| sequence |
Requires that child elements must appear in order. Each child element can appear zero to any number of times. |
| simpleContent |
Contains extensions or restrictions on a complexType element and does not contain any elements. |
| simpleType |
Defines a simple type, specifying constraints and information about the values of attributes or text-only elements. |
| union |
Defines a collection of multiple simpleType definitions. |
| unique |
Specifies that an attribute or element value (or a combination of attribute or element values) must be unique within a specified scope. |
XSD Restrictions/Facets
See XSD Restrictions / Facets
| Facet |
Description |
| enumeration |
Defines a list of acceptable values. |
| fractionDigits |
Defines the maximum number of decimal places allowed. Must be greater than or equal to 0. |
| length |
Defines the exact number of characters or list items allowed. Must be greater than or equal to 0. |
| maxExclusive |
Defines the upper bound of numeric values. Allowed values must be less than this value. |
| maxInclusive |
Defines the upper bound of numeric values. Allowed values must be less than or equal to this value. |
| maxLength |
Defines the maximum number of characters or list items allowed. Must be greater than or equal to 0. |
| minExclusive |
Defines the lower bound of numeric values. Allowed values must be greater than this value. |
| minInclusive |
Defines the lower bound of numeric values. Allowed values must be greater than or equal to this value. |
| minLength |
Defines the minimum number of characters or list items allowed. Must be greater than or equal to 0. |
| pattern |
Defines an exact sequence of acceptable characters. |
| totalDigits |
Defines the exact number of Arabic digits allowed. Must be greater than 0. |
| whiteSpace |
Defines how whitespace characters (line feeds, carriage returns, spaces, and tabs) are handled. |
Other Extensions