XML Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace http://www.o2xdl.org/1.2/o2xdl
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.
Schema Composition
  • This schema imports schema(s) from the following namespace(s):
    • http://www.w3.org/XML/1998/namespace (at http://www.w3.org/2001/xml.xsd)

Declared Namespaces

Prefix Namespace
Default namespace http://www.w3.org/2001/XMLSchema
xml http://www.w3.org/XML/1998/namespace
o2x http://www.o2xdl.org/1.2/o2xdl
Schema Component Representation
<schema targetNamespace="http://www.o2xdl.org/1.2/o2xdl" elementFormDefault="qualified">
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
...
</schema>
top

Global Declarations

Element: annotation

Name annotation
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:annotation>
Start Choice [0..*]
<o2x:appinfo> ... </o2x:appinfo> [1]
<o2x:documentation> ... </o2x:documentation> [1]
End Choice
</o2x:annotation>
Schema Component Representation
<element name="annotation">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:appinfo"/>
<element ref="o2x:documentation"/>
</choice>
</complexType>
</element>
top

Element: appinfo

Name appinfo
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:appinfo
source="anyURI [0..1]">
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</o2x:appinfo>
Schema Component Representation
<element name="appinfo">
<complexType mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any processContents="lax"/>
</sequence>
<attribute name="source" type="anyURI" use="optional"/>
</complexType>
</element>
top

Element: bag

Name bag
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:bag
myURI="anyURI [0..1]">
Start Sequence [0..1]
<o2x:name> ... </o2x:name> [1]
End Sequence
Start Choice [0..*]
<o2x:class> ... </o2x:class> [1]
<o2x:classRef> ... </o2x:classRef> [1]
<o2x:object> ... </o2x:object> [1]
<o2x:objRef> ... </o2x:objRef> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</o2x:bag>
Schema Component Representation
<element name="bag">
<complexType>
<sequence>
<sequence minOccurs="0" maxOccurs="1">
<element ref="o2x:name"/>
</sequence>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:class"/>
<element ref="o2x:classRef"/>
<element ref="o2x:object"/>
<element ref="o2x:objRef"/>
<element ref="o2x:annotation"/>
</choice>
</sequence>
<attribute name="myURI" type="anyURI" use="optional"/>
</complexType>
</element>
top

Element: body

Name body
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:body>
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</o2x:body>
Schema Component Representation
<element name="body">
<complexType mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any processContents="lax"/>
</sequence>
</complexType>
</element>
top

Element: class

Name class
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:class
properties="NMTOKENS [0..1]"
context="NMTOKEN [0..1]"
myURI="anyURI [0..1]"
mode="string (value comes from list: {'inline'|'SNC'|'URI'}) [0..1]">
Start Sequence [0..1]
<o2x:name> ... </o2x:name> [1]
End Sequence
Start Choice [0..*]
<o2x:relationship> ... </o2x:relationship> [1]
<o2x:dataType> o2x:ReferenceType </o2x:dataType> [1]
<o2x:method> ... </o2x:method> [1]
<o2x:contents> ... </o2x:contents> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</o2x:class>
Schema Component Representation
<element name="class">
<complexType>
<sequence>
<sequence minOccurs="0" maxOccurs="1">
<element ref="o2x:name"/>
</sequence>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:relationship"/>
<element name="dataType" type="o2x:ReferenceType"/>
<element ref="o2x:method"/>
<element ref="o2x:contents"/>
<element ref="o2x:annotation"/>
</choice>
</sequence>
<attribute name="properties" type="NMTOKENS" use="optional"/>
<attribute name="context" type="NMTOKEN" use="optional"/>
<attribute name="myURI" type="anyURI" use="optional"/>
<attribute name="mode" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="inline"/>
<enumeration value="SNC"/>
<enumeration value="URI"/>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
top

Element: classRef

