Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore to Schema -> how to get IDREF?
Ecore to Schema -> how to get IDREF? [message #673383] Mon, 23 May 2011 13:30 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

I start with an Ecore model and want to generate a plain XSD from it (no XMI and no references to Ecore). Still, I'd like to be able to validate whether references are correctly set outside EMF. In XSD this is possible via IDREF and IDREFS attributes.

By default the references are typed as simple Strings.
How can I configure the EcoreSchemaBuilder to create such XSD that uses IDREFs at Ecore references between objects?

The other way round seems to work. Starting with an XSD that uses IDREFs results in proper references in an Ecore:
http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf
How do I get the reverse?

Cheers,
Hauke
(no subject) [message #687028 is a reply to message #673383] Mon, 23 May 2011 16:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hauke,

Comments below.

Hauke Fuhrmann wrote:
> Hi there,
>
> I start with an Ecore model and want to generate a plain XSD from it
> (no XMI and no references to Ecore). Still, I'd like to be able to
> validate whether references are correctly set outside EMF. In XSD this
> is possible via IDREF and IDREFS attributes.
> By default the references are typed as simple Strings.
> How can I configure the EcoreSchemaBuilder to create such XSD that
> uses IDREFs at Ecore references between objects?
You're using the Export... capability? You're getting anyURI but want
IDREF? That's controlled by isResolveProxies
> The other way round seems to work. Starting with an XSD that uses
> IDREFs results in proper references in an Ecore:
> http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf
>
> How do I get the reverse?
So if you have that working and export the schema again, what happens?

>
> Cheers,
> Hauke


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:(no subject)
Next Topic:deleting eobject
Goto Forum:
  


Current Time: Thu Apr 25 10:11:04 GMT 2024

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

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

Back to the top