Overview of Magicdraw UML for XML engineering

Welcome to the tutorial trail for XML engineering in MagicDraw UML


Sorry, tutorial is incubating, coming soon !

 

XML Schema reverse-engineering examples for MagicDraw UML

Magicdraw UML has powerful facilities for reverse engineering XSD files of the XML Schema Language into adapted class diagrams with XSD stereotypes.


 

Reverse and analysis of the unitsml.nist.gov XML Schema in MagicDraw UML15.0

Reverse of http://unitsml.nist.gov/Schema/unitsmlSchema-0.9.7.xsd.

Note use of UML2 Components as analysis wrappers to construct ana analysis metamodel.

From the perspective of reverse-engineering the NIST UnitsML schema into UML, the heavy use of XSD element references (and the lack of XSD inheritance) is unfortunate; the UML2 wrapper Components afford a mechanism for translating (manually) the XSD references into UML associations. Throughout the diagrams in this trail I have used the following tricks:

  • Indirect references from attributes of reverse-engineered XSD complex types to other complex types are mapped using a <<ref>> Dependency (in blue).
  • An Association is created from each source wrapper Component to the matching target wrapper Component to construct a wrapping metamodel in UML
  • A <<rep>> Dependency (in purple) is created from the Association between wrappers to emphasise that it represents and indirect XSD element reference.

I do not recommend this as a general strategy, I've only used this trick enough here to provide an overview sufficient for the discussions of the SysML working groups.

 

Quantity


Dimension

Note that only Quantity has a Dimension. (Unit derives its Dimension via a reference to Quantity.)

The XSD references to the base units have not been decomposed to UML Associations. 

Unit


UnitsML wrapper overview (manually constructed schema)

An associative overview of the schema as UML Associations representing the "wrapped" XSD elements with indirect XSD references is given.

UnitType.xsd

The reverse-engineered XSD UnitType and System elements with the (rather complicated) indirect references shown as Dependencies; in the end a single Aossciation between wrapper Components represents the entire thing.

EnumeratedRootUnit


Appendix: Netbeans IDE XML Schema views of UnitsML

Since the indirect XSD element references in

http://unitsml.nist.gov/Schema/unitsmlSchema-0.9.7.xsd

are difficult to reverse engineer into UML
I present here some screenshots of some of the main elements
represented in the Netbeans IDE XML schema system.

Netbeans IDE offers three XML schema views:

  1. regular code source view with markup
  2. a schema Design tree view with open/closable nodes
  3. a powerful "cascading columns" Schema view

It manages to follow the indirect XSD element references fine.

Dimension (design view)


Quantity (cascading schema view)


Quantity (design view)


Unit (cascading schema view)


Unit (design view)