Name classRef
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:classRef
name="string [0..1]"
URIref="anyURI [0..1]">
Start Sequence [0..1]
<o2x:annotation> ... </o2x:annotation> [1]
End Sequence
</o2x:classRef>
Schema Component Representation
<element name="classRef">
<complexType>
<sequence minOccurs="0" maxOccurs="1">
<element ref="o2x:annotation"/>
</sequence>
<attribute name="name" type="string" use="optional"/>
<attribute name="URIref" type="anyURI" use="optional"/>
</complexType>
</element>
top

Element: contentList

Name contentList
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:contentList
name="string [0..1]">
Start Choice [0..*]
<o2x:object> ... </o2x:object> [1]
<o2x:objRef> ... </o2x:objRef> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</o2x:contentList>
Schema Component Representation
<element name="contentList">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:object"/>
<element ref="o2x:objRef"/>
<element ref="o2x:annotation"/>
</choice>
<attribute name="name" type="string" use="optional"/>
</complexType>
</element>
top

Element: contents

Name contents
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:contents
name="string [0..1]">
Start Choice [0..*]
<o2x:classRef> ... </o2x:classRef> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</o2x:contents>
Schema Component Representation
<element name="contents">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:classRef"/>
<element ref="o2x:annotation"/>
</choice>
<attribute name="name" type="string" use="optional"/>
</complexType>
</element>
top

Element: documentation

Name documentation
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:documentation
source="anyURI [0..1]"
xml:lang="[0..1]">
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</o2x:documentation>
Schema Component Representation
<element name="documentation">
<complexType mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any processContents="lax"/>
</sequence>
<attribute name="source" type="anyURI" use="optional"/>
<attribute ref="xml:lang"/>
</complexType>
</element>
top

Element: inline

Name inline
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:inline>
<!-- Mixed content -->
Start Sequence [0..*]
Allow any elements from any namespace (lax validation). [1]
End Sequence
</o2x:inline>
Schema Component Representation
<element name="inline">
<complexType mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any processContents="lax"/>
</sequence>
</complexType>
</element>
top

Element: method

Name method
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:method
context="NMTOKEN [0..1]"
key="NMTOKEN [0..1]"
properties="NMTOKENS [0..1]"
mode="string (value comes from list: {'inline'|'SNC'|'URI'}) [0..1]"
visibility="string (value comes from list: {'public'|'protected'|'private'|'virtual'}) [0..1]"
name="string [0..1]"
URIref="anyURI [0..1]">
Start Choice [0..*]
<o2x:paramType> o2x:ReferenceType </o2x:paramType> [1]
<o2x:paramValues> o2x:ReferenceType </o2x:paramValues> [1]
<o2x:inline> ... </o2x:inline> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</o2x:method>
Schema Component Representation
<element name="method">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="paramType" type="o2x:ReferenceType"/>
<element name="paramValues" type="o2x:ReferenceType"/>
<element ref="o2x:inline"/>
<element ref="o2x:annotation"/>
</choice>
<attribute name="context" type="NMTOKEN" use="optional"/>
<attribute name="key" type="NMTOKEN" use="optional"/>
<attribute name="properties" type="NMTOKENS" use="optional"/>
<attribute name="mode" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="inline"/>
<enumeration value="SNC"/>
<enumeration value="URI"/>
</restriction>
</simpleType>
</attribute>
<attribute name="visibility" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="public"/>
<enumeration value="protected"/>
<enumeration value="private"/>
<enumeration value="virtual"/>
</restriction>
</simpleType>
</attribute>
<attribute name="name" type="string" use="optional"/>
<attribute name="URIref" type="anyURI" use="optional"/>
</complexType>
</element>
top

Element: name

Name name
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:name/>
Schema Component Representation
<element name="name">
<complexType mixed="true"/>
</element>
top

Element: objRef

