[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] XSD2EMF mapping, map to a non-existing XSD element?
|
- From: david by chan <lifesting@xxxxxxxxx>
- Date: Fri, 11 Sep 2009 23:53:46 +0800
- Newsgroups: eclipse.tools.emf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.23 (X11/20090817)
for example, I defined a complex type in XSD and added a mapping
<complexType name="transition">
<complexContent>
<extension base="gd:graph_element">
<attribute name="to" type="IDREF" ecore:reference="gd:node"></attribute>
</extension>
</complexContent>
</complexType>
Now I want to add a new attribute 'from' for EMF Class Transition, that
is this attribute doesn't exist in XSD definition. In further, I want an
Addon not a xsd2emf mapping. If a XML snippet like below, it's illegal.
<transition from="xxx" to="yyy"/>.
The only acceptable format is <transition to="yyy"/>
I tried like below, but it doesn't be recognized by XSDGenmodel.
<complexType name="transition">
<complexContent>
<extension base="gd:graph_element">
<attribute name="to" type="IDREF" ecore:reference="gd:node"></attribute>
<ecore:attribute name="from" type="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String"/>
</extension>
</complexContent>
</complexType>
Thanks for your help!