Altova UModel 2025 Professional Edition

New XML Schema projects in UModel have the structure illustrated below. This structure is created automatically the first time when you add an XML Schema diagram to a new UModel project.

um-xsd-project-structure

The "Root" and "Component View" packages are common to any UModel Project and cannot be deleted. "Root" is the topmost level under which any other packages are added, and "Component View" is used for code engineering (in this case, importing or generating schema files).

 

The "XSDNamespaceRoot" package includes all the namespaces used by your schema(s). To turn a package into an XSD Namespace Root, right-click it and select Code Engineering | Set as XSD Namespace Root from the context menu. If you import an existing XML schema into the project, this package is called "All schemas" by default.

 

The "XSDTargetnamespace" package is an XML Schema namespace. Multiple such namespaces may exist under the same XSD Namespace Root. To turn a package into a namespace, first select the package, and then select the «namespace» property (stereotype) in the Properties window.

 

"XSDSchema" is a schema, or, in UML terms, a class with the «schema» property (stereotype) selected in the Properties window.

 

XMLSchemaDiagram1 is the actual diagram that describes the schema's model. You can create XML Schema diagrams under an XSD Namespace Root, under an XML Schema Namespace, or under an XML Schema. In the example project illustrated above, the diagram is created under the XML schema.

 

The XSD Profile enables all the types and structures required to work with XML Schema in the project. If your project does not have this profile, you will be prompted to include it whenever you create a new XML Schema diagram. You can also add the XSD profile to a project explicitly, see Applying UModel Profiles.

 

Creating XML Schema diagrams

To create a new XML schema diagram:

 

1.Do one of the following:

a.Right-click a package in the Model Tree Window and select XML Schema Diagram from the context menu.

b.Right-click "Diagrams" or "XML Schema Diagrams" in the Diagram Tree Window and select New Diagram | XML Schema diagram from the context menu. A dialog box opens asking you to select the owner of the diagram. Select a package where the diagram should be stored, and click OK.

2.If the current UModel project does not include the XSD profile, a dialog box opens asking you to include it. Click OK to include the XSD profile into the current project, see also Applying UModel Profiles.

 

Adding new XML Schema elements

To add XML schema elements to a diagram:

 

Click a specific toolbar button, and then click inside the XML Schema diagram.

um-xsd-toolbar

To insert multiple elements of the same type, hold down the Ctrl key and click multiple times in the diagram.

 

As stated above, XML Schema diagrams can be created at various levels in the project's structure. If the diagram is at a level which does not allow placing a particular element, certain toolbar buttons are not meaningful and they show a tooltip with information instead of adding the element.

 

The table below lists all the toolbar buttons and their purpose.

 

um-ic-xsd-namespace

XSD Target Namespace

Adds an XSD target namespace. Clicking this button is meaningful if the diagram was created directly under an XSD Namespace Root.

um-ic-xsd-schema

XSD Schema

Adds an XML Schema Definition (XSD). Clicking this button is meaningful if the diagram was created under an XSD target namespace.

um-ic-xsd-global-element

Element (global)

Adds a global element to the diagram. When you add an element, a property with the same name as the element is automatically generated in the attributes compartment. Set the property type to set the element's type.

um-ic-xsd-group

Group

Adds a named model group to the diagram.

um-ic-xsd-complex-type

Complex Type

Adds a global complex type to the diagram. In UML terms, this is a class that has the «global» and «complexType» stereotypes applied.

um-ic-xsd-complex-type-simple-content

Complex Type with Simple Content

Adds a global complex type with simple content. In UML terms, this is a data type that has the «global», «complexType», and «simpleContent» stereotypes applied.

um-ic-xsd-simple-type

Simple Type

Adds a global simple type.

um-ic-xsd-list-type

List

Adds a list type.

um-ic-xsd-union

Union

Adds a union type.

um-ic-xsd-enumeration

Enumeration

Adds an enumeration.

um-ic-xsd-attribute

Attribute

Adds an attribute.

um-ic-xsd-attribute-group

Attribute group

Adds an attribute group.

um-ic-xsd-notation

Notation

Adds a notation type.

um-ic-xsd-import

Import

Adds an import relationship.

um-ic-xsd-include

Include

Adds an include relationship.

um-ic-xsd-redefine

Redefine

Adds a redefine relationship.

um-ic-xsd-restriction

Restriction

Adds a restriction relationship.

um-ic-xsd-extension

Extension

Adds an extension relationship.

um-ic-xsd-substitution

Substitution

Adds a substitution relationship.

um-ic-comment

Comment

Adds a comment. Comments are converted to annotations when you generate the schema file from the model. You can specify the annotation type by selecting the required stereotype from the Properties window.

um-ic-note

Note

Adds an explanatory note.

um-ic-note-link

Note link

Links a note to some other element on the diagram.

 

For step-by-step schema modeling instructions, see Example: Create and Generate an XML Schema.

© 2018-2024 Altova GmbH