Name objRef
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:objRef
position="NMTOKEN [0..1]"
context="NMTOKEN [0..1]"
name="string [0..1]"
URIref="anyURI [0..1]">
Start Choice [0..*]
<o2x:annotation> ... </o2x:annotation> [1]
<o2x:object> ... </o2x:object> [1]
End Choice
</o2x:objRef>
Schema Component Representation
<element name="objRef">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:annotation"/>
<element ref="o2x:object"/>
</choice>
<attribute name="position" type="NMTOKEN" use="optional"/>
<attribute name="context" type="NMTOKEN" use="optional"/>
<attribute name="name" type="string" use="optional"/>
<attribute name="URIref" type="anyURI" use="optional"/>
</complexType>
</element>
top

Element: object

Name object
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:object
target="string [0..1]"
position="NMTOKEN [0..1]"
context="NMTOKEN [0..1]"
myURI="anyURI [0..1]"
key="NMTOKEN [0..1]">
<!-- Mixed content -->
Start Sequence [0..1]
<o2x:name> ... </o2x:name> [1]
End Sequence
Start Choice [0..*]
<o2x:dataType> o2x:ReferenceType </o2x:dataType> [1]
<o2x:dataValues> o2x:ReferenceType </o2x:dataValues> [1]
<o2x:relationship> ... </o2x:relationship> [1]
<o2x:method> ... </o2x:method> [1]
<o2x:contentList> ... </o2x:contentList> [1]
<o2x:annotation> ... </o2x:annotation> [1]
Allow any elements from a namespace other than this schema's namespace (lax validation). [1]
End Choice
</o2x:object>
Schema Component Representation
<element name="object">
<complexType mixed="true">
<sequence>
<sequence minOccurs="0" maxOccurs="1">
<element ref="o2x:name"/>
</sequence>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="dataType" type="o2x:ReferenceType"/>
<element name="dataValues" type="o2x:ReferenceType"/>
<element ref="o2x:relationship"/>
<element ref="o2x:method"/>
<element ref="o2x:contentList"/>
<element ref="o2x:annotation"/>
<any namespace="##other" processContents="lax"/>
</choice>
</sequence>
<attribute name="target" type="string" use="optional"/>
<attribute name="position" type="NMTOKEN" use="optional"/>
<attribute name="context" type="NMTOKEN" use="optional"/>
<attribute name="myURI" type="anyURI" use="optional"/>
<attribute name="key" type="NMTOKEN" use="optional"/>
</complexType>
</element>
top

Element: relationship

Name relationship
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<o2x:relationship
role="string [0..1]">
Start Choice [0..*]
<o2x:annotation> ... </o2x:annotation> [1]
<o2x:objRef> ... </o2x:objRef> [1]
<o2x:classRef> ... </o2x:classRef> [1]
End Choice
</o2x:relationship>
Schema Component Representation
<element name="relationship">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:annotation"/>
<element ref="o2x:objRef"/>
<element ref="o2x:classRef"/>
</choice>
<attribute name="role" type="string" use="optional"/>
</complexType>
</element>
top

Global Definitions

Complex Type: ReferenceType

Super-types: None
Sub-types: None
Name ReferenceType
Abstract no
XML Instance Representation
<...
name="string [0..1]"
mode="string (value comes from list: {'inline'|'SNC'|'URI'}) [0..1]"
URIref="anyURI [0..1]">
Start Choice [0..*]
<o2x:body> ... </o2x:body> [1]
<o2x:annotation> ... </o2x:annotation> [1]
End Choice
</...>
Schema Component Representation
<complexType name="ReferenceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="o2x:body"/>
<element ref="o2x:annotation"/>
</choice>
<attribute name="name" type="string" use="optional"/>
<attribute name="mode" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="inline"/>
<enumeration value="SNC"/>
<enumeration value="URI"/>
</restriction>
</simpleType>
</attribute>
<attribute name="URIref" type="anyURI" use="optional"/>
</complexType>
top

Legend

Complex Type:

Schema Component Type

AusAddress

Schema Component Name
Super-types: Address < AusAddress (by extension)
Sub-types:
  • QLDAddress (by restriction)
