XSD to ECore changing element class [message #1161719] |
Wed, 30 October 2013 00:37 |
Eclipse User |
|
|
|
Generating a model from a XSD and have used the ecore:name annotation to
successfully change the names of generated ECore classes in types and
attributes, but have no luck doing it for elements.
For example I have an:
<xs:element name="ProgramStatusType" ecore:name="ProgramStatus">
but the generated class comes out:
ProgramStatusTypeType.class
Also note that in the ecore model I see extended metadata like this:
Value ProgramStatusType_._type
Am I using the right annotation in the XSD to change the names of
elements or have I missed something?
thanks for any help,
John
|
|
|
|
Re: XSD to ECore changing element class [message #1161967 is a reply to message #1161731] |
Wed, 30 October 2013 04:30 |
Eclipse User |
|
|
|
Thanks Ed, Moving the annotations to the anonymous types does the trick.
On 10/29/2013 07:49 PM, Ed Merks wrote:
> John,
>
> Comments below.
>
> On 30/10/2013 1:37 AM, John E. Conlon wrote:
>> Generating a model from a XSD and have used the ecore:name annotation
>> to successfully change the names of generated ECore classes in types
>> and attributes, but have no luck doing it for elements.
>>
>> For example I have an:
>>
>>
>> <xs:element name="ProgramStatusType" ecore:name="ProgramStatus">
>>
>> but the generated class comes out:
>> ProgramStatusTypeType.class
> Elements don't map to EClasses so such an annotation would only change
> the name of a feature...
>>
>> Also note that in the ecore model I see extended metadata like this:
>> Value ProgramStatusType_._type
> There must be an anonymous complex type involved so that's where you
> should put the name annotation.
>>
>> Am I using the right annotation in the XSD to change the names of
>> elements or have I missed something?
> I imagine it's just not in the right place...
>>
>> thanks for any help,
>> John
>
|
|
|
Powered by
FUDForum. Page generated in 0.03795 seconds