Home » Archived » M2M (model-to-model transformation) » [QVTO] modeltype with platform URI doesn't work, but with namespace URI does
[QVTO] modeltype with platform URI doesn't work, but with namespace URI does [message #528115] |
Mon, 19 April 2010 12:17 |
Eclipse User |
|
|
|
Originally posted by: dhendriksREMOVE.THIS.REMOVE...THIStueDOTnlREMOVE..THIS
Hello all,
the following QVTo transformation:
<code>
//modeltype cif uses "platform:/resource/cif2.1.1/model/cif.ecore";
modeltype cif uses "http://cif.tue.nl/cif-2.1.1";
transformation modeltype_test(in in_model : cif, out out_model : cif);
main() {
var x : Set(Element) := in_model.rootObjects();
var y : Set(Element) := x[Specification];
log('x', x);
log('y', y);
// What I'm trying to do...
in_model.rootObjects()[Specification]->xmap transSpecification();
}
mapping Specification::transSpecification() : Specification {
// Something should go here...
}
</code>
works. It gives me this output on the console:
x, data: [cif.impl.SpecificationImpl@1beafe8]
y, data: [cif.impl.SpecificationImpl@1beafe8]
However, If I change the modeltype line (uncomment the one and use the
comment the other, thus using the platform resource URI instead of the
namespace URI), I get this output on the console:
x, data: [cif.impl.SpecificationImpl@13be6c8]
y, data: []
The 'cif.ecore' file exists in my workspace, in the 'cif2.1.1' EMF
project, in the 'model' directory. I created the model, edit, and editor
code for it. I exported all those projects etc.
For some reason, using platform URI, the filtering to the
'Specification' class doesn't match my input, while using namespace URI
it does.
I use eclipse-modeling-galileo-SR2-incubation-linux-gtk-20100301.
Is this a bug, or am I doing something wrong?
Thanks in advance,
Dennis
|
|
| | |
Goto Forum:
Current Time: Fri Sep 20 21:39:01 GMT 2024
Powered by FUDForum. Page generated in 0.03675 seconds
|