The schema Element
An XML Schema Document must have exactly one schema
element. The start-tag for the simplest schema element might look like:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
A start-tag for a complicated schema element might look like:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:cat="http://www.XMLSchemaReference.com/examples/catalog"
xmlns="http://www.XMLSchemaReference.com/examples/catalog"
targetNamespace="http://www.XMLSchemaReference.com/examples/catalog"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
id="Full-Featured-Schema"
blockDefault="#all"
finalDefault="restriction"
version="FFS:1"
xml:lang="en-US">
The schema element has any of the following attributes:
|
Attribute |
Description |
|
attributeFormDefault |
The value of the attributeFormDefault attribute determines the default value of the form attribute for all attribute types. |
|
blockDefault |
The value of the blockDefault attribute determines the default value of the block attribute for element types and complex types. |
|
elementFormDefault |
The value of the elementFormDefault attribute determines the default value of the form attribute for all element types. |
|
finalDefault |
The value of the finalDefault attribute determines the default value of the final attribute for element types, simple types, and complex types. |
|
id |
The value of an id attribute uniquely identifies an element within an XML schema. |
|
targetNamespace |
The value of the targetNamespace is the namespace for any component described in the XML schema document. There may be explicitly no target namespace. |
|
version |
The version attribute has no special meaning. The schema writer might wish to version the XML schema or the XML schema document. |
|
xml:lang |
The value of the xml:lang attribute indicates the language of all human-readable information in a schema. |
|
xmlns |
The value of an xmlns attribute specifies an XML namespace. The xmlns attribute identifies existing namespaces to which qualified names might apply. Without a namespace qualifier, the value of this attribute may also identify a default namespace for the XML schema document. |
|