Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » peristent XML Schema to Ecore mappings
peristent XML Schema to Ecore mappings [message #496508] Tue, 10 November 2009 11:39 Go to next message
Csaba Koncz is currently offline Csaba KonczFriend
Messages: 49
Registered: July 2009
Member
Hello!

I plan to create my Ecore models from existing XML schemas. However, there are a number of features that need a bit of customization, such as having features named "nodes" instead of "node" if the "node" child element has maxOccurs>1.

I can do this change in the genmodel itself, but then if the schema changes and I reload the EMF model, the customization is lost.
Is there a way to persist such simple mappings? (JAXB, for example, allows you to place such information in the schema itself or in a separate file).

Thank you in advance!
Csaba
Re: peristent XML Schema to Ecore mappings [message #496526 is a reply to message #496508] Tue, 10 November 2009 12:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020203090206020202050101
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Csaba,

Comments below.

Csaba Koncz wrote:
> Hello!
>
> I plan to create my Ecore models from existing XML schemas. However,
> there are a number of features that need a bit of customization, such
> as having features named "nodes" instead of "node" if the "node" child
> element has maxOccurs>1.
You can use ecore:name="nodes".

Read these to to find out more about that.

XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
Essential EMF, DZone Refcard
<http://refcardz.dzone.com/refcardz/essential-emf>

>
> I can do this change in the genmodel itself, but then if the schema
> changes and I reload the EMF model, the customization is lost.
> Is there a way to persist such simple mappings? (JAXB, for example,
> allows you to place such information in the schema itself or in a
> separate file).
>
> Thank you in advance!
> Csaba

--------------020203090206020202050101
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!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">
Csaba,<br>
<br>
Comments below.<br>
<br>
Csaba Koncz wrote:
<blockquote cite="mid:hdbjdj$b0c$1@build.eclipse.org" type="cite">Hello!
<br>
<br>
I plan to create my Ecore models from existing XML schemas. However,
there are a number of features that need a bit of customization, such
as having features named "nodes" instead of "node" if the "node" child
element has maxOccurs&gt;1.
<br>
</blockquote>
You can use ecore:name="nodes".<br>
<br>
Read these to to find out more about that.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
<a href="http://refcardz.dzone.com/refcardz/essential-emf">Essential
EMF, DZone Refcard</a></blockquote>
<blockquote cite="mid:hdbjdj$b0c$1@build.eclipse.org" type="cite"><br>
I can do this change in the genmodel itself, but then if the schema
changes and I reload the EMF model, the customization is lost.
<br>
Is there a way to persist such simple mappings? (JAXB, for example,
allows you to place such information in the schema itself or in a
separate file).
<br>
<br>
Thank you in advance!
<br>
Csaba <br>
</blockquote>
</body>
</html>

--------------020203090206020202050101--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:DocumentRoot
Next Topic:[CDO] Event Notification procedure
Goto Forum:
  


Current Time: Fri Apr 19 22:51:39 GMT 2024

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

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

Back to the top