Importing XML Schemas
You can import either a single schema file into UModel, or all schemas from a directory. If a schema includes or imports other schemas, these are imported into the model as well.
To import a single XML Schema:
1.Select the menu command Project | Import XML Schema file.
2.Click Browse and select the source schema to import. For the scope of this example, you can use the following schema: C:\Users\<username>\Documents\Altova\UModel2023\UModelExamples\Tutorial\OrgChart.xsd.
3.To generate diagrams from the schema, make sure that the Enable diagram generation check box is selected and click Next.
4.To create a separate diagram for each global component in the schema like in this example, select the Generate diagrams for XSD globals option. To open all generated diagrams after import, select Open diagrams. Options from the "Style" group let you define the compartments that appear by default in diagrams for each schema component. The Show schema details as tagged values option displays the schema details as Tagged Values.
5.Click Next. To generate a Package dependency diagram like the one in this example, select the Generate Diagram check box.
Once UModel completes importing the schema, a new package called All Schemas is created and set automatically as the "XSD Namespace Root". The OrgChart.xsd schema used in this example imports types from another namespace, more specifically, from the ipo.xsd schema. Consequently, both schemas appear in the Model Tree window after import, under their respective namespaces:
If you have selected the Generate diagrams for XSD globals check box, all XSD global components generate an XML Schema diagram, and the diagrams appear under the respective namespace packages, like the "Address (complexType)" diagram in the image above.
To import multiple XML Schemas:
1.Select the menu command Project | Import XML Schema directory.
2.To import schemas from all subdirectories of the selected directory, select the Process all subdirectories check box. The rest of the import process is the same as described above for a single XML schema.
Changing the display of tagged values
After importing an XML schema, certain schema details may appear as tagged values on the diagram, if you have selected the Show Schema Details as Tagged Values option during the import.
You can configure whether such details are to be shown or hidden from the diagram. To do this, right-click the element and select Tagged Values | <option> from the context menu. You can configure the display of tagged values not only individually for each element, but also globally at project level. For more information, see Showing or Hiding Tagged Values.