[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[henshin-dev] Matching Nodes with a specific xsi:type
|
Hi all,
I am sorry for my frequent questions in the last days. I am still working
on the transformation of models that are extended with EMF Profiles. I
cannot find instances of specific stereotypes. They are discriminated by
"xsi:type". I hope anyone of you can give me a hint towards working rules.
I have a base meta model with an EClass "BaseElement". The BaseElement can
be extended by a Stereotype "SomeStereotype".
I have the following base model: (The following examples are shortened for
readability reasons)
<examplemodel:BaseElement/>
I have the following "profile application":
<emfprofileapplication:ProfileApplication>
<stereotypeApplications xsi:type="myprofile:SomeStereotype">
<appliedTo
href="platform:/resource/henshin.examples.transformation/My.examplemodel#/"
/>
<extension
href="platform:/resource/henshin.examples.profile/src/profile.emfprofile_di
agram#_xCM2MPa9EeKxTZSMePhyEg"/>
</stereotypeApplications>
<importedProfiles nsURI="http://exampleprofile.org/1.0"/>
</emfprofileapplication:ProfileApplication>
I now load these models and their respective meta models in Henshin. I can
easily find matches for the following Nodes:
* BaseElement
* ProfileApplication
* ProfileImport (matches the "importedProfiles" relationship)
* StereotypeApplication (matches the "stereotypeApplications" relationship)
I want to find a match to all "StereotypeApplications" with
xsi:type="SomeStereotype".
Trying to match a "SomeStereotype" node gives me no results.
When I create a rule with a "StereotypeApplication" to preserve, I cannot
specify the type, neither as attribute, nor as reference. This is probably
because xsi:type is not an ECore element.
Is there any way to match Elements with a specific "xsi:type"?
Thank you very much for your help so far.
Best regards
Marco