Hey all,

Okay, so I've recently started working with AndroMDA and really like 
Poseidon 2.0 for making UML, and was a little dismayed by the lack of 
compatibility between the two. So I wrote a little stylesheet that 
can be applied within the ANT script, to remove the offending 
UML:Diagram elements from the .xmi before AndroMDA gets hold of it. 
Here's what the .xsl file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:UML="org.omg/UML/1.3" version="1.0" 
exclude-result-prefixes="#default">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
        <xsl:apply-templates/>
</xsl:template>

<xsl:template match="@* | node()">
        <xsl:if test="not(name()='UML:Diagram')">
        <xsl:copy>
                <xsl:apply-templates select="@*"/>
                <xsl:apply-templates select="node()"/>
        </xsl:copy>
        </xsl:if>
</xsl:template>

And then I wedged it in to my ANT script just prior to the AndroMDA 
running:

   <target name="do-style">
    <style in="/home/neal/java/TVTrackerModel/TVTracker.xmi"
        out="${basedir}/src/uml/model.xmi"
        style="${basedir}/src/uml/poseidon-2.xsl"
        force="no">
    </style>
   </target>

   <target name="compile-uml" depends="init,do-style">

Then, in Poseidon, I just export to XMI, and then do the XSL transform 
on that. Hope this helps. Now I'm busy writing some modifications to 
the cartridges, I'll ask some questions on that in another post.

Cheers.

-Neal



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to