[xsd-users] Problem with substition groups
FLACHET Nicolas
Nicolas.FLACHET at cstb.fr
Mon Dec 4 05:35:17 EST 2017
I think I was able to make a sample case with the problem.
I put the xsd-schema.xsd I'm using, a test-schema.xsd that emulate a simple cityGML element and the options and command line I'm using.
https://www.dropbox.com/s/njt4jzc658e2g6e/simple%20xsd.zip?dl=0
Best regards,
Nicolas
-----Message d'origine-----
De : xsd-users-bounces at codesynthesis.com [mailto:xsd-users-bounces at codesynthesis.com] De la part de FLACHET Nicolas
Envoyé : lundi 4 décembre 2017 11:06
À : xsd-users at codesynthesis.com
Objet : TR: [xsd-users] Problem with substition groups
Yes, I used --generate-polymorphic and --polymorphic-type-all.
I also use a xml-schema-custom that I get from the cityGML wiki page:
http://wiki.codesynthesis.com/Schemas/CityGML
I join my generated xs schema if it could be of any help.
Im' stuggling to make a simple case, as gml (and so forth cityGML) are massively using extension and substitution.
-----Message d'origine-----
De : Boris Kolpackov [mailto:boris at codesynthesis.com] Envoyé : samedi 2 décembre 2017 11:01 À : FLACHET Nicolas Cc : xsd-users at codesynthesis.com Objet : Re: [xsd-users] Problem with substition groups
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