Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XSD2ECORE Many "Types" generated(Type generation)
XSD2ECORE Many "Types" generated [message #686471] Wed, 22 June 2011 09:49 Go to next message
Bak Attila is currently offline Bak AttilaFriend
Messages: 29
Registered: December 2009
Junior Member
Hi,

I have tested xsd2ecore on maven-v4_0_0.xsd.
The following occurs for elements with :

<xs:complexType>
<xs:sequence>
<xs:element name="dependency" minOccurs="0" maxOccurs="unbounded" type="Dependency"/>
</xs:sequence>
</xs:complexType>

Dependency Type is reused in the xsd however in the ecore file DependencyType2,3 etc will get generated. Exactly as many as there are references in the xsd file.

Why does the xsd2ecore does not recognise that it handles about the same "type" every time and so it should not generate ones...

Any opinion about this?

Thanks
attila

P.S. If you want to see what happens simply import the maven.xsd and you will see what i am talking about...
Re: XSD2ECORE Many &quot;Types&quot; generated [message #687539 is a reply to message #686471] Wed, 22 June 2011 16:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30448
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Bak,<br>
<br>
Comments below.<br>
<br>
<br>
<br>
Bak Attila wrote:
<blockquote cite="mid:itsda6$oer$1@news.eclipse.org" type="cite">Hi,
<br>
<br>
I have tested xsd2ecore on maven-v4_0_0.xsd.
<br>
The following occurs for elements with :
<br>
<br>
&lt;xs:complexType&gt;
<br>
         &lt;xs:sequence&gt;
<br>
           &lt;xs:element name="dependency" minOccurs="0"
maxOccurs="unbounded" type="Dependency"/&gt;
<br>
         &lt;/xs:sequence&gt;
<br>
&lt;/xs:complexType&gt;
<br>
<br>
Dependency Type is reused in the xsd however in the ecore file
DependencyType2,3 etc will get generated. Exactly as many as there are
references in the xsd file.
<br>
</blockquote>
<br>
I expect additional types to be coming only from anonymous types nested
within the element declaration itself.  Certainly I'm not seeing a
problem with the particular scenario you've characterized.
<blockquote cite="mid:itsda6$oer$1@news.eclipse.org" type="cite"><br>
Why does the xsd2ecore does not recognise that it handles about the
same "type" every time and so it should not generate ones...
<br>
<br>
Any opinion about this?
<br>
</blockquote>
It doesn't believe such a glaring error could exist...<br>
<blockquote cite="mid:itsda6$oer$1@news.eclipse.org" type="cite"><br>
Thanks
<br>
attila
<br>
<br>
P.S. If you want to see what happens simply import the maven.xsd and
you will see what i am talking about...
<br>
</blockquote>
Well, as I expected, it's three versions of "Dependen<b>cies</b>Type"
not "DependencyType" while there is exactly one type called
"Dependency" derived from the one complex type named "Dependency".   
Of course the three types come from the three elements named
"dependencies" each with a slightly different (different annotation)
version of a structurally identical complex type definition.<br>
</body>
</html>
Re: XSD2ECORE Many &quot;Types&quot; generated [message #687829 is a reply to message #687539] Thu, 23 June 2011 10:20 Go to previous message
Bak Attila is currently offline Bak AttilaFriend
Messages: 29
Registered: December 2009
Junior Member
Hi Ed,

Thanks, you are the boss Smile Could have imagined some other behaviour but if that is how it goes then ok.

Regards
attila
Previous Topic:XSD2ECORE BUG?
Next Topic:[CDO] Commit of one transaction results in inactive other transaction
Goto Forum:
  


Current Time: Wed Sep 18 01:16:21 GMT 2019

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

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

Back to the top