[xsd-users] Problem with substition groups
Boris Kolpackov
boris at codesynthesis.com
Sat Dec 2 05:01:20 EST 2017
FLACHET Nicolas <Nicolas.FLACHET at cstb.fr> writes:
> > My main problem is that I cant get do that :
> >
> > Truitos test = dynamic_cast<Truitos>( building->GenericApplicationPropertyOfAbstractBuilding().at(0) );
> >
> > Why can't you do that? Do you get an compile/runtime error?
>
> No, but the type "Truitos" doesn't exist in my generated classes.
Ah, right, it is xml_schema::integer (which is why you tried to
dynamic_cast to it).
I see you are using --generate-xml-schema/--extern-xml-schema:
> --extern-xml-schema xs/xml-schema.xsd
Are you generating it with --generate-polymorphic and
--polymorphic-type-all?
Boris
More information about the xsd-users
mailing list