[xsd-users] extending xsd
Boris Kolpackov
boris at codesynthesis.com
Thu Oct 30 14:16:49 EDT 2008
Hi Sumant,
Sumant Tambe <sutambe at dre.vanderbilt.edu> writes:
> In my xsd generator extension, I'm missing child elements of complex
> types if the complex type is derived from some other complex type, which
> defines the children in question. In that case, what can I do to detect
> that a complex type in schema is a derived type of some other type?
> Also, how do I get hold of the instance of that base type?
You can test it with the inherits_p() function:
SemanticGraph::Complex& c = ...
if (c.inherits_p ())
{
SemanticGraph::Type& base = c.inherits ().base ();
}
You can see in tree-header.cxx:2287 (3.2.0 source code) how the
inheritance of C++ classes is generated.
Boris
More information about the xsd-users
mailing list