Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XSD to Ecore: Prevent generation of w3 schemas
XSD to Ecore: Prevent generation of w3 schemas [message #1070696] Thu, 18 July 2013 13:44 Go to next message
John M. is currently offline John M.Friend
Messages: 198
Registered: July 2010
Senior Member
Hello,

I have a xsd file, which I want to migrate to Ecore. Works fine so far, but it always creates models for http://www.w3.org/XML/2001/schema and http://www.w3.org/XML/1998/namespace.

!ENTRY org.eclipse.emf.ecore 2 0 2013-07-18 15:41:28.047
!MESSAGE Both 'ProcessAnalyzerModel' and 'org.eclipse.emf.ecore' register a package for 'http://www.w3.org/XML/1998/namespace'


Is there no way to say Ecore, that it should use the given one from org.eclipse.emf.ecore?

<schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

    targetNamespace="http://xmlns.deort.com/wb/process/2003"
    elementFormDefault="qualified">

    <import namespace="http://www.w3.org/2001/XMLSchema"/>

[Updated on: Thu, 18 July 2013 13:54]

Report message to a moderator

Re: XSD to Ecore: Prevent generation of w3 schemas [message #1070701 is a reply to message #1070696] Thu, 18 July 2013 13:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
John,

Comments below.

On 18/07/2013 3:45 PM, John M. wrote:
> Hello,
>
> I have a xsd file, which I want to migrate to Ecore. Works fine so
> far, but it always creates models for http://www.w3.org/XML/2001/schema
Does it import the schema for schemas?
> and http://www.w3.org/XML/1998/namespace.
That's quite commonly imported and we have a generated model for that...
>
> !ENTRY org.eclipse.emf.ecore 2 0 2013-07-18 15:41:28.047
> !MESSAGE Both 'ProcessAnalyzerModel' and 'org.eclipse.emf.ecore'
> register a package for 'http://www.w3.org/XML/1998/namespace'
>
> Is there no way to say Ecore, that it should use the given one from
> org.eclipse.emf.ecore?
The last page of the wizard gives you the opportunity to specify
existing models for the models needed by your schema-based model, so
there you can tell it to reuse the one from org.eclipse.emf.ecore. The
use of the schema for schemas is more problematic. Yes, we have an
Ecore model for XML Schema but it's highly specialized to deal with both
the syntactic and semantic model and isn't designed to be reusable as
something that contained be within other models...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSD to Ecore: Prevent generation of w3 schemas [message #1070709 is a reply to message #1070701] Thu, 18 July 2013 14:15 Go to previous messageGo to next message
John M. is currently offline John M.Friend
Messages: 198
Registered: July 2010
Senior Member
Hello Ed,

as you told I tried it and I can reuse the provided namespace model.
For the schema there is no option, so I have to generate it. If it makes so much trouble, I will better use the generated one.
I hoped perhaps there are given one. Smile
Re: XSD to Ecore: Prevent generation of w3 schemas [message #1070722 is a reply to message #1070709] Thu, 18 July 2013 14:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
John,

Comments below.


On 18/07/2013 4:15 PM, John M. wrote:
> Hello Ed,
>
> as you told I tried it and I can reuse the provided namespace model.
Why? What's the problem?
> For the schema there is no option, so I have to generate it. If it
which it?
> makes so much trouble, I will better use the generated one.
> I hoped perhaps there are given one. :)
You definitely should be able to reuse the namespace model so if that
doesn't work, I would need to understand why, e.g., a sample schema that
demonstrates the problem.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSD to Ecore: Prevent generation of w3 schemas [message #1070735 is a reply to message #1070722] Thu, 18 July 2013 15:00 Go to previous messageGo to next message
John M. is currently offline John M.Friend
Messages: 198
Registered: July 2010
Senior Member
Okay I think we are talking past each other. I haven't noticed the possibility to import the given emf namespace model.
But after you mentioned it, I found the option.

I have imported schemas as you recommended. Smile
Re: XSD to Ecore: Prevent generation of w3 schemas [message #1070742 is a reply to message #1070735] Thu, 18 July 2013 15:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
John,

It's very uncommon that the schema for schemas would be imported. Using
XML Schema types don't requiring importing the schemas for schema's
itself. The XML namespace schema is quite commonly imported, which is
why we have a reusable generated model for it.

On 18/07/2013 5:00 PM, John M. wrote:
> Okay I think we are talking past each other. I haven't noticed the
> possibility to import the given emf namespace model.
> But after you mentioned it, I found the option.
>
> I have imported schemas as you recommended. :)


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF tool as console application
Next Topic:Xor Constraint with EMF
Goto Forum:
  


Current Time: Thu Apr 25 00:55:23 GMT 2024

Powered by FUDForum. Page generated in 0.04301 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top