Evolving EMF Models

I recently wanted to evolve one of my EMF models. I started writting Java code for translating the EMF model and tweeted about this.

Seems like their are several very good options available for translating EMF models:

Even though ALT and COPE looked very interesting I always wanted to learn how to create my own XSLT style sheets (after all I’m a big Docbook user and David Carver was kind enough to took my XSLT Ant task as a starting point for the Ant task in the Eclipse XSL project).

In addition I believe XSLT can also be handy for me for other transformations in the future

Using XSLT was surprisingly easy. I believe one of the reason are the excellent Eclipse XSL Tools.

I only needed to add a few more hierarchies and to change a tag in my EMF model. In case you are interested I have describe the usage of XSLT for such simple cases here: XSLT with Eclipse XSL Tools – Tutorial.

Thanks to André Dietisheim (@adietisheim), Ian Bull (@irbull),David Carver (@kingargyle), BernhardMerkle (@BernhardMerkle) Michael Kay (@michaelhkay) and Jens von Pilgrim (@jensvp) for their help and advice via twitter.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , . Bookmark the permalink.

8 Responses to Evolving EMF Models

  1. Bernd says:

    Hi Lars,

    the problem with the XSLT stuff is that you are doing the transformation on the persistence format. This will only work until you are using the (less performant) XML or XMI resources. I’d go with ATL, QVT, Xpand or Cope, depending on your needs…


  2. Thomas says:

    I was puzzled about the meaning of “Eclipse ALT” project. You certainly mean ATL (Atlas Transformation language) 🙂

    I worked with XSLT for the plain XML transformation and with ATL for the model transformation.

    IMHO I would use ATL for dealing with EMF model (instances).

  3. William says:

    Just a precision: you misspellt “ALT”, in fact it’s ATL (stands for Atlas Transformation Language). 😉

  4. Marc Dutoo says:

    Hi Lars

    Feels like model evolution is fated to become a prominent topic…

    At Eclipse JWT (Java Workflow Tooling http://eclipse.org/jwt ) we’ve written an ATL-based converter to ease migrating existing models to new versions of our EMF metamodel. Basically, when trying to open an older model, it deduces which ATL transformations have to be applied before being able to open it.

    We also do XSL but on very specific topics, however, I didn’t know about COPE.

    Maybe an interesting talk topic for the next EclipseCon ?


  5. admin says:

    Sorry for misspelling ATL, I corrected it.

  6. Tobias says:


    which XSLT-processor do you use? Do you use XSLT 2.0?

    Cheers, Tobias.

  7. Lars Vogel says:

    @Tobias: The one included in the Eclipse XSL project. Not sure which version this is.

  8. Marc Dutoo says:

    Hi Lars, all

    Well, actually talked about metamodel evolution at EclipseCon last week in the end. A not-so-surprising 2/3rd of the room was full and provided interesting questions, even met Sven of the Edapt project proposal that also includes COPE contributions (see http://www.eclipse.org/proposals/edapt/ ).

    Session and slides at http://www.eclipsecon.org/2010/sessions/?page=sessions&id=1207

    So all in all thanks for helping provide the idea !


Comments are closed.