[xsd-users] Compiler errors occurred in the generated *.hxx files from CodeSynthesis 3.2

Boris Kolpackov boris at codesynthesis.com
Mon Apr 4 16:20:23 EDT 2011


Hi William,

William Canton <stargate625 at gmail.com> writes:

> However, having namespace mapping still does not solve the recurrent problem
> of error C2338:  'FileSystemType'.  You have seen this before in my previous
> email.  So, this build error has nothing to do with the namespace conflicts
> among two or more CodeSynthesis generated files because only the header
> generated from the attached schema references the FileSystemType
> declaration.

Ok, here is what I did. I compiled this schema like this:

xsd cxx-tree --namespace-map http://www.cablelabs.com/namespaces/opencable/xsd/codf/2.0=codf OC-CoDF-I02.xsd

I then opened the 'examples-vc9.sln' solution that comes with XSD
distribution (examples/cxx/tree/ directory) using VC++ 2008 and added
the resulting files to the 'hello' project. I then build the project
and didn't get any error. The generated OC-CoDF-I02.cxx compiled
without any problems.

One thing that you may want to try is add the following option when
compiling this schema:

--reserved-name FileSystemType

> But now, the xerces parser gave me yet another run time exception of memory
> access violation inside the following call to parseURI:
> 
>           auto_ptr<DOMDocument> doc (
>             parser->parseURI (string (uri).c_str ()));
> 
> which is contained in this template:
> 
>         template <typename C>
>         auto_ptr<xercesc::DOMDocument>
>         parse (const std::basic_string<C>& uri,
>                xercesc::DOMErrorHandler& eh,
>                const properties<C>& prop,
>                unsigned long flags)
> 
> within the file named "parsing-source.txx" with the include path of
> "include/xsd/cxx/xml/dom.  This might be one of the CodeSynthesis XSD
> library template header.

Yes, it is part of the XSD runtime library (libxsd). Can you show us
what you call to parse the document in your application? Better yet,
can you send a small test driver (just the .cpp file) that ties to
perform the parsing and get this exception?

Boris



More information about the xsd-users mailing list