[xsd-users] Customize sequence and optionals

Boris Kolpackov boris at codesynthesis.com
Wed Jan 28 03:16:58 EST 2009


Hi Stefan,

WEBER Stefan <stefan.weber at efgfp.com> writes:

> Thanks for the hint. This indeed will require quite a bit of
> customization, I'll need to check whether this is worth it. The main
> concern I have with this is that it makes me redefine a non-virtual
> function coming from OuterBase...

Another, probably easier, approach would be to customize the parsing
constructor for Outer. In it you will fist call the OuterBase version
and then initialize the missing optional elements with default value.
This way you won't need to "hide" any functions. The only drawback of
this approach is that the user of your object model will still have to
go though the optional interface though the check for presence is no
longer necessary.

Boris




More information about the xsd-users mailing list