Keep uppercase of the EAttribute names [message #429419] |
Wed, 22 April 2009 14:49  |
Eclipse User |
|
|
|
Hi,
I'm generating my ecore model using an XSD file; which contains elements
with uppercase names like this:
<xs:element name="Analysis" maxOccurs='unbounded'>
<xs:complexType mixed="false">
<xs:sequence>
<xs:element name="ANALYSIS_ID" type="xs:string" />
However, when the ecore model is generated, the first letter of the
EAttribute name is changed to lowercase (e.g. aNALYSISID).
Is there anything I can set/add so EMF keeps everything uppercase?
Thanks in advance!
|
|
|
|
|
Re: Keep uppercase of the EAttribute names [message #429426 is a reply to message #429423] |
Wed, 22 April 2009 20:42  |
Eclipse User |
|
|
|
Ben,
What you show isn't used if you properly use the generated
XyzResourceFactoryImpl to create the resource because in that case the
extended meta data option is applied and the original XML names will
appear in the serialization. After all, XML allows things like
ANALYZED-ID which isn't a valid Java name and that too is supported in
the serialization....
Ben wrote:
> Ed,
>
>> Why does it matter anyway given the serialization will use exactly
>> the name
> used in the schema?
>
> I'm not sure I follow.
>
> When it is actually serialized, it uses the EAttribute name, as shown
> below:
>
> <analysisList>
> <analysis aNALYSISID="Z01451" aNALYSISNAME="TIMELINE AMES"
> aNALYSISINCREMENTID="">
>
|
|
|
Powered by
FUDForum. Page generated in 0.15406 seconds