Home » Archived » XML Schema Definition (XSD) » Is XSD2Ecore able to handle *.xsd files with multiple depedencies ?
Is XSD2Ecore able to handle *.xsd files with multiple depedencies ? [message #76028] |
Mon, 27 October 2008 16:02  |
Eclipse User |
|
|
|
Hi!
I used XSD2Ecore to create *.ecore files out of *.xsds.
Concretely these:
XMLSchema.xsd (http://www.w3.org/2001/XMLSchema)
WSDL.xsd (http://schemas.xmlsoap.org/wsdl/)
SOAP.xsd (http://schemas.xmlsoap.org/wsdl/soap/)
These are the official W3C files, I did not alter them in any way.
WSDL.xsd is using elments of XMLSchema.xsd.
SOAP.xsd is using elements of both, XMLSchema.xsd and WSDL.xsd.
Now here comes the problem: when converting WSDL.xsd to ecore no
XMLSchema.ecore is required. The same happens, when I convert SOAP.xsd
to ecore. Like expected I have to specify the WSDL.ecore. But I dont
have to specify the XMLSchema.ecore.
Like I said, WSDL.xsd and SOAP.xsd use several elements from XMLSchema.xsd
but when I want to generate the ecore file, I dont have to specify the
appropriate XMLSchema.ecore. Why not ? Is it even possible to generate
an ecore file for a *.xsd file which is depedent on more then one other
*.xsd
file ?
Thanks in advance,
Tim
|
|
|
Re: Is XSD2Ecore able to handle *.xsd files with multiple depedencies ? [message #76046 is a reply to message #76028] |
Mon, 27 October 2008 16:35   |
Eclipse User |
|
|
|
Tim,
Comments below.
Tim Brömme wrote:
> Hi!
>
> I used XSD2Ecore to create *.ecore files out of *.xsds.
>
> Concretely these:
> XMLSchema.xsd (http://www.w3.org/2001/XMLSchema)
> WSDL.xsd (http://schemas.xmlsoap.org/wsdl/)
> SOAP.xsd (http://schemas.xmlsoap.org/wsdl/soap/)
Neither of these schemas import XMLSchema.xsd so they don't depend on that.
>
> These are the official W3C files, I did not alter them in any way.
>
> WSDL.xsd is using elments of XMLSchema.xsd. SOAP.xsd is using elements
> of both, XMLSchema.xsd and WSDL.xsd.
Maybe I'm missing something, but I just don't see imports.
>
> Now here comes the problem: when converting WSDL.xsd to ecore no
> XMLSchema.ecore is required. The same happens, when I convert SOAP.xsd
> to ecore. Like expected I have to specify the WSDL.ecore. But I dont
> have to specify the XMLSchema.ecore.
>
> Like I said, WSDL.xsd and SOAP.xsd use several elements from
> XMLSchema.xsd
Can you point out specifically an example of what you mean?
> but when I want to generate the ecore file, I dont have to specify the
> appropriate XMLSchema.ecore. Why not ? Is it even possible to generate
> an ecore file for a *.xsd file which is depedent on more then one
> other *.xsd
> file ?
Keep in mind that XMLTypedPackage provides all the built-in types for
XML Schema, so if you're just using built-in types, you don't need an
Ecore build for that because there's a built-in model/package for it.
>
>
> Thanks in advance,
> Tim
>
|
|
|
Re: Is XSD2Ecore able to handle *.xsd files with multiple depedencies ? [message #76062 is a reply to message #76046] |
Wed, 29 October 2008 11:33   |
Eclipse User |
|
|
|
Hi,
I think I used the word "depend" wrong :)
What I meant is, that all the files declare namepaces,
to use elements which they don't define by themselves.
Exaple:
>SOAP.xsd
>
>xmlns:xs="http://www.w3.org/2001/XMLSchema
>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
>...
><xs:extension base="wsdl:tExtensibilityElement" >
SOAP.xsd uses elements from the namespaces of the XMLSchema and WSDL.
In this case "extension", which is originally from XMLSchema.xsd
and "tExtensibilityElement", which is part of the WSDL.xsd.
So I would expect, when I convert the SOAP.xsd to *.ecore, that
the resulting *.ecore has references to the appropiate metamodels,
in which the elements are, it uses.
But instead the obove example creates an "Extended Meta Data" Element,
which has no references or indicators, that this element is part
of another metamodel.
Thanks for your help,
Tim
|
|
| |
Re: Is XSD2Ecore able to handle *.xsd files with multiple depedencies ? [message #603376 is a reply to message #76028] |
Mon, 27 October 2008 16:35  |
Eclipse User |
|
|
|
Tim,
Comments below.
Tim Brömme wrote:
> Hi!
>
> I used XSD2Ecore to create *.ecore files out of *.xsds.
>
> Concretely these:
> XMLSchema.xsd (http://www.w3.org/2001/XMLSchema)
> WSDL.xsd (http://schemas.xmlsoap.org/wsdl/)
> SOAP.xsd (http://schemas.xmlsoap.org/wsdl/soap/)
Neither of these schemas import XMLSchema.xsd so they don't depend on that.
>
> These are the official W3C files, I did not alter them in any way.
>
> WSDL.xsd is using elments of XMLSchema.xsd. SOAP.xsd is using elements
> of both, XMLSchema.xsd and WSDL.xsd.
Maybe I'm missing something, but I just don't see imports.
>
> Now here comes the problem: when converting WSDL.xsd to ecore no
> XMLSchema.ecore is required. The same happens, when I convert SOAP.xsd
> to ecore. Like expected I have to specify the WSDL.ecore. But I dont
> have to specify the XMLSchema.ecore.
>
> Like I said, WSDL.xsd and SOAP.xsd use several elements from
> XMLSchema.xsd
Can you point out specifically an example of what you mean?
> but when I want to generate the ecore file, I dont have to specify the
> appropriate XMLSchema.ecore. Why not ? Is it even possible to generate
> an ecore file for a *.xsd file which is depedent on more then one
> other *.xsd
> file ?
Keep in mind that XMLTypedPackage provides all the built-in types for
XML Schema, so if you're just using built-in types, you don't need an
Ecore build for that because there's a built-in model/package for it.
>
>
> Thanks in advance,
> Tim
>
|
|
|
Re: Is XSD2Ecore able to handle *.xsd files with multiple depedencies ? [message #603381 is a reply to message #76046] |
Wed, 29 October 2008 11:33  |
Eclipse User |
|
|
|
Hi,
I think I used the word "depend" wrong :)
What I meant is, that all the files declare namepaces,
to use elements which they don't define by themselves.
Exaple:
>SOAP.xsd
>
>xmlns:xs="http://www.w3.org/2001/XMLSchema
>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
>...
><xs:extension base="wsdl:tExtensibilityElement" >
SOAP.xsd uses elements from the namespaces of the XMLSchema and WSDL.
In this case "extension", which is originally from XMLSchema.xsd
and "tExtensibilityElement", which is part of the WSDL.xsd.
So I would expect, when I convert the SOAP.xsd to *.ecore, that
the resulting *.ecore has references to the appropiate metamodels,
in which the elements are, it uses.
But instead the obove example creates an "Extended Meta Data" Element,
which has no references or indicators, that this element is part
of another metamodel.
Thanks for your help,
Tim
|
|
| |
Goto Forum:
Current Time: Tue Feb 11 06:44:13 GMT 2025
Powered by FUDForum. Page generated in 0.04057 seconds
|