rafalrusin / xmlbeansxx

xmlbeansxx is an open source C++ library easing the processing of XML data. It is very similar to and in fact was inspired by Apache XMLBeans. The goal is to have the same functionalities and interfaces of XMLBeans.
http://xmlbeansxx.touk.pl
Apache License 2.0
18 stars 8 forks source link

Underline symbol skipped in type name #10

Closed Vanuan closed 12 years ago

Vanuan commented 12 years ago

Let's say I have a schema:

<xsd:complexType name="CT_UnsignedInt">    </xsd:complexType>
<xsd:complexType name="CTUnsignedInt">    </xsd:complexType>

As you can see these types are different. But since generator is skipping underline symbol, I'll have two classes with the same name.

Is it done intentionally?

stawel commented 12 years ago

2011/10/12 John Yani < reply@reply.github.com>

Let's say I have a schema:

/xsd:complexType /xsd:complexType As you can see these types are different. But since generator is skipping underline symbol, I'll have two classes with the same name. Is it done intentionally? We don't generate the class names by our selves, we get them from xmlbeans (java version). I suppose you are using this version "git@github.com: rafalrusin/xmlbeansxx.git" (it uses xmlbeans 1.0.4) please try this experimental one "git@github.com:stawel/xmlbeansxx.git" (it uses xmlbeans 2.4.0) This two versions will be merged soon.

The newer one, generates two different classes: class CTUnsignedInt2; class CTUnsignedInt;

Regards, Pawe Stawicki

Vanuan commented 12 years ago

But what if I want my class named CT_UnsignedInt? Of course, by java convention underscore is not recommended in class names. But IMO, CT_UnsignedInt is slightly more readable than CTUnsignedInt. So, I've changed the code to use original ShemeType name. You can see my pull request and say what you think.

Vanuan commented 12 years ago

Thanks!