June 2002
Intermediate to advanced
396 pages
11h 8m
English
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"/> ...