Using QVTo with XSD [message #901298] |
Fri, 10 August 2012 16:40 |
Tex Iano Messages: 99 Registered: February 2012 |
Member |
|
|
Hi,
I want to use QVTo with XML documents based on a lot of XSDs. When I tried to use QVTo programmatically, I've seen that it does not work directly with XSDs, instead it requires Ecore and generated model code. Because I had to apply this command:
EPackage.Registry.INSTANCE.put(WSDLPackage.eNS_URI, WSDLPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(SoaMLPackage.eNS_URI, SoaMLPackage.eINSTANCE);
In this example I use WSDL and SoaML. This is necessary to register the Packages with a specific URI.
However, I tried it with some XSDs (not mine, are XSD of various vendors) and often the Ecore generation and code generation failed. For example when I try to use the WSDL XSD from the OMG it does not work.
So, is there any possibility to directly work with XSDs? Or is it always necessary to create the model code?
Regards,
Tex
|
|
|
Re: Using QVTo with XSD [message #901318 is a reply to message #901298] |
Fri, 10 August 2012 18:55 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
Almost all Eclipse modeling tools are based on EMF, so if some basic EMF
functionality such as loading XSDs is failing it will fail in any tool
that offers direct XSDs.
In some sense, the XSDs you are trying to use are broken. Ignoring this
problem is just going to cause more problems.
If you want to use QVTo (or any other Eclipse transformation tool), you
will find it much easier if you start by providing yourself with a bulk
XSD to Ecore translator that works. You may need to do an XSD to XSD
transformation to start with, or just learn to use EMF's XSD flexibility.
Regards
Ed Willink
On 10/08/2012 17:40, Tex Iano wrote:
> Hi,
>
> I want to use QVTo with XML documents based on a lot of XSDs. When I
> tried to use QVTo programmatically, I've seen that it does not work
> directly with XSDs, instead it requires Ecore and generated model
> code. Because I had to apply this command:
>
>
> EPackage.Registry.INSTANCE.put(WSDLPackage.eNS_URI,
> WSDLPackage.eINSTANCE);
> EPackage.Registry.INSTANCE.put(SoaMLPackage.eNS_URI,
> SoaMLPackage.eINSTANCE);
>
>
> In this example I use WSDL and SoaML. This is necessary to register
> the Packages with a specific URI.
>
> However, I tried it with some XSDs (not mine, are XSD of various
> vendors) and often the Ecore generation and code generation failed.
> For example when I try to use the WSDL XSD from the OMG it does not work.
>
> So, is there any possibility to directly work with XSDs? Or is it
> always necessary to create the model code?
> Regards,
>
> Tex
|
|
|
Powered by
FUDForum. Page generated in 0.02757 seconds