Show TOC

Function documentationXSD Editor (Freely-Modeled Data Types) Locate this document in the navigation structure

 

The XSD editor enables you to define data types and data type enhancements without needing extensive knowledge of XML schema. You construct a data type in the XSD editor by using a table that returns the structure of the data type. As in XML schema, you can define both simple and complex data types (Classification: Freely-Modeled) that are automatically converted to XML Schema Definition (XSD) by the editor.

Note Note

When defining a data type, the selection of values that you can enter in the table is context-dependent. Therefore, you cannot enter invalid entries.

End of the note.

Features

General

The XSD editor comprises a toolbar, a tabular input area, and a context menu. The uppermost line in the table (the root element) determines the type of the data type:

  • Simple data type: There are no other table lines.

  • Complex data type: The subnodes of the root element determine the structure of complex data types. Elements and attributes can also be sub-nodes.

The XSD editor can automatically recognize the difference between simple and complex types by determining whether the root element has any subnodes. For this reason, the Category column is locked. The tabular input area contains the following columns for which differing values (or no values at all) are permitted, depending on the line type:

Column

Meaning

Name

Nodes inserted below the root element are represented in a hierarchy using indents in this column. The field names within a data type must not be the same. It is possible to change all field names at a later stage, except that for the root element.

Category

This column shows whether the root element has subnodes or not (see above). You cannot change values in this column.

Type

Here you select a built-in data type or reference to an existing data type for an element or attribute. You must specify a type for attributes.

Occurrence

Determines how often elements occur. The values 0 to 2147483647 are permitted. For attributes, you can determine whether the attribute is optional or required.

Deletable

A provider can explicitly communicate to a consumer at runtime that the elements of a particular data type can be deleted.

More information: Consumer-to-Provider Field Updates

Default

You can specify any default value here.

Details

You can only make an entry here if you specified a built-in type for the element or the attribute. Depending on whether the type is numerical or alphanumerical, you can select facets from the selection dialog for the column to specify the value range of the type more precisely (for example, restricting the string length).

Description

Informal description of a node.

UI Text Object

Assigns a UI text object of type Field Label to the field to be able to display the texts saved there as labels on the UI later.

For cells in which you can enter data, you can call an input dialog for the columns Type, Occurrence and Details . To change a field name below the root element, select it by clicking it. The name of the root element itself cannot be changed, however.

Note Note

The XSD Definition tab page displays the conversion of the data type to XSD using the definition in the editor. If the definition in the XSD editor is not valid, then the conversion is also not yet valid. You can also export the corresponding XML schema as a file (more information: Exporting XSD and WSDL Documents).

End of the note.

Note Note

The contents of the clipboard can only be reinserted within a data type.

End of the note.
Facets
General

In the Details column in the XSD editor, you can further restrict the value range of a built-in data type for simple data types, elements or attributes.

Facet

Meaning

enumeration

Restricts the value range to a set of individual values. The values must be separated by blanks in the XSD editor.

fractionDigits

Specifies the number of places permitted after the comma. Only xsd:nonNegativeInteger type values are valid.

length, maxLength, minLength

Exact (length), maximum (maxLength), or minimum (minLength) length of a data type. The XSD editor only permits these facets for data types that are based on xsd:string. The value of this facet must be of type xsd:nonNegativeInteger.

maxExclusive, maxInclusive

Upper limit for the value set exclusive (maxExclusive) or inclusive (maxInclusive) of the specified value. The value of this facet must not exceed the value range of the data type that is restricted by the facet.

minExclusive, minInclusive

Lower limit for the value set exclusive (minExclusive) or inclusive (minInclusive) of the specified value. The value of this facet must not exceed the value range of the data type that is restricted by the facet.

pattern

Specifies a pattern for string-based data types. The pattern must have the form of a regular expression that describes a set of appropriate character sequences.

totalDigits

Specifies the total number of digits in a number. Only xsd:positiveInteger type values are valid.

whiteSpace

Specifies how to apply white space characters (line feed, tabs, blanks, and carriage returns). Three values are permitted:

preserve: Retains all white space characters.

replace: Replaces every line feed, tab, and carriage return with a blank.

collapse: As for replace but subsequent blanks are replaced by a single blank and leading and final blanks are deleted.

More information: http://www.w3.org/TR/xmlschema-2/#rf-facets.

Regular Expressions in XML Schema

Regular expressions originate from the Unix world and are expressions that you can use to describe any type of string. For a description of regular expressions; see http://www.w3.org/TR/xmlschema-2/#regexs. Instead of repeating this definition, here are a few common examples of how regular expressions are used:

Regular Expression

Appropriate Strings (Separated by Commas and Blanks)

[abcdefg]

a, b, c, d, e, f, g

[A-Z][A-Z][A-Z]

ABC, DEF, SAP, SPD, CDU, FDP, PDS

[0-9][0-9][0-9]

007, 459, 471, 999, 879

[a-z]([0-9])*

a, b, c, d, e, i12784937, e3321, t4000, b345

[a-z]([0-9])+

a304, i20, e3012, t5, b90000

([a-z]|[0-9])+

a, ab, abc, abcdefg, 0, 1, 01, 012, 0123

When using a star (*), the character may not occur at all in the string, or it can occur an unlimited number of times. When using a plus (+), the character must occur at least once in the string. The square brackets specify the character selection.

For further examples, see http://www.w3schools.com/schema/schema_facets.asp.

Additionally, there are also special characters that can be introduced with a backslash, for example:

  • \d: A number

  • \c: A character in the sense of a character permitted for names in XML schema

Supporting Complex Data Types with SimpleContent

Complex types with simpleContent are data types with a root element that has a textual XSD type (for example, xsd:string), but that otherwise only have attributes and subelements. If you want to restrict the root element by using facets in the Details column, the XML schema standard specifies that the root element must reference a simple type as an in-between type. Otherwise, the complex type with simpleContent would be both an enhancement (due to the attributes) and a restriction (due to the facets). To simplify the definition of complex types with simpleContent, the data-type editor permits facets for the root element of such types and automatically creates a matching in-between type. This in-between type does not need to be created as a separate data type in the ES Repository, and is not visible as a separate data type there.