willemdj / erlsom

XML parser for Erlang
GNU Lesser General Public License v3.0
264 stars 103 forks source link

Added option to resolve attribute-element name conflict. #59

Closed kape1395 closed 7 years ago

kape1395 commented 7 years ago

I had XSD, where a complexType had element and attribute with the same name. Erlsom produced an HRL file containing records with two fields of equal names (invalid records). I added an option {attribute_hrl_prefix, AttrPrefix :: string()} that defaults to "".

I also added ifndefs around standard types in the generated HRLs to be able to use several XSD HRLs in single erlang module.