|
Re: [xsd2ecore] mapping of sequence of xs:any and adding elements to it [message #991165 is a reply to message #991052] |
Mon, 17 December 2012 15:19 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Andreas, <br>
<br>
This article will help a bit:<br>
<blockquote><a target="_out"
href="http://www.theserverside.com/tt/articles/article.tss?l=BindingXMLJava">Binding
XML to Java</a><br>
</blockquote>
The entries of such a feature map must use an element-based feature
from a DocumentRoot class of some model (and of course the
value/object must be of that element feature's type).<br>
<br>
<br>
<div class="moz-cite-prefix">On 17/12/2012 12:24 AM, Andreas Brieg
wrote:<br>
</div>
<blockquote cite="mid:kamks7$lqh$1@xxxxxxxxe.org" type="cite">Hi,
<br>
<br>
I have a a xsd2ecore mapping for the following xsd fragment:
<br>
<br>
<br>
<xs:complexType name="data-extension.type" mixed="true">
<br>
</xs:complexType>
<br>
<br>
<br>
This complex type is mapped to an EClass with an attribute mixed
of type EFeatureMapEntry.
<br>
<br>
I would like to know, how I can add elements to the underlying
FeatureMap. The problem is that I get class cast exception during
invocation of an add operation, saying that the element is not of
type EFeatureMapEntry. However I'm not able to create an instance
of EFeatureMapEntry with
org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(EStructuralFeature,
Object), because the object parameter already needs to be of type
EFeatureMapEntry.
<br>
<br>
Might there be a problem with the xsd2ecore mapping? Should I
specify a different type for the attribute mixed?
<br>
</blockquote>
<br>
</body>
</html>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02818 seconds