A simple description of an XSD element

Source: Internet
Author: User
Tags abstract define definition contains final key reference string
<!--[if!supportlists]-->²<!--[endif]-->xsd element

<!--[if!supportlists]--> one, <!--[endif]-->element:: Declares an element.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<element

abstract = Boolean:false

Block = (#all | List of (Extension | restriction | substitution))

Default = String

Final = (#all | List of (Extension | restriction))

Fixed = string

Form = (Qualified | unqualified)

id = ID

maxOccurs = (nonNegativeInteger | unbounded): 1

minoccurs = nonnegativeinteger:1

Name = NCName

nillable = Boolean:false

ref = QName

SubstitutionGroup = QName

Type = QName

{Any attributes with Non-schema namespace}...>

Content: (Annotation, (SimpleType | complexType)?, (unique | key | keyref))

</element>

<!--[if!supportlists]-->2, <!--[Endif]-->block:

The export type, which is designed to prevent elements with the specified export type from being used in place of the element. The value may be:

Extension: Prevents the element from being replaced by extending the exported element.

Restriction: Prevents the element from being replaced by restricting the exported element.

Substitution: Prevents the element from being replaced by replacing the exported element.

#all: Prevents all types of exported elements from replacing the element.

<!--[if!supportlists]-->3, <!--[Endif]-->default:

If the element is a simple type or is textonly, set the default value for the element. Default and fixed conflict. SubstitutionGroup: The name of the element that can be used to replace the element. The element must have the same type, which has the type derived from the specified element.

If the referenced element is declared at the global level (the parent element is a schema element), the attribute can be used on any element.

Similar to the default values in the program design.

The value must be QName.

<!--[if!supportlists]-->4, <!--[endif]-->final:

The export type. Can be extension,restriction and #all only for elements that contain elements as schemas.

<!--[if!supportlists]-->5, <!--[endif]-->fixed:

If the element is simple or textonly, its value is predetermined and immutable and can be set with the fixed value. Fixed and default contradictions. It is similar to the role of const in programming.

<!--[if!supportlists]-->6, <!--[Endif]-->form:

The form of the element, as defined by the namespace prefix. Optional values are qualified and unqualified

<!--[if!supportlists]-->7, <!--[Endif]-->id

<!--[if!supportlists]-->8, <!--[Endif]-->maxoccurse, Minoccurse

The minimum number of occurrences. The maximum value is unrestricted "unbounded", and elements containing the element "schema" are automatically prohibited.

<!--[if!supportlists]-->9, <!--[Endif]-->name:

Name, no colon name (NCName), and if the containing element is "Schema", you must have.

<!--[if!supportlists]-->10, <!--[endif]-->nillable:

Displays whether a null value can be paid to this element. Default to False

<!--[if!supportlists]-->11, <!--[Endif]-->ref:

In this schema-declared element, this name must be the QName of another element in that schema. If the containing element is a schema, it is automatically prohibited. ComplexType, SimpleType, Key, keyref, and unique elements, as well as nillable, default, fixed, form, block, and type properties cannot appear.

<!--[if!supportlists]-->12, <!--[Endif]-->type:

The data type of the element, which can be a built-in type and the name of the Simplytype, complextype, and type cannot appear at the same time as ref.

<!--[if!supportlists]-->13, <!--[endif]--> element information:

Number of occurrences: defined

Parent element: schema, choice, all, sequence

Content: Simplytype, ComplexType, Key, KeyRef, unique

<!--[if!supportlists]-->14, <!--[endif]--> notes:

SimpleType or complexType elements can exist as child elements only if both the ref and type attributes do not exist. In addition, elements can appear through references within the choice, all, sequence, and complexType elements. A header element declaration must directly define a complex type.

<!--[if!supportlists]--> II, <!--[Endif]-->attribute: Declare a property.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<attribute

Default = String

Fixed = string

Form = (Qualified | unqualified)

id = ID

Name = NCName

ref = QName

Type = QName

Use = (Optional | prohibited | required): Optional

{Any attributes with Non-schema Namespace ...} >

Content: (Annotation, (SimpleType))

</attribute>

Some of the attribute descriptions are:

<!--[if!supportlists]-->2, <!--[Endif]-->use:

An indicator that indicates how to use the element. The optional values are as follows:

<!--[if!supportlists]-->3, <!--[endif]-->optional:

property is optional and can have any value, which is the default value.

<!--[if!supportlists]-->4, <!--[endif]-->prohibited:

This property is not available for use in restrictions on other complex types to prevent the use of existing properties. That is, it can only appear in the properties below the restriction.

<!--[if!supportlists]-->5, <!--[endif]-->required:

Property must occur once, and you can use this property to declare any value in the data type. Its use is the same as prohibition, which is required for all elements in the framework if the property is declared as a global property (whose parent element is a schema).

<!--[if!supportlists]-->6, <!--[endif]--> element information

Number of occurrences: defined once in a schema element. Referenced multiple times in a complex type or attribute group.

Parent elements: attributegroup, schema, ComplexType, restriction (simplecontent), extension (simplecontent), restriction ( complexcontent), extension (complexcontent)

Content: annotation, SimpleType

<!--[If!supportlists]--> III, <!--[Endif]-->attributegroup: Group A set of property declarations to define them as a group for complex types.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<attributegroup

id = ID

Name = NCName

ref = QName

{Any attributes with Non-schema Namespace ...} >

Content: (annotation?), ((Attribute | attributegroup) *, anyattribute?)

</attributeGroup>

<!--[if!supportlists]-->2, <!--[endif]--> element information:

Number of occurrences: unrestricted

Parent elements: attributegroup, ComplexType, schema, restriction (simplecontent), extension (simplecontent), restriction ( complexcontent), extension (complexcontent)

Content: annotation, attribute, attributegroup, anyattribute

<!--[If!supportlists]--> IV, <!--[Endif]-->anyattribute: Any attributes from the specified namespace can be displayed in either the containing ComplexType element or the containing The attributegroup element.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<anyattribute

id = ID

namespace = (# #any | # #other) | List of (AnyURI | (# #targetNamespace | # #local)) : # #any

processcontents = (LAX | skip | strict): strict

{Any attributes with Non-schema Namespace ...} >

Content: (annotation?)

</anyAttribute>

Some of the properties are described below:

<!--[if!supportlists]-->2, <!--[endif]-->processcontents:

An indicator that indicates how an application or XML processor should handle validation of an XML document based on the properties specified by the anyattribute element.

If the Processcontents property is not specified, the default is strict. If processcontents is specified, it must be one of the following values.

The Strict:xml processor must obtain the schema of the required namespaces and must validate all attributes from those namespaces.

The Lax:xml processor attempts to acquire the schema of the required namespaces and attempts to validate all the attributes from those namespaces, but no error occurs even if the schema cannot be obtained.

The Skip:xml processor does not attempt to validate any attributes from the specified namespace.

<!--[if!supportlists]-->3, <!--[endif]--> element information:

Unlimited number of occurrences

Parent element ComplexType, restriction (simplecontent), extension (simplecontent), restriction (complexcontent), extension ( complexcontent), attributegroup

Content annotation

<!--[if!supportlists]--> v. <!--[Endif]-->simplytype: Defines a simple type that determines information about, and constraints on, the values of plain text properties or elements.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<simpletype

Final = (#all | (List | union | restriction))

id = ID

Name = NCName

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (Restriction | list | union))

</simpleType>

<!--[if!supportlists]-->2, <!--[endif]--> element information

Unlimited number of occurrences

Parent element attribute, element, list, restriction (SimpleType), schema, union

Content annotation, list, restriction (SIMPLETYPE), union

<!--[if!supportlists]--> VI, <!--[Endif]-->complextype: An element that defines a complex content that determines the set of attributes and the content of the element.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<complextype

abstract = Boolean:false

Block = (#all | List of (Extension | restriction))

Final = (#all | List of (Extension | restriction))

id = ID

mixed = Boolean:false

Name = NCName

{Any attributes with Non-schema Namespace ...} >

Content: (annotation?, (simplecontent | complexcontent | (Group | all |

Choice | Sequence)?, ((Attribute | attributegroup) *, anyattribute)))

</complexType>

Some of the properties are described below:

<!--[if!supportlists]-->2, <!--[endif]-->mixed:

An indicator that indicates whether character data is allowed to appear between child elements of the complex type. The default value is False.

If the simplecontent element is a child element, the mixed property is not allowed.

If the complexcontent element is a child element, the mixed element can be overridden by the mixed property of the complexcontent element.

Optional.????

<!--[if!supportlists]-->3, <!--[endif]--> element information:

The number of occurrences is unrestricted within the schema, and within the element is once.

Parent elements element, redefine, schema

Content annotation, simplecontent, complexcontent, group, all, choice, sequence, attribute, attributegroup, anyattribute

<!--[if!supportlists]-->4, <!--[endif]--> notes:

A complex type is essentially a type definition of an element that can contain attributes and elements. An element can be declared by a type attribute that references the ComplexType element, which defines the structure, content, and attributes of the element. (an element can also accept a reference to SimpleType in its Type property.) )

A complex type can contain one element of the following elements and can contain only one element that determines what type of content is allowed in a complex type.

SimpleContent the complex type has character data or simpleType as content and does not contain any elements, but can contain attributes.

Complexcontent The complex type contains only elements or does not contain any element content (empty).

Group the complex type contains elements defined in the reference group.

Sequence The complex type contains elements defined in the specified sequence.

Choice This complex type allows one of the elements specified in the OPTION element.

All this complex type allows any or all of the elements specified in all elements to occur once.

If group, sequence, choice, or all are specified as child elements, you can optionally declare the properties of the complexType using the following elements.

Attribute the complex type contains the specified property.

AttributeGroup The complex type contains properties that are defined in the referenced attributegroup.

Anyattribute The complex type can contain any attributes from the specified namespace.

You can use any number of attribute or attributegroup elements. You can also use an instance of anyattribute.

If you specify group, sequence, choice, or all, the elements must appear in the following order.

Group | Sequence | Choice | All

Attribute | AttributeGroup

Anyattribute

<!--[if!supportlists]--> VII, <!--[endif]-->simplycontent: Contains pairs of complexType elements (it takes character data or SimpleType element is an extension or restriction of content, and does not contain any elements.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<simplecontent

id = ID

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (restriction | extension))

</simpleContent>

<!--[if!supportlists]--> VIII, <!--[endif]-->complexcontent: Contains extensions or limitations to complex types that contain only mixed content or elements.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<complexcontent

id = ID

mixed = Boolean

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (restriction | extension))

</complexContent>

<!--[if!supportlists]-->2, <!--[endif]--> element information:

Number of occurrences once

Parent element ComplexType

Content is optional. Annotation

Must be selected. One of the following elements can only be one: restriction (complexcontent) or extension (complexcontent).

Element collection method Element declaration:

<!--[If!supportlists]--> IX, <!--[Endif]-->all: Allow elements in a group to be displayed (or not displayed) in any element in the containing element.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<all

id = ID

maxoccurs= 1:1

minoccurs= (0 | 1): 1

{Any attributes with Non-schema Namespace ...} >

Content: (annotation?, element*)

</all>

<!--[if!supportlists]--> 10, <!--[endif]-->sequence: Require elements in a group to appear in the containing element in the specified order

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<sequence

id = ID

maxOccurs = (nonNegativeInteger | unbounded): 1

minoccurs = nonnegativeinteger:1

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (Element | group | choice | sequence | any) *)

</sequence>

<!--[if!supportlists]-->2, <!--[endif]--> element information:

Number of occurrences: within the group for one time, otherwise unrestricted.

Parent elements: Group, choice, sequence, complexType, restriction (simplecontent), extension (simplecontent), restriction ( complexcontent), extension (complexcontent)

Content: annotation, any, choice, element, group, sequence

<!--[if!supportlists]--> 11, <!--[endif]-->choince: Allow and allow only one element contained in the selected group to appear in the containing element.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<choice

id = ID

maxoccurs= (nonNegativeInteger | unbounded): 1

minoccurs= nonnegativeinteger:1

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (Element | group | choice | sequence | any) *)

</choice>

<!--[if!supportlists]-->2, <!--[endif]--> element information:

Occurrences: In group and complexType elements for one time;

Parent elements: Group, choice, sequence, complexType, restriction (simplecontent), extension (simplecontent), restriction ( complexcontent), extension (complexcontent)

Content: annotation, any, choice, element, group, sequence

Extension Element Description:

<!--[If!supportlists]--> 12, <!--[Endif]-->extension (simplycontent): Contains extensions to simplecontent. By adding a specified attribute, property group, or anyattribute, you extend a simple type or complex type with simple content, similar to the inheritance in program design.

<!--[if!supportlists]-->1, <!--[endif]--> mode:

<extension

Base = QName

id = ID

{Any attributes with Non-schema namespace}...>

Content: (annotation, (Attribute | attributegroup) *, anyattribute?)

</extension>

<!--[if!supportlists]-->2, <!--[endif]--> information:

Number of occurrences: once

Parent element: simplecontent

Content: annotation, attribute, attributegroup, anyattribute

<!--[if!supportlists]--> 13, <!--[Endif]-->extension (complexcontent): Contains extensions to complexcontent.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<extension

Base = QName

id = ID

{Any attributes with Non-schema namespace}...>

Content: (Annotation, (group | all | choice | sequence)?, (Attribute |

attributegroup) *, anyattribute))

