QVT : Element Name Filtering [message #535696] |
Tue, 25 May 2010 10:04 |
Vishal seth Messages: 32 Registered: April 2010 |
Member |
|
|
Hi,
Trying to do a basic transformation using QVT. But not sure how does class name filtering happens as far as ecore model is concerned.
Have a sample instance file which looks something like where
<?xml version="1.0" encoding="UTF-8"?>
<myDsl:Namespace xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:myDsl="http://www.xtext.org/example/mydsl/MyDsl">
<elements>
<case name="Name">
</case>
</elements>
</myDsl:Namespace>
The main method of QVT file is as:
main() {
source.rootObjects()[Namespace] -> map NamespaceToNS();
}
But this context does not get evaluated. But if i use Element as class name then this is evaluated & it moves to the map context. I tried few logging statement to see what is the class name by using self.metaClassName() which gives Namespace. Hence not sure whether missing somewhere on the syntax front or the way ecore model instance file is parsed in some different way.
Thanks.
Vishal
|
|
|
Powered by
FUDForum. Page generated in 0.03406 seconds