Importing XML Schema(s)

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  UML Diagrams > Additional Diagrams > XML Schema Diagrams >

Importing XML Schema(s)

To import a single XML Schema:

1.Select the menu option Project | Import XML Schema file.

xsd-imp1

2.Make sure that the Enable diagram generation check box is active and click Next, to continue.

xsd-imp2

3.Define the Content diagram options in the group of that name. The first option creates a separate diagram for each schema global element.
4.Select the compartments that are to appear in the class diagrams in the Style group. The "Show schema details as tagged values" option displays the schema details in the Tagged Value note modeling element.
5.Click Next to define the Package dependency diagram.

xsd-imp3

6.Click Finish to start the XML Schema import. The schema(s) are imported into UModel and all diagrams are available as tabs. The screenshot below shows the content of the EU-Address (complexType) diagram.

xsd-imp4

Note:A new package called All Schemas was created and set as the XSD Namespace Root. All XSD globals generate an XML Schema diagram, with the diagrams under the respective namespace packages.

xsd-imp5

 

 

To import multiple XML Schemas:

1.Select the menu option Project | Import XML Schema directory.

xsd-dir-imp1

2.Activate the "Process all subdirectories" if you want to import Schemas from all subdirectories. The rest of the import process follows the sequence of importing a single XML schema described above.

 

Note:If an XML schema includes or imports other schemas, then these schemas will be automatically imported as well.

 

Displaying tagged values - schema details

Schema details displayed as tagged values in the Tagged Value note element, can be configured using the Show Tagged Values in the Styles tab, or by clicking the "Toggle compact mode" icon at the bottom right of the Tagged Value note. This switches between the two states "all" and "all, hide empty", etc. which are shown below.

note-toggle3

Note:Selecting the tagged values from the Styles tab sets the tagged value settings project wide. Right clicking a class and selecting Tagged values | all etc., only affects the individually marked classes.

 

Show tagged values: all

Displays the tagged values of the class as well as those of the owned attributes, operations etc.

note-toggle2

Show tagged values: all, hide empty

Displays only those tagged values where a value exists e.g. fixed=true.

note-toggle

Show tagged values: element

Displays the tagged values of the class but not those of the owned attributes, operations etc.

note-toggle4

Show tagged values: element, hide empty

Displays only those tagged element values of a class, without the owned attributes, where a value exists e.g. id=123

note-toggle5

Show tagged values: in compartment

tagg-val1

Displays the tagged values in a separate class compartment.

tagg-val2

Show tagged values: in compartment, hide empty

Displays only those tagged element values of a class, without the owned attributes, where a value exists.

 

XML Schema annotation

When importing XML schemas, please note that only the first annotation of a complex- or simpleType is displayed in the Documentation window.


© 2019 Altova GmbH