xs:schema — Document element of a W3C XML Schema.
<xs:schema attributeFormDefault = ( “qualified” | “unqualified” ) : “unqualified” blockDefault = ( “#all” | list of ( “extension” | “restriction” | “substitution” ) ) : “” elementFormDefault = ( “qualified” | “unqualified” ) : “unqualified” finalDefault = ( “#all” | list of ( “extension” | “restriction” ) ) : “” id = xs:ID targetNamespace = xs:anyURI version = xs:token xml:lang = xml:lang {any attributes with non-schema namespace} > Content: ((xs:include | xs:import | xs:redefine | xs:annotation)*, (, ( | (xs:simpleType | xs:complexType | xs:group | xs:attributeGroup) | xs:element | xs:attribute | xs:notation), xs:annotation*)*) </xs:schema>
May be included in: (must be root element)
xs:schema
is the document (root) element of any
W3C XML Schema. It’s both a container for all the
declarations and definitions of the schema and a place holder for a
number of default values expressed as attributes. The compositors
embedded directly under xs:schema
have a special
role, since they are considered global definitions that can be
referenced elsewhere.
A xs:schema
element (and therefore a schema) is
associated with a maximum of one namespace and must import the
definitions of compositors for other namespaces if needed.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="name" type="xs:string"/> <xs:element name="qualification" type="xs:string"/> <xs:element name="born" type="xs:date"/> <xs:element name="dead" type="xs:date"/> <xs:element name="isbn" type="xs:NMTOKEN"/> <xs:attribute name="id" type="xs:ID"/> <xs:attribute name="available" type="xs:boolean"/> <xs:attribute name="lang" type="xs:language"/> .../... </xs:schema>
attributeFormDefault
Default value for the form
attributes of
xs:attribute
, determining whether attributes will
be namespace-qualified by default.
blockDefault
Default value of the block
attribute of
xs:element
and xs:complexType
.
elementFormDefault
Default value for the form
attributes of
xs:element
, determining whether attributes will be
namespace-qualified by default
finalDefault
Default value of the final
attribute of
xs:element
and xs:complexType
.
id
W3C XML Schema’s element ID.
targetNamespace
Namespace attached to this schema. All the qualified elements and attributes defined in this schema will belong to this namespace. This namespace will also be attached to all the global components.
version
Version of the schema (for user convenience).
xml
Language of the schema.