Steven J Hathaway wrote:
Dave,

I found my problem -- and downloaded fresh code from xalan svn
and no longer attempt to resolve XMLCh via XercesDefs.hpp when using Microsoft 
C.
Hi Steve,

Please post to the lists, and not to my personal email address.


There appears to be an issue with XalanCAPI.h using Microsoft C (not C++)
in that XMLCh is undefined and therefore the typedef has a syntax failure.
Yes, I was confused and was looking at XalanCPathCAPI.h.

The definition of XMLCh is normally found found in the Xerces-C product
by tracing #include references to XercesDefs.hpp.  Also note that wchar_t is 
16-bit
in Microsoft Platform SDK and 32-bit in GNU glibc.  Xerces-C defines XMLCh as 
wchar_t
if available, otherwise it is defined as unsigned short.
Yes, I'm aware of how Xerces-C defines the XMLCh typedef. Windows is the only platforms where wchar_t is used consistently, since it's the only platform that guarantees that wchar_t will always contain a UTF-16 code unit.


The following defines XMLCh as a 16-bit value unless Xerces-C has defined it as
a 32-bit value for Linux using GNU glibc.

    #ifndef XMLCh
    #define XMLCh unsigned short
    #endif
Xerces-C will _never_ define XMLCh as a 32-bit value. It is intended to store a UTF-16 code unit, so it must be a 16-bit value.

In addition, your use of #ifndef XMLCh will not work, because XMLCh is a typedef, not a #define.

I will need to figure out another way of getting at the definition of XMLCh from Xerces-C

Dave

Reply via email to