hooklift / gowsdl

WSDL2Go code generation as well as its SOAP proxy
Mozilla Public License 2.0
1.14k stars 390 forks source link

Enumeration duplicates with special characters like "+" #255

Closed jens1205 closed 1 year ago

jens1205 commented 1 year ago

I am having the following enumeration

    <xs:simpleType name="UebertragungsverfahrenType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ADSL2AM"/>
            <xs:enumeration value="ADSL2+AM"/>
        </xs:restriction>
    </xs:simpleType>

Currently normalize just throws array all illegal characters in an identifier, leading to a duplicate const value and a compilation error.

This PR introduces a specialCharacterMapping, which adds a Plus for the + in the name

jens1205 commented 1 year ago

I just found this links to #113 and there is another pending PR #114 for this topic