Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore created from XSD
Ecore created from XSD [message #507332] Tue, 12 January 2010 23:39 Go to next message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
Hi,

Can EMF generate an ecore model without appending the word "Type" at the end of each element name in the XSD source file?

Thanks!
Re: Ecore created from XSD [message #507338 is a reply to message #507332] Wed, 13 January 2010 00:15 Go to previous messageGo to next message
Assen Sharlandjiev is currently offline Assen SharlandjievFriend
Messages: 17
Registered: January 2010
Location: Sofia, Bulgaria
Junior Member

Hi,
simply add the ecore xml namespace in your schema element:

xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"

then add an ecore:name attribute to the elements or types in your schema like:

<complexType name="ClassificationSchemeType" ecore:name="ClassificationScheme">

Assen.
Re: Ecore created from XSD [message #507406 is a reply to message #507338] Wed, 13 January 2010 11:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Assen,

I assume this is happening only for anonymous types which are given the
name of their containing element with Type appended. Simply naming the
type in the XSD would also do the trick.


Assen Sharlandjiev wrote:
> Hi,
> simply add the ecore xml namespace in your schema element:
>
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> then add an ecore:name attribute to the elements or types in your
> schema like:
>
> <complexType name="ClassificationSchemeType"
> ecore:name="ClassificationScheme">
>
> Assen.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: CDO exception
Next Topic:Serializing/Deserializing ExtendedMetaData
Goto Forum:
  


Current Time: Wed Apr 24 23:35:34 GMT 2024

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

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

Back to the top