Projects: XmiTransform, convert XMI to source code

The concept

XMI Transform is a tool written in PHP (5) to convert XMI file to source code or source code to XMI file.The purpose is to provides a simple access to source code generation, which is, in general, the first thing we need in a MDA approach.

To do so, XMI Transform is based on XSL transformation and a “rule descriptor” in XML that simply helps to make a link between severals xsl stylesheets (one that enerate package name, one that build classes source code, etc.)

However, transforming is a two step work and xsl stylesheet are the first step.The next step is to make use of what the stylesheer provides (eg, make directories or write files).
This step is not as easy as transformation because it needs to be developed using PHP code. Such a thing is called an “engine”. For simple XMI to source transformations, the “Generic” engine will do the job fine. Nevertheless, if you need to handle merge over existing source code, or any other job others than making dir or writing file, you will need to write your own engine.
But don’t be affraid, the main philosophy of XMI Transform is to keep things simple or users and developers. The code is fully object oriented and well documented.

Today status

XMI Transform is very young, but source code generation works fine. It is easily possible to make your own code generator.

Transforming Source code to XMI is not working for now. But as it needs to parsesource code, specific read engines will be required for each language.

Changes in latest release

better php_zend model

cleaned up the model code and splitted classContent.xsl in 3 files. It’s a little better now.

added support for implicit dependency from extended class or implemented interface

added support for BOUML ‘entity’ stereotype to php_zend_model. They generate automatically zend_db_table_abstract

derived classes with composition support (generate $_dependentTable and $_referenceMap, still need testing…)

added support for BOUML ‘control’ stereotype to php_zend_model. They generate automatically zend_controller_action