XML Schema Tuto...login
XML Schema Tutorial
author:php.cn  update time:2022-04-20 14:13:02

XML Schema Reference Manual



XSD Elements

ElementExplanation
all Specifies that sub-elements can appear in any order, and each sub-element can appear zero or once.
annotationThe annotation element is a top-level element that specifies annotations for the schema.
anyEnables authors to extend XML documents with elements that are not specified by the schema.
anyAttributeEnables authors to extend XML documents with attributes that are not specified by the schema.
appInfoSpecifies the information in the annotation element to be used by the application.
attributeDefine an attribute.
attributeGroupDefine the attribute group used in complex type definitions.
choiceOnly an element included in a <choice> declaration is allowed to appear within a containing element.
complexContentDefine extensions or restrictions to complex types (containing mixed content or only elements).
complexTypeDefine complex type.
documentationDefine text comments in the schema.
elementDefine elements.
extensionExpand an existing simpleType or complexType element.
fieldSpecifies an XPath expression that specifies the value used to define the identity constraint.
group Defines the group of elements used in complex type definitions.
importAdd multiple schemas with different target namespaces to a document.
includeAdd multiple schemas with the same target namespace to a document.
keyThe specified attribute or element value (or set of values) must be a key within the specified range.
keyrefSpecifies that the attribute or element value (or a set of values) corresponds to the value of the specified key or unique element.
#listDefine a simple type as a list of values ​​of a specified data type.
notationDescribes the format of non-XML data in XML documents.
redefineRedefine simple and complex types, groups and property groups obtained from external schema files.
restrictionDefine restrictions on simpleType, simpleContent, or complexContent.
schema Defines the root element of the schema.
selectorSpecifies an XPath expression that selects a set of elements for the identity constraint.
sequenceRequires that child elements must appear in order. Each child element can appear from 0 to any number of times.
simpleContentContains extensions or restrictions on complexType elements and contains no elements.
simpleTypeDefine a simple type that specifies constraints and information about the values ​​of attributes or text-only elements.
unionDefine a collection of multiple simpleType definitions.
uniqueSpecifies that the attribute or element value (or a combination of attribute or element values) must be unique within the specified range.


##XSD Qualification/Facets

See XSD Qualification/Facets

QualificationDescriptionenumerationDefine a list of acceptable valuesfractionDigitsDefine 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. maxExclusiveDefine the upper limit of the value. Allowed values ​​must be less than this value. maxInclusiveDefine the upper limit of the value. 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. minExclusiveDefine the lower limit of the value. The allowed value must be greater than this value. minInclusiveDefine the lower limit of the value. The allowed 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 acceptable characters. totalDigits Defines the precise number of allowed Arabic digits. Must be greater than 0. whiteSpaceDefines how whitespace characters (line feeds, carriage returns, spaces, and tabs) are processed.