If this schema component is a type definition, its type hierarchy is shown in a gray-bordered box.
Name AusAddress
Abstract no
The table above displays the properties of this schema component.
XML Instance Representation
<... country="Australia">
<unitNo> string </unitNo> [0..1]
<houseNo> string </houseNo> [1]
<street> string </street> [1]
Start Choice[1]
<city> string </city> [1]
<town> string </town> [1]
End Choice
<state> AusStates </state> [1]
<postcode> string <<pattern = [1-9][0-9]{3}>> </postcode> [1]?
</...>

The XML Instance Representation table above shows the schema component's content as an XML instance.

Schema Component Representation
<complexTypename="AusAddress">
<complexContent>
<extensionbase="Address">
<sequence>
<elementname="state" type="AusStates"/>
<elementname="postcode">
<simpleType>
<restrictionbase="string">
<patternvalue="[1-9][0-9]{3}"/>
</restriction>
</simpleType>
</element>
</sequence>
<attributename="country" type="string" fixed="Australia"/>
</extension>
</complexContent>
</complexType>
The Schema Component Representation table above displays the underlying XML representation of the schema component. (Annotations are not shown.)
top

Glossary

Abstract (Applies to complex type definitions and element declarations). An abstract element or complex type cannot used to validate an element instance. If there is a reference to an abstract element, only element declarations that can substitute the abstract element can be used to validate the instance. For references to abstract type definitions, only derived types can be used.

All Model Group Child elements can be provided in any order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-all.

Choice Model Group Only one from the list of child elements and model groups can be provided in instances. See: http://www.w3.org/TR/xmlschema-1/#element-choice.

Collapse Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32). Then, collapse contiguous sequences of space characters into single space character, and remove leading and trailing space characters.

Disallowed Substitutions (Applies to element declarations). If substitution is specified, then substitution group members cannot be used in place of the given element declaration to validate element instances. If derivation methods, e.g. extension, restriction, are specified, then the given element declaration will not validate element instances that have types derived from the element declaration's type using the specified derivation methods. Normally, element instances can override their declaration's type by specifying an xsi:type attribute.

Key Constraint Like Uniqueness Constraint, but additionally requires that the specified value(s) must be provided. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Key Reference Constraint Ensures that the specified value(s) must match value(s) from a Key Constraint or Uniqueness Constraint. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Model Group Groups together element content, specifying the order in which the element content can occur and the number of times the group of element content may be repeated. See: http://www.w3.org/TR/xmlschema-1/#Model_Groups.

Nillable (Applies to element declarations). If an element declaration is nillable, instances can use the xsi:nil attribute. The xsi:nil attribute is the boolean attribute, nil, from the http://www.w3.org/2001/XMLSchema-instance namespace. If an element instance has an xsi:nil attribute set to true, it can be left empty, even though its element declaration may have required content.

Notation A notation is used to identify the format of a piece of data. Values of elements and attributes that are of type, NOTATION, must come from the names of declared notations. See: http://www.w3.org/TR/xmlschema-1/#cNotation_Declarations.

Preserve Whitespace Policy Preserve whitespaces exactly as they appear in instances.

Prohibited Derivations (Applies to type definitions). Derivation methods that cannot be used to create sub-types from a given type definition.

Prohibited Substitutions (Applies to complex type definitions). Prevents sub-types that have been derived using the specified derivation methods from validating element instances in place of the given type definition.

Replace Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32).

Sequence Model Group Child elements and model groups must be provided in the specified order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-sequence.

Substitution Group Elements that are members of a substitution group can be used wherever the head element of the substitution group is referenced.

Substitution Group Exclusions (Applies to element declarations). Prohibits element declarations from nominating themselves as being able to substitute a given element declaration, if they have types that are derived from the original element's type using the specified derivation methods.

Target Namespace The target namespace identifies the namespace that components in this schema belongs to. If no target namespace is provided, then the schema components do not belong to any namespace.

Uniqueness Constraint Ensures uniqueness of an element/attribute value, or a combination of values, within a specified scope. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

top