Welcome to the tutorial trail for XML engineering in 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 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:
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.
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.
An associative overview of the schema as UML Associations representing the "wrapped" XSD elements with indirect XSD references is given.
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.
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:
It manages to follow the indirect XSD element references fine.