Hello, <xsd:attribute name="role" type="xsd:string"/> <xsd:attribute name="title" type="xsd:string"/> <xsd:element name="price" type="xsd:string"/> <xsd:attributeGroup name="secondGroup"> <xsd:attribute name="name" type="xsd:string" fixed="extended" form="qualified"/> </xsd:attributeGroup> <xsd:attributeGroup name="firstGroup"> <xsd:attribute name="type" type="xsd:string" fixed="extended" form="qualified"/> <xsd:attributeGroup ref="test:secondGroup"/> <xsd:attribute ref="test:title" use="optional"/> </xsd:attributeGroup>
Supppose I have the following schema above and I am using XML Schema API. I am parsing attribute groups and I want to find out all XSAttributeUse that an XSAttributeGroupDefinition contains. I don't have an issue of finding all XSAttributeUses for XSAttributeGroupDefinition. My issue is when parsing a XSAttributeGroupDefinition and encountering a XSAttributeUse I don't know how to identify whether that attributeUse is obtained from another attributeGroup or not. For example: When I parse secondGroup I get a singe attribute name. When I parse firstGroup I get three XSAttributeUses: type, name and title. What I would like to somehow figure out is that attributeGroup (firstGroup) contains another attributeGroup (secondGroup ) and that XSAttributeUse with the name set to name is actually an attribute defined by the first attributeGroup. I haven't been able to determine that at all. By using XML Schema API all I able to figure out is that firstGroup contains three attributes. So the following schema <xsd:attributeGroup name="firstGroup"> <xsd:attribute name="type" type="xsd:string" fixed="extended" form="qualified"/> <xsd:attributeGroup ref="test:secondGroup"/> <xsd:attribute ref="test:title" use="optional"/> </xsd:attributeGroup> Is identical to this schema <xsd:attributeGroup name="firstGroup"> <xsd:attribute name="type" type="xsd:string" fixed="extended" form="qualified"/> <xsd:attribute name="name" type="xsd:string" fixed="extended" form="qualified"/> <xsd:attribute ref="test:title" use="optional"/> </xsd:attributeGroup> Thank you, Srdjan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]