Skip to main content
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : XML : Education - Tutorials
XML Schema Infoset Model, Part 2
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackNext
2. Overview of XML Schema documents

Schema as a whole page 1 of 5

The <schema> element is the root element of every XML Schema document:

        <?xml version="1.0"?> 

The <schema> element may contain some attributes, which are described in XML Schema Part 1: Structures of the standard. A typical schema declaration often looks something like this:

<?xml version="1.0"?>

  • xmlns:xsd="" - Indicates that the elements and data types used in the schema (schema, element, complexType, sequence, string, int, etc.) come from the "" namespace, which is also known as the schema for schemas. It also specifies that the elements and data types that come from the "" namespace should be prefixed with xsd in the example above.
  • xmlns="" - Indicates that the default namespace is "".
  • elementFormDefault="qualified" - Indicates that any elements used by the XML instance document that were declared in this schema must be namespace qualified.
The XML Schema model java interface for the root <schema> is org.eclipse.xsd.XSDSchema and can be created by calling org.eclipse.xsd.XSDFactory.eINSTANCE.createXSDSchema().

Main menuSection menuFeedbackNext
About IBM | Privacy | Legal | Contact