[xsd-users] xsd-generated code ignores attributes

Boris Kolpackov boris at codesynthesis.com
Wed May 28 04:12:54 EDT 2014


Hi Soroush,

Soroush Rabiei <soroush.rabiei at gmail.com> writes:

> [...] or there is something to do with XSD-C++ tree map.

You seem to be using the C++/Parser mapping, not C++/Tree. Or are
you talking about "type map", not "tree map"? Generally, when
describing a problem, try to be precise. Otherwise there is no
guarantee we will be talking about the same thing.


> class XPresentationParser: public presentation_t_pskel
> {
>   void name(const std::string&);
>   void type(const AIT::CSP::CSP_Problem::Type&);
> };

In your schema, you don't have the "type" attribute. You have "format"
instead. So that would explain why the type() function is not called.

To understand why name() is not called, check the signature of that
function in presentation_t_pskel and make sure that it matches what
you have in XPresentationParser.

Boris



More information about the xsd-users mailing list