Infinite recursion in generated code. (was: Re: [xsd-users] For <xs:restriction base="xs:anyType"> generated code does not compile.)

Boris Kolpackov boris at codesynthesis.com
Sat Nov 17 09:19:11 EST 2007


Hi Jeroen,

You get infinite recursion because you removed the required c-tor
with DOMAttr as first argument and added unnecessary c-tor with
simple_type as first argument. As a result, when a simple type is
constructed from DOMAttr in parsing.txx:82, the base type's c-tor
is called. While there is no constructor that takes DOMAttr, there
is one that takes simple_type. Implicit conversion is then used
and this continues forever.

You need to remove the c-tor with the simple_type argument and
add one with DOMAttr back.

Boris




More information about the xsd-users mailing list