[xsd-users] Problem with ostream output of anonymous types and substitution groups

Boris Kolpackov boris at codesynthesis.com
Thu Dec 15 06:21:06 EST 2011


Hi Ray,

Ray Lischner <rlischner at proteuseng.com> writes:

> There seems to be a problem with ostream output of anonymous polymorphic 
> types, using substitution groups. 
>
> [...]
>
> When I run the driver, I get a type_info exception:
> 
> no type information available for type ''

Yes, this is a bug. XSD is too aggressive in trying to minimize the
number of types treated as polymorphic. I have fixed it and the
patch is available here:

http://scm.codesynthesis.com/?p=xsd/xsd.git;a=commit;h=4c408a85759eb42b6b84b8cdab81453df31cd289

Let me know if you need a pre-release binary.


> Also, the name "base" is printed instead of "der1" or "der2".

I agree it would be nice if XSD printed the substituted element names.
However, this will complicate things quite a bit plus XSD will only
be able to print some substituted name, not necessarily the one that
was used in the XML document, in case there is more than one element
with the same type. So at the moment I tend to prefer to leave it as
is (i.e., XSD prints static element names).


Thanks for reporting this!

Boris



More information about the xsd-users mailing list