How code an UML model into an XML document
Hi,
I'm developing a tool for data modeling, and I have just added commands for exporting both xml-schema and xmi-schema. Now I want to add a command to export the model in an XML file describing it as an UML model, so the user can import it with another tool if he/she want.
That was not a good idea: I have spent a lot of time jumping up and down through a lot of OMG/UML specs documents (like a crazy frog), but I havent't found any document that can respond to my simple question: "Which is the exact syntax of an XMI document describing a simple UML model"?
I know that my XMI doc should be like this:
<xmi:XMI .....(namespaces, declarations, etc)>
<(documentation, extensions,etc... and other boring stuff)>
<!--- here really start your model -->
<UML:Model......>
<!--- REAL USEFUL PART: classes, association ends, attributes,.... ---->
</UML:Model>
</xmi:XMI>
My problem is on the "REAL USEFUL PART" (!), where I find specs that describe exactly what I must insert to describing a very simple model?
My models are not complicated: only few classes with attributes with fixed multiplicity and a some composition relationships between them. I know yet that i must use elements like "uml:ownedMember", "uml:ownedAttribute", "uml:associationEnd", and so on... but I cannot find a document describing them (on zvong.org there is only a list and nothing more).
The OMG v2.1.2 document (after 700 pages) states only that models "...are serialized in XMI 2.1 according to the rules specified by the MOF 2.0/XMI Mapping"
Obviously (?) on the referred document there is no trace on how a poor developer must write it... there is only a lot of vaporspecs for vaporware...
Does anybody know where I can find a "real" XML specs document for UML models? Or a library for producing them from the scratch?