</extension>

<!--[if!supportlists]-->2, <!--[endif]--> element information:

Number of occurrences: once

Parent element: complexcontent

Content: annotation, attribute, attributegroup, anyattribute, choice, all, sequence, group

Constraint element list:

<!--[if!supportlists]--> 14, <!--[Endif]-->restriction (Simplytype): Defines a constraint to the simpleType definition.

<!--[if!supportlists]-->1, <!--[endif]--> mode:

<restriction

Base = QName

id = ID

{Any attributes with Non-schema namespace}...>

Content: (Annotation, (SimpleType), (minexclusive | mininclusive | maxexclusive | maxinclusive | totaldigits |fractiondig its | Length | minlength | MaxLength | Enumeration | whitespace | pattern))

</restriction>

<!--[if!supportlists]--> 15, <!--[Endif]-->restriction (simplycontent): Defines a constraint to the simplecontent definition.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<restriction

Base = QName

id = ID

{Any attributes with Non-schema namespace}...>

Content: (annotation?, (SimpleType), (minexclusive | mininclusive |

maxexclusive | maxinclusive | TotalDigits |fractiondigits | Length |

minlength | MaxLength | Enumeration | whitespace | pattern)?,

((Attribute | attributegroup) *, anyattribute?)

</restriction>

<!--[if!supportlists]--> 16, <!--[Endif]-->restriction (complexcontent): Defines a constraint to the complexcontent definition.

<!--[if!supportlists]-->1, <!--[endif]--> declaration method:

<restriction

Base = QName

id = ID

{Any attributes with Non-schema namespace}...>

Content: (annotation?, Group | all | choice | sequence)?, (Attribute |

attributegroup) *, anyattribute?)

</restriction>




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.