Export & Transform with XSL



Hi,

        I made a little package with XSL stylesheets for transformation of Dia UML Objects (Class & 
LargePackage) to C++, Java or IDL code. Here's how it works:

# xsltproc dia-uml.xsl diagram.dia | xsltproc dia-uml2c++.xsl -
or 
# xsltproc dia-uml.xsl diagram.dia > diagram.xml
# xsltproc dia-uml2idl.xsl diagram.xml

        All classes properties are supported except templates. For packages, there is a problem since Dia 
doesn't lay out the Objects hierarchy inside the .dia file (or am I wrong anywhere?). So a little trick is 
used. An assumption is made that a diagram file contains only one LargePackage to which all classes belong. 
This package will map to a module for IDL and the package keyword in Java. I'll add C++ namespaces later.

        Thanks for trying it!

-- 
"Black holes are where God divided by zero." - Steven Wright

MaT|TaM (http://mattam.ath.cx)

Attachment: dia-uml2any.tar.gz
Description: Binary data

Attachment: pgpycq8oay9hB.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]