[xsd-users] problem with xerces namespace

Boris Kolpackov boris at codesynthesis.com
Sat May 3 15:07:33 EDT 2008


Hi Denny,

[I've CC'ed xsd-users to my reply since others may encounter a similar
 problem in the future.]

Denny Hatzenbihler <drhvm at us.ibm.com> writes:

> I am now getting another error when I include a xsd generated header file
> jdl.hxx  which includes xsd/cxx/tree/parsing.hxx
>
> Do you have any idea what is causing this failure?
>
> In file included from ./Common/include/xsd/cxx/tree/parsing.hxx:9,
>                  from ./Common/include/jdl.hxx:66,
>                  from Common/src/PEDesc.cpp:158:
> ./Common/include/xsd/cxx/tree/parsing.txx:227:38: macro "X" passed 4
> arguments, but takes just 1
> ./Common/include/xsd/cxx/tree/parsing.txx:241:38: macro "X" passed 4
> arguments, but takes just 1

You seem to define a macro called X (probably for handling XMLCh to char
conversions) which interferes with template arguments used in the XSD
runtime headers. I've ran into the same problem[1] with XQilla not long
ago.

The way to get rid of this problem is to make sure that you include
the header that defines the X macro after you include the generated
headers. We will also use a different name for this template argument
in the future releases of XSD seeing that it is causing problems. If
you would like I can send you the XSD runtime with this change.

[1] http://sourceforge.net/mailarchive/message.php?msg_name=20080411090336.GB25596%40karelia

Boris




More information about the xsd-users mailing list