|
Re: XSD --> Ecore question [message #915846 is a reply to message #915727] |
Tue, 18 September 2012 04:26 |
Ed Merks Messages: 33107 Registered: July 2009 |
Senior Member |
|
|
Martin,
It's sounds like there's more going on than just this snippet. Such
names must come from resolving name conflicts so have a look at why
you'd get to the line " eNamedElement.setName(name + index);" in
org.eclipse.xsd.ecore.XSDEcoreBuilder.resolveNameConflict(Map<String, ?
extends ENamedElement>, ENamedElement, String)
On 17/09/2012 11:10 PM, Martin Taal wrote:
> Hi,
> I have a question about this xsd construct:
> <xsd:sequence>
> <xsd:element name="endName" type="AttributeType"
> maxOccurs="unbounded">
> </xsd:element>
> </xsd:sequence>
>
> When I generate code in EMF for this construct I get a
> AttributeListType and an AttributeType eClass. This is fine. However
> in Teneo I get these eclasses:
> AttributeListType
> AttributeType
> AttributeListType1
> AttributeType1
>
> So twice with a postfix 1. I use the XSDEcoreBuilder to translate the
> xsd to ecore:
> final XSDEcoreBuilder ecoreBuilder = new XSDEcoreBuilder(new
> BasicExtendedMetaData(EPackage.Registry.INSTANCE));
> and then do this:
> final org.eclipse.emf.common.util.URI emfURI =
> org.eclipse.emf.common.util.URI.createURI(uri.toString());
> final Collection<EObject> eObjects =
> ecoreBuilder.generate(emfURI);
>
> Should/can I do anything special to prevent the *1 eclasses from being
> created?
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02183 seconds