Preparing XSD files

Tosca TBox supports XSD 1.0 files.

XML Schema definition language (XSD) files are used to define the structure of XML documents. This chapter includes a description of the supported XSD elements. How they are interpreted in XML modules is described in "Using XSD elements and value ranges". Several XSD files can be linked as described in "Linking several XSD files".

XSD schema in Tosca Commanderâ„¢

The table below lists all XSD elements. All XSD elements, attributes and value ranges, which are considered when an XSD schema is built, are marked in the Support column.

XML element

Support

Description

all

x

Specifies that child elements may exist in arbitrary order. The occurrence for each child element is either 0 or 1.

annotation

 

Specifies the topmost element for schema annotations.

any

x

Allows elements, which are not specified in the schema, to be added to the XML document.

anyAttribute

x

Allows attributes, which are not specified in the schema, to be added to the XML document.

attribute

x

Defines an attribute.

attributeGroup

x

Defines a group of attributes for defining complex types (complexType).

choice

x

Allows only the elements, which are contained in the <choice> declaration, to be included.

complexContent

x

Defines extensions or restrictions for complex types that contain either mixed contents or solely elements.

complexType

x

Defines a complexType element

element

x

Defines an element

enumeration

x

Defines a list of possible values

extension

x

Extends an existing element of the type simpleType or complexType

field

 

Specifies an Xpath expression that specifies the value to be used to restrict identities.

fractionDigits

 

Specifies the maximum number of decimal places. This value must be greater than or equal to zero.

group

x

Defines a group of elements for a complexType element.

import

x

Adds several schemes of various namespaces to a document.

include

x

Adds several schemes of the same namespaces to a document.

key

 

Specifies an attribute or element value as a key value

keyref

 

Specifies that the value of an attribute or a value matches either the specified key value or the unique element.

length

 

Specifies the possible number of characters or list elements. This value must be greater than or equal to zero.

list

x

Defines a simpleType element as a list of values.

maxExclusive

 

Specifies the upper limit for numbers. The values must be less than the specified limit.

maxInclusive

 

Specifies the upper limit for numbers. The values must be less than or equal to the specified limit.

maxLength

 

Specifies the maximum number of characters. The values must be less than or equal to the specified limit.

minExclusive

 

Specifies the minimum number of characters. The values must be greater than the specified limit.

minInclusive

 

Specifies the minimum number of characters. The values must be greater than or equal to the specified limit.

minLength

 

Specifies the possible number of characters. The values must be greater than or equal to the specified limit.

notation

 

Format of non-XML files in an XML document

pattern

 

Defines the exact sequence of possible characters.

redefine

x

Redefines simple and complex types, groups and attribute groups of external schemes.

restriction

x

Defines restrictions for simpleType, simpleContent, or complexContent.

schema

x

Defines the root element of a schema.

selector

 

Specifies an Xpath expression which contains a set of elements for an identity constraint.

sequence

x

Specifies that child elements must follow a sequence. The occurrence for each child element is either 0 or n.

simpleContent

x

Extends or restricts the contents to a simple text complex type or simple type, and does not contain any elements.

simpleType

x

Defines a simple type and specifies restrictions and information by using either attribute values or simple text elements.

totalDigits

 

Specifies the maximum number of possible digits. This value must be greater than zero.

union

x

Defines a simple type as a unified set of values of a specific data type.

unique

 

Defines that an element or an attribute value must be unique within a value range.

whiteSpace

x

Specifies how white spaces are handled.
The element whiteSpace is relevant to XSD validation, but is not copied to the XModule.

Related chapters:

XSD Indicators

XSD Restrictions/Facets

XML Schema Reference