[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?

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!