[xsd-users] Empty enumeration results in cxx value

Stephen James Stephen.James at genband.com
Wed Nov 18 16:25:00 EST 2009


So this does do what I need, except that when I serialize using the
empty enumerator I get <tag></tag> instead of <tag/>. The latter is what
I would prefer limiting the size of the xml, which is included in
messages.

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Tuesday, November 17, 2009 11:35 AM
To: Stephen James
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Empty enumeration results in cxx value

Hi Stephen,

Stephen James <Stephen.James at genband.com> writes:

> I get and error when I try what is suggested.
> 
> ../xsd-3.2.0-sparc-solaris/bin/xsd cxx-tree --cxx-suffix .cc
> --hxx-suffix .h --enumerator-regex //empty_value/ acbtcap.xsd
> error: invalid enumerator name regex: '': Empty expression

Sorry, I was using the development build of XSD which uses a newer 
version of the Boost regex library. The following equivalent
expression works for me with the 3.2.0 binaries:

--enumerator-regex '/^$/empty_value/'

Boris



More information about the xsd-users mailing list