You can import one or more XML Schema files into a UML model, where XSD structures are mapped to UML packages, classes, data types, and associations. Large sets of interrelated schemas may be imported (e.g. several hundred XSD files) and xsd:import or xsd:include statements will be processed and imported into UML packages. The UML profile for XML Schema is applied to the new UML model for representing additional metadata, e.g. the schema target namespace URI.

  1. If you are starting hyperModel with a new empty Eclipse workspace, then you must create a new project before starting the XSD import wizard. This project, or a folder within it, will hold the imported UML model. You may also add the XSD source files into a folder in this project. To create a new project, choose: File > New > Project, then choose General > Project. To create a new folder wihin a project, right-click on the Project and choose: New > Folder.
  2. Start the wizard using: File > Import XSD…
  3. Select the XSD file(s) to import. If your schemas are included in an Eclipse workspace project, then select that folder before starting the wizard and all contained schemas will be automatically added to the import list. See screenshot below. If you choose the option to Add Folder…, then all XSD files included in that folder and its child folders will be added to the list.
  4. Select the Root package that specifies which file folder is mapped to the root UML model package. Large sets of XSD files are often organized in a file folder hierarchy, and it is usually desirable to reflect that same folder hierarchy in the UML model packages. To do this, you must tell the wizard which file folder should be the root of the UML package hierarchy (usually the most specific file folder that contains all schemas and folders to be imported).
  5. You may optionally import the schemas into an existing UML model. When you are new to using this wizard, leave the Model selection empty and allow the wizard to create a new model.
  6. On the second page, select a project folder where the new model will be created and enter the new model file name, e.g. FpML-4-2.uml
  7. On the third page, leave the default values for Model Object and XML Encoding, unless you know that an alternative XML Encoding is required for your schema character set.
  8. On the fourth page, choose import options that may affect the resulting UML model element naming. See the second screenshot below.
    • Global elements: leave this unselected unless you know that your schemas use all global elements for content. Currently, this does not affect the UML model import structure, but simply sets a profile stereotype property.
    • complexType suffix: If all of your schema complexType names use a common suffix (e.g. “Type”) then enter it here and that suffix will be removed from complexType names when mapped to UML class names. That suffix is retained in a model stereotype and will be re-appended to class names when generating XML Schemas from this model.
XML Schema import options that guide mapping to UML: