Hi, I'm trying (still) to dynamically build a graph of XSD type declarations and their dependencies in arbitrary XSD schemas. So far everything but this works: if a named model group is defined in its own declaration and later referenced from inside a complex content type, I don't see how to get the name of the model group from the complex type's PSVI interface(s).
Here is a sample schema: (note the line <xsd:group ref="descriptionGroupType" minOccurs="0"/> which is where the problem is). So how do I get the name of a model group being referenced by name from inside a complex content declaration? Similarly if an attribute group is referenced from inside a complex content declaration how do I get the name of the attribute group referenced? <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <!-- the root element for test --> <xsd:element name="purchaseOrderDocument"> <xsd:complexType> <xsd:complexContent> <xsd:extension base="purchaseOrderType"/> </xsd:complexContent> </xsd:complexType> </xsd:element> <xsd:simpleType name="itemType"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"/> </xsd:restriction> </xsd:simpleType> <xsd:group name="descriptionGroupType"> <xsd:sequence> <xsd:element name="description" type="xsd:string"/> <xsd:element name="comment" type="xsd:string" minOccurs="0"/> </xsd:sequence> </xsd:group> <xsd:complexType name="purchaseOrderType"> <xsd:sequence> <xsd:element name="item" type="itemType"/> <xsd:group ref="descriptionGroupType" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:schema> Elisha Berns [EMAIL PROTECTED] tel. (310) 556 - 8332 fax (310) 556 - 2839 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]