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

Alexander Petry petry at itwm.fhg.de
Fri Feb 8 04:45:09 EST 2008


* Alexander Petry <petry at itwm.fhg.de> [080208 10:28]:
> 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.

Just found the answer:  --reserved-name "LINUX=LINUX_OS" fixed my problems
;-)

Thanks anyways,
Alex
-------------- 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/a13926ba/attachment.pgp


More information about the xsd-users mailing list