[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Xsd derivated schema customization - how to avoiding unnecesary list wrappers derivated from complextype


Please use the newsgroup/forum for asking questions.
More comments below.

Matias Urbieta wrote:
Hi i'm generating an ecore model from a xsd. The schema defines
sequences of elements within complextypes that later are translated as
eclasses working as list "wrappers".
When i try to use this model with GMF, list wrapper are not well
received (gmf can't handle it).

So i'd need to derivate an ecore model avoiding generating list
"wrappers" when a complexType followed by a sequence is found. Or in the
other way around,i would need to customize emf
serialization/deserialization for working with wrapped list.

Next, i'll present the  case: 

My xsd specifies the following  schema :

  <xs:element name="step">
        <xs:element ref="external-permissions" minOccurs="0" />
        <xs:element ref="actions" minOccurs="0" />
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="id" type="xs:string" use="required" />

  <xs:element name="steps">
        <xs:element ref="step" maxOccurs="unbounded" />
 <xs:element name="workflow">
        <xs:element ref="steps" />

This schema allows specifying an xml like

<step id=.../>

When i derivate this schema to EMF, three Eclasses are created
WorkflowType, StepsType and StepType. The first have a reference to a
StepsType instance and this last has a list to StepType instances.Here,
the StepsType works as a decorator for the stepType list.

Here i'd need to avoid generating the StepsType Eclass.
Someone else was asking this same type of question recently. It relates to https://bugs.eclipse.org/bugs/show_bug.cgi?id=201662 which we've not found time to complete.

emf-dev mailing list