[xsd-users] [Bug?] generated enumeration uses #defined value

Alexander Petry petry at itwm.fhg.de
Fri Feb 8 04:25:28 EST 2008


Hi list!

I am currently working on a project that uses the JSDL, a language for job
submission.   JSDL  is defined  in  XML  Schema  and uses  an  enumeration
"OperatingSystemTypeEnumeration"    which    restricts   the    xsd:string
type. Well, so  far so good, but the restriction  includes a value "LINUX"
that   gets  translated   by  the   "xsd"  compiler   to  an   enum  value
LINUX. Unfortunately, on  my system, this value is  a #defined value which
results in a compile time error.

Is there  a standard procedure  to deal with  such a case? My  first guess
would  be to  include a  prologue  statement that  #undef the  problematic
values.   Maybe it  would be  nice to  have a  warning issued  by  the xsd
compiler in case that such a condition occured.

Info about my system:
   g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
   CodeSynthesis XSD XML Schema to C++ compiler 3.1.0
   Linux xen-o-rama 2.6.19-4-generic-amd64 #2 SMP Thu Apr 5 05:57:13 UTC 2007 x86_64 GNU/Linux

[1] JSDL Specification: http://schemas.ggf.org/jsdl/2005/11/jsdl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080208/53ed7594/attachment.pgp


More information about the xsd-users mailing list