Prev | Next |
Generate XSD
When you have developed your XML Schema model, either as an abstract Class model or a tailored XSD Class model, you can forward-engineer it into W3C XML Schema (XSD) files using the Generate XML Schema feature. As an XML Schema corresponds to a UML Package in Enterprise Architect, XML Schema generation is a Package-level operation.
You define the location of the file into which the XML Schema is to be generated, in the Schema Package element in your model.
Access
Ribbon |
Code > Schema > XSD > Export an XML Schema (XSD) File |
Generate Schema files
Option |
Action |
See also |
---|---|---|
Encoding |
Either:
|
|
Generate global element for all global ComplexTypes ('Garden of Eden' style) |
Selected by default to generate Schema in the Garden of Eden style, containing a global element. Clear the checkbox if you want to omit the global element. |
Generate Global Element |
Generate XSD for Referenced Packages |
Select the checkbox to generate Schema for Packages that are referenced by any of the Packages selected on this dialog. |
|
Prompt when missing Filename |
Select the checkbox to prompt, during Schema generation, for a filename for a referenced Package if the path into which to generate the Schema file is missing. This option is not available if the 'Generate XSD for Referenced Packages' option is not selected. |
|
Use relative-path to reference XSDs (if 'schemaLocation' tag is empty) |
Select the checkbox to use a relative-path in the XSD import (or XSD include) statement when referencing external Packages, provided that the schemaLocation tag is empty on the referenced Packages. You set the 'Schema File' field on the 'XSD Schema Properties' dialog (the element 'Properties' dialog for a Schema element) for the referenced and referencing XSDschema stereotyped Packages, so that the relative-path is correctly determined. |
Schema Package |
Generate XSD for Child packages |
Select the checkbox to generate schema for child Packages of the selected Package, and then select either:
The list-box shows, for each Package, the Package name and the file path into which the schema file can be generated (if set). To change the file path for a Package, double-click on the entry in the list-box and type in or browse for the new file path in the prompt field. If the Package has a filepath already set, its checkbox is selected by default, to generate an XSD schema; if you do not want to generate an XSD schema from that Package, you can deselect the checkbox. If you select the checkbox against a Package that does not have a filepath set, the prompt automatically displays for the filepath. |
|
Generate |
Click on this button to generate the Schema for each of the Packages selected in the list-box. |
|
Close |
Click on this button to close the dialog, without saving your option selections. |
|
View Schema |
Click on this button to view the generated Schema for a Package highlighted in the list-box. |
|
Progress |
Check the progress of Schema generation. |
Learn more