I don't think there's a reliable way to get the info you're looking for
through the API. There is no component for a reference to an attribute
group.  The attributes just get absorbed into the complex type definition.

Remember that Xerces' XML Schema API provides a schema component centric
view of an XML Schema. Often you can find ways to map back to XML schema
document concepts, but that isn't possible in general.

Thanks.

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

RJ <rjotw...@dag.com> wrote on 03/31/2011 02:50:03 PM:

> RJ <rjotwani <at> dag.com> writes:
>
> >
> > The XSComplexTypeDecl.getAttributeUses also returns attributes
belonging to
> > AttributeGroups.
> > I use the XSAttributeDecl.getParent() method to distinguish between the
2
> > scenarios.
> > XSAttributeDecl.getParent() method :
> > 1)returns null when the attribute is member of a AttributeGroup
> > 2)returns XSComplexTypeDecl when the attribute is local attribute of a
> > complexType.
> >
> > In Scenario 1 is there a way to find out the parent AttributeGroup.
>
>
> In Scenario 1 I also checked XSComplexTypeDecl.getAttrGrp().getName()
returns
> null.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to