Easy Tutorial
❮ El Union El Simplecontent ❯

XML Schema Reference Manual


XSD Elements

Element Description
all Specifies that the child elements can appear in any order, and each child element can occur zero or one time.
annotation The annotation element is a top-level element that specifies comments for the schema.
any Allows authors to extend the XML document with elements not specified by the schema.
anyAttribute Allows authors to extend the XML document with attributes not specified by the schema.
appInfo Specifies information to be used by applications in the annotation element.
attribute Defines an attribute.
attributeGroup Defines a group of attributes to be used in complex type definitions.
choice Allows only one of the elements contained in the <choice> declaration to appear in the parent element.
complexContent Defines extensions or restrictions on a complex type that contains mixed content or elements only.
complexType Defines a complex type.
documentation Defines text comments within the schema.
element Defines an element.
extension Extends an existing simpleType or complexType element.
field Specifies an XPath expression that specifies the value used to define an identity constraint.
group Defines a group of elements to be 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 the specified scope.
keyref Specifies that an attribute or element value (or a set of values) must correspond to the value of the 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 within an XML document.
redefine Redefines simple and complex types, groups, and attribute groups from an external schema file.
restriction Defines constraints on a simpleType, simpleContent, or complexContent.
schema Defines the root element of the schema.
selector Specifies an XPath expression that selects a set of elements for an identity constraint.
sequence Requires child elements to appear in a specified order. Each child element can occur from 0 to any number of times.
simpleContent Contains extensions or restrictions on a complexType element that 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 simpleType definitions.
unique Specifies that an attribute or element value (or a combination of attribute or element values) must be unique within the specified scope.

XSD Constraints/Facets

See XSD Constraints / Facets

Constraint 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 bounds for numeric values. The value must be less than this value.
maxInclusive Defines the upper bounds for numeric values. The value 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 bounds for numeric values. The value must be greater than this value.
minInclusive Defines the lower bounds for numeric values. The value 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 the exact sequence of characters that are acceptable.
totalDigits Defines the exact number of digits allowed. Must be greater than 0.
whiteSpace Defines how white space (line feeds, tabs, spaces, and carriage returns) is handled.
❮ El Union El Simplecontent ❯