views:

111

answers:

2

hi.

I'm trying to transform some uml diagrams (of singleton , AbstractFactory ...) to Z specification , first i transformed my uml diagram to an xml file using starUML then i used an xsl program and saxon to transform my xml file to .tex( for Z ) , but it didnt work . if someone has an idea about how the xsl program should be written (just maybe the steps) that will be great.

thanks

+2  A: 

I would say, this is a generally a very bad idea. There are many different formats for storing UML. XMI is a standard, however there are afaik at least three different versions and they are quite complex. Transforming XML to TeX using XSLT must be as well quite a big hurdle, especially when you are trying to get Z specifications, which are afaik functional and procedural and UML is based on object oriented programming. I think they might be a better way to achieve what you want. Take for example Maude for Eclipse, which can generate Maude specifications (algebraic data type specifications) from EMF (Eclipse Modeling Framework) based models, which can be also UML2 as found in Eclipse tools.

Gabriel Ščerbák
It seems Maude for Eclipse might be bit-rotten...they mention Eclipse 3.2, and the download site isn't accessible right now. Do you know more about this?
ShiDoiSi
Check out successor: http://www.cs.le.ac.uk/people/aboronat/tools/moment2/
Gabriel Ščerbák
+1  A: 

Instead of trying to write a XSLT transformation, it would be much better to write a model to text transformation. Given the UML model represented as an instance of the UML metamodel (kind of a AST) you could write an Model to text transformation that traverses the UML model and generates the corresponding text. There are several Eclipse projects for this.

Another solution (neater but also more complex) would be to define the metamodel of Z and write a model to model transformation between both metamodels.

Jordi Cabot
...this could be a good solution combined with TeXlipse...
Gabriel Ščerbák