Generate GML Application Schema

After you have created a GML model using the built-in MDG Technology for GML, you can generate GML Application Schema from the model Package.

Access Extensions | GML | Generate GML Application Schema

Generate GML Application Schema



See also

Source Package

Displays the name of the selected «Application Schema» stereotyped Package.


Type in or browse for the directory into which the application schema file is to be generated.

GML Version

Click on the drop-down arrow and select the version of the GML Application Schema. Currently versions 3.3 and 3.2.1 are supported.

XML Encoding

Click on the drop-down arrow and select the XML encoding scheme to be used.

Ignore Element and Property Visibility

Click on this option to include all Classes, Attributes and Association End roles in the GML Application Schema, irrespective of their visibility (or Scope). Otherwise, only those with Public visibility will be considered for generation.

Details Source and Target Role Create and Manage Attributes


(Optional) Select an XSL stylesheet to post-process the Schema before saving it to file.

Import the required stylesheet into the project through the Resources window before selecting it in this field.


Application Schema(s)

Lists all the Application Schema Packages under the selected source Package.

Click on a Package to display its details, as well as any of its child «Leaf» stereotyped Package details, in the Package Details panel.

GML Application Schema will not be generated for any Package in the list that is unchecked.

Package Details

Against each of the child «Application Schema» and (optionally) «Leaf» stereotyped Packages (if any), enter a filename. To do this, double-click on the Package name in the list and, on the 'Package Details' dialog, review or complete these fields:

  • 'Stereotype' - The stereotype of the selected Package
  • 'Filename' - (Optional for a «Leaf» stereotyped Package) Click on the button and type the name of the .xsd file into which the GML Application Schema is to be generated; the filename must be in the same file path as selected in the 'Directory' field on the 'Generate GML Application Schema' dialog
  • 'Namespace' - (Not required for a «Leaf» stereotyped Package) Type in the namespace for the selected Package
  • 'Namespace Prefix' - (Not required for a «Leaf» stereotyped Package) Type the abbreviated value that represents the Namespace

Note that:

  • The value of the 'Filename' field will be saved as the value of the tag xsdDocument on the Package
  • The value of the 'Namespace' field will be saved as the value of the tag targetNamespace on the Package
  • The value of the 'Namespace Prefix' field will be saved as the value of the tag xmlns on the Package


Generate the GML Application Schema for each of the checked Packages in the Package Details panel.

View Schema

Display the generated GML Application Schema for the selected Package in the Package Details panel.


Close the 'Generate GML Application Schema' dialog.


Display this Help topic.


  • The MDG Technology for GML is available in the Professional, Corporate, Business and Software Engineering, System Engineering and Ultimate editions of Enterprise Architect
  • A «CodeList» stereotyped Class with the tag 'asDictionary' set to True will be exported as a separate XML file to the directory specified in the 'Directory' field, with the filename CodeList_<classname>.xml (where <classname> is the name of the «CodeList» stereotyped Class)
  • Using the configurable file GMLStereotypes.xml in the Sparx Systems > EA > Config > GML folder, you can specify aliases for the standard GML stereotypes; the GML Application Schema Generator will also consider these aliases during Schema generation
  • Association Class is specific to GML 3.3; when generating GML 3.2.1 Application Schema, the Association and Class of an Association Class are treated as separate entities

Learn more