A transformation configuration has .tc as a file name extension, and contains the information that the transformation uses to generate the output that you expect. A transformation configuration also contains information that is specific to a particular type of transformation. To edit an existing transformation configuration, in a view that shows the workspace resources, double-click a transformation configuration file, which opens the transformation configuration editor.
To simplify working with the transformation configuration file, save the configuration file in the project that contains the elements to transform.
To configure a UML-to-XSD transformation:
| Option | Description |
|---|---|
| Visual merge | Displays user prompts and warning dialog boxes when models merge. |
| Silent merge | Suppresses prompts and dialog boxes when models merge. |
| Do not merge: Overwrite files without a warning | Overwrites all conflicting files automatically. |
| Do not merge: Warn before overwriting any files | Prompts you for confirmation before conflicting files are overwritten. |
| Automatically add new elements to the target model | Adds new elements without prompting you for confirmation. This option is enabled when the Visual merge option is selected. |
| Save changes before validating files | Requires you to save merged models before allowing file validation. This option is enabled when the Visual merge option is selected. |
| Automatically validate saved changes | Once a merged model has been saved, this option causes the Validate Merged Result Session window to open. This option is enabled when the Visual merge option is selected. |
The log file provides information about the source elements, the target elements, and the rules that the transformation applies to transform the source elements. If the transformation transforms many elements, you might experience decreased performance while the transformation generates the log file; therefore, you should only generate a log file for debugging purposes.
To display the warnings that occurred when the transformation ran, select the Show warnings in the Report dialog box check box.
By default, the transformation converts a nested class into an anonymous type only if it has an association relationship with the nesting class. You can specify that the transformation converts all nested classes into anonymous types so that the generated XSD type corresponds to the elements that the nested classes contain.
For example, if the top-level package name is com.xyz.test, the schema would be generated in a folder, com/xyz/test, with the namespace of http://test.xyz.com/ and a Java package name of com.xyz.test.
By default, the transformation generates a schema for each package and its contents that you select in the source model. The UML-to-XSD transformation also generates schemas for nested packages. However, the UML-to-XSD (Deprecated) transformation does not generate schemas for nested packages.
For example, you can choose not to generate a schema for the classes in your source model that are still under development. The transformation processes all classes by default.
The value of the target namespace can be a string, such as http://www.mycompany.com/PurchaseOrder. The value of the prefix can be a string, such as po. If you apply the «schema» stereotype of the XSD transformation profile to a package in the source model, you can also specify a value in the target namespace and target namespace prefix property of the stereotype. The target namespace and target namespace prefix values of the «schema» stereotype overwrite the target namespace properties that you specify in this task.
To overwrite the target namespace and target namespace prefix for certain packages, you can apply the «schema» stereotype for these packages and specify a different value in the target namespace and target namespace prefix properties of the «schema» stereotype.
The location for the schema file can be any folder in the target container. The target container is specified on the Source and Target page. You can also specify a path under the target container to which to add new folders. New folders are created when the transformation is completed.
To support XSD polymorphism and substitution groups, select the com.ibm.xtools.transform.uml2.xsd.globalElements check box.