Name

xs:schema

Synopsis

<xs:schema
  attributeFormDefault = "( qualified | unqualified )"
  elementFormDefault   = "( qualified | unqualified )"
  blockDefault = "( #all | extension | restriction | substitution )
  finalDefault = "( #all | extension | restriction )
  id = "ID"
  targetNamespace = "anyURI"
  version = "token"
  xml:lang = "language" >
  <!-- (
         (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>

xs:schema is the root element of all schema documents. It contains all the top-level elements described elsewhere in this chapter. First come all the elements that somehow reference other schema documents, including xs:include, xs:import, and xs:redefine. These are followed by the various elements that define types and groups and declare elements and attributes. As usual, xs:annotation elements can be placed anywhere that is convenient.

Attributes

attributeFormDefault, optional

This sets the default value for the form attribute of xs:attribute elements. This specifies whether locally declared attributes are namespace qualified by the target namespace. If this attribute is not used, locally declared attributes are unqualified unless the form attribute of the xs:attribute element has the value qualified.

elementFormDefault, optional

This sets the default for the form attribute of xs:element elements. This specifies whether locally declared elements are namespace-qualified ...

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.