You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mark Brucks <br...@charter.net> on 2009/09/04 00:45:37 UTC

derived types

Is there any way (short of brute force) to determine all the types  
that are extensions of a given type (the inverse of  
XSTypeDefinition.getBaseType())?  What I really need to do is to  
create the entire set of type hierarchies, so that given any type I  
can determine ALL types that are derived from it.

Thanks - Mark Brucks


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: derived types

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

Brute force is the way to do it and it only works if your working set at
the time of your search is the complete set (obviously needs to be finite)
of schemas which could ever be loaded by your application. Otherwise you
can't be sure you found everything because more schemas you didn't know
about (e.g. those specified in instance documents with xsi:schemaLocation)
at the time you did your analysis could be loaded later that have types
which derive from the base.

Thanks.

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

Mark Brucks <br...@charter.net> wrote on 09/03/2009 06:45:37 PM:

> Is there any way (short of brute force) to determine all the types
> that are extensions of a given type (the inverse of
> XSTypeDefinition.getBaseType())?  What I really need to do is to
> create the entire set of type hierarchies, so that given any type I
> can determine ALL types that are derived from it.
>
> Thanks - Mark Brucks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org