EXTERNAL: Re: [xsd-users] Way To Determine Fully Qualified Type?
Friess, Jason
jason.friess at lmco.com
Tue Nov 29 17:17:31 EST 2011
Boris,
Thanks for your response. We do have polymorphism enabled and the type in question is derived from a polymorphic base. We are very interested in an approach you can point us to to get this information!
We are aware of the possibility of anonymous types in XML Schema - but we have made sure that no anonymous types are used in our XSD's.
Thanks!
Jason
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Tuesday, November 29, 2011 10:06 AM
To: Friess, Jason
Cc: xsd-users at codesynthesis.com
Subject: EXTERNAL: Re: [xsd-users] Way To Determine Fully Qualified Type?
Hi Jason,
Friess, Jason <jason.friess at lmco.com> writes:
> Is there a way to determine the fully qualified type (including XSD
> namespace) of an object? Specifically I'm wondering if there is a
> method that I can call on an instance of one of the classes generated
> from my XSD's by CodeSynthesis where the return type of this method
> would be a string representing the fully qualified type.
No, this information is not generally available. There is a way to get it if you have polymorphism enabled (--generate-polymorphic option) and the type in question is polymorphic or is derived from a polymorphic base (--polymorphic-type option). Internally this information is used to set the xsi:type attributes. Let me know if you are interested in this approach and I will provide more information.
Note also that XML Schema has a notion of anonymous types. While they are translated to named C++ classes, they don't have XML Schema names.
Boris
More information about the xsd-users
mailing list