[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] How to define the xsi:schemaLocation with the transformation rules?

Hi Olivier,

I also have this problem.
In my case, I'm trying to execute copy rules with UML2 model handler. I'm using the UML2Copy module available at: http://ssel.vub.ac.be/viewvc/UML2CaseStudies/uml2cs-transformations/UML2Copy.atl?revision=7380&view=markup
For example, as the input model I have this:


<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:My="http:///schemas/My/_OjpXsFQoEd2ZPtml6ktJrw/0"; xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"; xsi:schemaLocation="http:///schemas/My/_OjpXsFQoEd2ZPtml6ktJrw/0 My.profile.uml#_OjpXsVQoEd2ZPtml6ktJrw">
<uml:Package xmi:id="_riPN8FQoEd2ZPtml6ktJrw">
<packagedElement xmi:type="uml:Class" xmi:id="_3JO3gFQuEd2ZPtml6ktJrw" name="class1"/>
<profileApplication xmi:id="_wqYkwFQuEd2ZPtml6ktJrw">
<eAnnotations xmi:id="_wqYkwVQuEd2ZPtml6ktJrw" source="http://www.eclipse.org/uml2/2.0.0/UML";>
<references xmi:type="ecore:EPackage" href="My.profile.uml#_OjpXsVQoEd2ZPtml6ktJrw"/>
</eAnnotations>
<appliedProfile href="My.profile.uml#_vJCTkFN6Ed2ZPtml6ktJrw"/>
</profileApplication>
</uml:Package>
<My:TestStereotype xmi:id="_6ene8FQuEd2ZPtml6ktJrw" base_Class="_3JO3gFQuEd2ZPtml6ktJrw"/>
</xmi:XMI>


Note that I have a profile application in this input model.
As a result of the UML2Copy transformaitom the output model is generated:

<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"; xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"; xmi:id="a1">
<packagedElement xmi:type="uml:Class" xmi:id="a2" name="class1"/>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="a3">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="a4" source="http://www.eclipse.org/uml2/2.0.0/UML"/>
</profileApplication>
</uml:Package>


Note that it doesn't have the xmi tag as the input model. Thus, it doesn't have the xsi:schemaLocation. As a consequence, the profile schema can't be referenced as it is in the input model.

Besides, regarding the UML2Copy transformation, someone can tell me why the "references" child of "eAnnotations" wasn't copied? And why the "appliedProfile" element wasn't copied too?

Cheers,
Bruno.