YouTip LogoYouTip

El Schema

* * Complete XML Schema Reference Manual](#) * * * ## Definition and Usage The `schema` element defines the root element of a schema. ### Element Information * **Parent Element:** (No parent element) ### Syntax ((include|import|redefine|annotation)*,(((simpleType|complexType| group|attributeGroup)|element|attribute|notation),annotation*)*) | Attribute | Description | | --- | --- | | id | Optional. Specifies a unique ID for this element. | | attributeFormDefault | Optional. The form of attributes declared in the target namespace of this schema. The value must be one of the following strings: "qualified" or "unqualified". The default is "unqualified". * "unqualified" indicates that attributes in the target namespace are not required to be qualified with a namespace prefix. * "qualified" indicates that attributes in the target namespace must be qualified with a namespace prefix. | | elementFormDefault | Optional. The form of elements declared in the target namespace of this schema. The value must be one of the following strings: "qualified" or "unqualified". The default is "unqualified". * "unqualified" indicates that elements in the target namespace are not required to be qualified with a namespace prefix. * "qualified" indicates that elements in the target namespace must be qualified with a namespace prefix. | | blockDefault | Optional. Specifies the default value for the `block` attribute on `element` and `complexType` elements in the target namespace. The `block` attribute prevents complex types (or elements) with the specified derived type from being used in place of the inherited complex type (or element). The value can contain `#all` or a list which is a subset of `extension`, `restriction`, or `substitution`: * `extension` - Prevents complex types derived by extension from being substituted for this complex type. * `restriction` - Prevents complex types derived by restriction from being substituted for this complex type. * `substitution` - Prevents substitution of the element. * `#all` - Prevents all derived complex types from being substituted for this complex type. | | finalDefault | Optional. Specifies the default value for the `final` attribute on `element`, `simpleType`, and `complexType` elements in the target namespace of this schema. The `final` attribute prevents the specified derived types for `element`, `simpleType`, or `complexType` elements. For `element` and `complexType` elements, the value can contain `#all` or a list which is a subset of `extension` or `restriction`. For `simpleType` elements, the value can also contain `list` and `union`: * `extension` - By default, elements in this schema cannot be derived by extension. Applies only to `element` and `complexType` elements. * `restriction` - Prevents derivation by restriction. * `list` - Prevents derivation by list. Applies only to `simpleType` elements. * `union` - Prevents derivation by union. Applies only to `simpleType` elements. * `#all` - By default, elements in this schema cannot be derived by any method. | | targetNamespace | The URI reference of the namespace for this schema. A prefix for this namespace can also be assigned. If no prefix is assigned, schema components of this namespace can be used with unqualified references. | | version | Optional. Specifies the version of the schema. | | xmlns | Specifies the URI reference of one or more namespaces used in this schema. If no prefix is assigned, schema components of this namespace can be used with unqualified references. | | _any attributes_ | Optional. Specifies any other attributes with a non-schema namespace. | ### Example 1 ### Example 2 In this example, schema components (element name, type) in the http://www.w3.org/2001/XMLSchema namespace are unqualified, while http://www.w3school.com.cn/w3schoolschema (mystring) is qualified with the `wsc` prefix: * * Complete XML Schema Reference Manual](#)
← El SelectorEl Restriction β†’