[xsd-users] Re: Access Violation when deleting objects

Boris Kolpackov boris at codesynthesis.com
Wed Nov 14 07:04:27 EST 2007


Hi Bruno,

bruno.marotta at fortis.com <bruno.marotta at fortis.com> writes:

> About the string question as you may see here bellow the
> AssumedRecoveryLookup is a pure and simple string class.
> And it is only used on the asset class. So, why must it
> be a class and just a simple property from the Asset with
> type xml_schema::string? Isn't the transformation adding
> too much code for nothing?

Well, your schema defines AssumedRecoveryLookup by inheriting
from xsd:string but without adding any attributes or elements
to it. If you want your AssumedRecoveryLookup attribute/element
to have xml_schema::string as a type, then use xsd:string in
your schema. In other words, XSD cannot read your mind and
figure out when you want a proper type generated and when you
want a base class to be used instead.

Having said that, we are going to add generation of an extra
constructor for types like AssumedRecoveryLookup so that you
can pass a string literal instead of explicitly constructing
and instance.

Boris




More information about the xsd-users mailing list