argouml-tigris-org.github.io

Web pages for the ArgoUML project.

From the ArgoUML wiki at argouml.tigris.org.
Wiki: XSD/Options

Configurable Options

While much of a schema can be automatically derived based on class diagrams and stereotypes, some items cannot be intrinsically derived. These items will likely require configurable options to be set by the user at either the project or application level.

Document Encoding & XML Version

XSD files, like all other XML documents include a document encoding directive which should match the means by which the file was encoded (e.g. UTF-8, ASCII, etc.). This appears in the XSD file as the following statement:

<?xml version="1.0" encoding="UTF-8"?>

In order to fully support Internationalization (I18N), the capability to change the means by which the code export is encoded should be provided to users.

The version attribute of this statement traditionally remains “1.0” therefore it is not necessary to provide the option to configure this aspect of the file at this time, although ideally, this should be made to be configurable when this practice changes in the future.

Complex Type Suffix

It is common to include a suffix such as “Type” at the end of all complex type names to denote what objects are complex type names as opposed to element names. While initially this can be defaulted to “Type”, it would be ideal to provide a configuration option at an application level to allow users to change the suffix generated by the code generation (or prevent the code generation from adding a suffix at all).

Abstract Class Definitions

Abstract class definitions can be addressed in schema through the use of either substitution groups or the choice design pattern. Ideally users are given the opportunity to specify which method they wish used in representing abstract class definitions. See the Abstracts section for further details on the two approaches. As substitution groups are far less restrictive, that should be the default.

Flatten Inheritance Structures

In some scenarios (particularly where double inheritance has been depicted in UML), the user may want to omit all inheritance and instead simply include all parent attributes directly in the children and grandchildren classes/complex types.

XSD/Options (last edited 2008-12-30 22:11:03 -0700 by mathco)