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 Nagaraj Mandya <nm...@gmail.com> on 2010/05/04 13:27:55 UTC

Question figuring out if a particle is from a base class

Hello,
  I am trying to use Xerces-J's XML schema API to parse and analyze a
schema. As I am iterating through the XSModel, I get the XSParticle from an
XSComplexTypeDefinition and iterate over its terms. I find that I am getting
the XSElementDeclaration objects for all elements defined in both in the
current complex type definition and the ones in its base types.

  How can I distinguish which elements are from the current complex type and
which ones are from the base types? Thanks.
--
Regards,
Nagaraj

Re: Question figuring out if a particle is from a base class

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

If you're looking at an extension, the particle returned from the
XSComplexTypeDefinition should contain a sequence XSModelGroup with its
first particle being the same as the XSParticle from the base type.

Thanks.

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

Nagaraj Mandya <nm...@gmail.com> wrote on 05/04/2010 07:27:55 AM:

> Hello,
>   I am trying to use Xerces-J's XML schema API to parse and analyze
> a schema. As I am iterating through the XSModel, I get the
> XSParticle from an XSComplexTypeDefinition and iterate over its
> terms. I find that I am getting the XSElementDeclaration objects for
> all elements defined in both in the current complex type definition
> and the ones in its base types.
>
>   How can I distinguish which elements are from the current complex
> type and which ones are from the base types? Thanks.
> --
> Regards,
> Nagaraj,