You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Gordon Brown <go...@yahoo.com> on 2011/10/10 21:08:20 UTC

get derived complex types from an abstract type

Hi All,

A quick question. In a given XML schema, if I have have a handle to an abstract complex type (for example a pointer to a ComplexTypeInfo which is an abstract type), is there an API to get all the derived complex types from that abstract type? What would be the best way to get the list of all the derived types?

I know I can go through all the complex types to find out if their base type is the abstract type, but I thought there should be a better way to do it.

Thanks in advance!
Gordon

Re: get derived complex types from an abstract type

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Gordon,

There's no such method in the XSModel API. Computing the set of derived
types requires a brute force search over all the complex types as you
suggested.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Gordon Brown <go...@yahoo.com> wrote on 10/10/2011 03:08:20 PM:

> Hi All,
>
> A quick question. In a given XML schema, if I have have a handle to
> an abstract complex type (for example a pointer to a ComplexTypeInfo
> which is an abstract type), is there an API to get all the derived
> complex types from that abstract type? What would be the best way to
> get the list of all the derived types?
>
> I know I can go through all the complex types to find out if their
> base type is the abstract type, but I thought there should be a
> better way to do it.
>
> Thanks in advance!
> Gordon

Re: get derived complex types from an abstract type

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Gordon,

There's no such method in the XSModel API. Computing the set of derived
types requires a brute force search over all the complex types as you
suggested.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Gordon Brown <go...@yahoo.com> wrote on 10/10/2011 03:08:20 PM:

> Hi All,
>
> A quick question. In a given XML schema, if I have have a handle to
> an abstract complex type (for example a pointer to a ComplexTypeInfo
> which is an abstract type), is there an API to get all the derived
> complex types from that abstract type? What would be the best way to
> get the list of all the derived types?
>
> I know I can go through all the complex types to find out if their
> base type is the abstract type, but I thought there should be a
> better way to do it.
>
> Thanks in advance!
> Gordon