Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » xs:choice and inheritance
xs:choice and inheritance [message #420926] Wed, 16 July 2008 15:21 Go to next message
Eclipse UserFriend
Originally posted by: erwann.poupart.cnes.fr

It seems that xs:choice is handled in the same way that xs:sequence when
importing an XMLSchema to buil a new EMF model ?

It's a problem when this xs:choice semantic means an exclusive or, i
expected it to be translated into inheritance but this is not the case.

is there an explanation, is it a bug ?

If not, Is there a solution modifying my XML-Schema ?

the XML-Schema used can be found below :

http://www.omg.org/cgi-bin/doc?space/2006-4-4

Thank you for any help,

Best regards,

Erwann.
Re: xs:choice and inheritance [message #420931 is a reply to message #420926] Wed, 16 July 2008 16:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Erwann,

Comments below.

poupart wrote:
>
> It seems that xs:choice is handled in the same way that xs:sequence
> when importing an XMLSchema to buil a new EMF model ?
Yes, it's our oldest bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=51210
>
> It's a problem when this xs:choice semantic means an exclusive or, i
> expected it to be translated into inheritance but this is not the case.
The problem is that the exclusiveness is not recorded and hence not
validated.
>
> is there an explanation, is it a bug ?
It's just something that never been supported and is a lot of work to
support.
>
> If not, Is there a solution modifying my XML-Schema ?
Don't use choice. :-P
>
> the XML-Schema used can be found below :
> http://www.omg.org/cgi-bin/doc?space/2006-4-4
If enforcement of the mutual exclusion is important, I'd add a named
constraint to the complex type (ecore:constraints="blah") and implement
the check by hand in the generated validator.
>
> Thank you for any help,
>
> Best regards,
>
> Erwann.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:General usage of EMF and trivial fine-tuning concerns
Next Topic:architectural approach
Goto Forum:
  


Current Time: Thu Apr 25 08:12:30 GMT 2024

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

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

Back to the top