Input model to be used by Operational QVT Interpreter [message #904847] |
Wed, 29 August 2012 09:10 |
Eclipse User |
|
|
|
Hello,
I'm transforming from an XSD model to an internal Ecore model. When
transforming programmatically, everything is fine:
- load the XSD source using XsdEcoreBuilder
- construct a model registry with all relevant IN/OUT models
- load XML input using my model registry
- run TransformationExecutor using my model registry
However, when I want to debug the QVTo script using the Operational QVT
Interpreter, it seems that the input XML file is loaded as an
XMIResource, and loading the mode extent fails.
Note that by means of a small plugin I have loaded the XSD model into
EMFs global model registry, so it is known to QVT. (Otherwise I couldn't
be editing the script anyway).
What can I do to enable debugging?
Thanks
Marius
|
|
|
Re: Input model to be used by Operational QVT Interpreter [message #904860 is a reply to message #904847] |
Wed, 29 August 2012 09:32 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
No idea.
But since you have a version that works and one that doesn't, you just
need to pin down the difference.
It seems that you have already identified that an XMIResource is in use
when you want something else, so
your factory registrations, probably file-extension to Resource factory
are wrong. If this isn't obvious
set a breakpoint on the erroneous XMIResource construction and gradually
work back to where
it came from. Better, break in ResourceSet.getResource and work forwards.
Regards
Ed Willink
On 29/08/2012 10:10, Marius Gröger wrote:
> Hello,
>
> I'm transforming from an XSD model to an internal Ecore model. When
> transforming programmatically, everything is fine:
> - load the XSD source using XsdEcoreBuilder
> - construct a model registry with all relevant IN/OUT models
> - load XML input using my model registry
> - run TransformationExecutor using my model registry
>
> However, when I want to debug the QVTo script using the Operational QVT
> Interpreter, it seems that the input XML file is loaded as an
> XMIResource, and loading the mode extent fails.
>
> Note that by means of a small plugin I have loaded the XSD model into
> EMFs global model registry, so it is known to QVT. (Otherwise I couldn't
> be editing the script anyway).
>
> What can I do to enable debugging?
>
> Thanks
> Marius
|
|
|
Re: Input model to be used by Operational QVT Interpreter [message #904873 is a reply to message #904860] |
Wed, 29 August 2012 09:44 |
Eclipse User |
|
|
|
On 29.08.2012 11:32, Ed Willink wrote:
> It seems that you have already identified that an XMIResource is in
> use when you want something else, so your factory registrations,
> probably file-extension to Resource factory are wrong. If this isn't
> obvious set a breakpoint on the erroneous XMIResource construction
> and gradually work back to where it came from. Better, break in
> ResourceSet.getResource and work forwards.
In my startup plugin that loads and registers the XSDs I have now added
this line:
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap()
.put("myxml", new GenericXMLResourceFactoryImpl());
I've renamed the input file to have the .myxml suffix.
Now it works!
Regards
Marius
|
|
|
|
Powered by
FUDForum. Page generated in 0.24834 seconds