Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generated .xsd
Generated .xsd [message #427593] Mon, 23 February 2009 20:32 Go to next message
Alick is currently offline AlickFriend
Messages: 10
Registered: July 2009
Junior Member
I just began using EMF to drive the development from UML model (class
diagram), the .umlclass and .uml is created successfully and .genmodel is
created, loaded with .uml and can now sucessfully generate .ecore and I
turned on option of the genmodel to generate Schema as well.

The issue is: although in UML model, for all property I defined for any
class, I applied eAttribute stereotype in the hope to force the "XML
Feature Kind" to be "Element" instead of "unspecified". But still the
generated .xsd has every property generated as attribute, could anyone has
done this give me any insight or help. Thanks in advance,

alick
Re: Generated .xsd [message #427594 is a reply to message #427593] Mon, 23 February 2009 20:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Alick,

Comments below. The generated XSD is a yucky XMI schema. Try using
Export Model...->XML Schema instead. I'm not sure how to express
ExtendedMetaData annotations in UML. There must be a way though...


Alick wrote:
> I just began using EMF to drive the development from UML model (class
> diagram), the .umlclass and .uml is created successfully and .genmodel
> is created, loaded with .uml and can now sucessfully generate .ecore
> and I turned on option of the genmodel to generate Schema as well.
> The issue is: although in UML model, for all property I defined for
> any class, I applied eAttribute stereotype in the hope to force the
> "XML Feature Kind" to be "Element" instead of "unspecified". But
> still the generated .xsd has every property generated as attribute,
> could anyone has done this give me any insight or help. Thanks in
> advance,
> alick
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generated .xsd [message #427596 is a reply to message #427594] Mon, 23 February 2009 22:29 Go to previous messageGo to next message
Alick is currently offline AlickFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks Ed for such quick response, great help and I am sure it would work
as you suggested. Since I am new to this tool, could you kindly point me
to the specific place where I can export an XML schema from (I guess) most
likely the ecore model?

Thanks a lot,
Re: Generated .xsd [message #427598 is a reply to message #427596] Mon, 23 February 2009 22:52 Go to previous messageGo to next message
Renat Zubairov is currently offline Renat ZubairovFriend
Messages: 30
Registered: July 2009
Member
Had the same problem just day before yesterday. You open a genmodel and then
see the eclipse menu for "Generator" or something like that.
Please note that in case you are using Estring, Eint and another EXXX
attributes in your ecore, generated schema will obvioulsy contain references
to ECORE.XSD which define all these types. If you don't whant this to happen
use XMLSchema types instead. You can load them to your ecore and use them
from there.

Renat


On 23.02.09 23:29, in article
45a66808a84279de8ec5f25cc4f115c4$1@www.eclipse.org, "Alick"
<alick.shi@camilion.com> wrote:

> Thanks Ed for such quick response, great help and I am sure it would work
> as you suggested. Since I am new to this tool, could you kindly point me
> to the specific place where I can export an XML schema from (I guess) most
> likely the ecore model?
>
> Thanks a lot,
>
Re: Generated .xsd [message #427599 is a reply to message #427598] Mon, 23 February 2009 23:31 Go to previous message
Alick is currently offline AlickFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks a lot Renat, actually I just saw a previous post between a guy
called Phillips and Ed, where Phillips mentioned this menu item. It's
quite tricky for newbee like me :-) I really appreciate your response,

----now I am fighting with the imported package/xsd, since my model
inherits/extends from a "core" model which is defined in a separate
project, got some issue when ran into the package selection window. Did
you happen to do the same thing?
Previous Topic:EditingDomain marks a resource as read-only - how ?
Next Topic:EMF 2.5M5 has 2.4.0 version plugins, is this normal?
Goto Forum:
  


Current Time: Fri Apr 26 10:37:55 GMT 2024

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

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

Back to the top