[xsd-users] Empty enumeration results in cxx value
Boris Kolpackov
boris at codesynthesis.com
Tue Nov 17 07:44:01 EST 2009
Hi Stephen,
Stephen James <Stephen.James at genband.com> writes:
> <xs:simpleType name="busyfreestatusType">
> <xs:restriction base="xs:string">
> <xs:enumeration value=""/>
> <xs:enumeration value="busy"/>
> <xs:enumeration value="free"/>
> </xs:restriction>
> </xs:simpleType>
>
> My values end up being -
>
> enum value
> {
> cxx,
> busy,
> free
> };
>
> I understand that there is no name for "" but is the value cxx controllable?
Yes, you can change enumerator names with the --enumerator-regex option.
For example, if add:
--enumerator-regex //empty_value/
when compiling the above schema fragment, I get:
enum value
{
empty_value,
busy,
free
};
For more information on this option, see the NAMING CONVENTION section
in the XSD Compiler Command Line Manual:
http://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml
Boris
More information about the xsd-users
mailing list