Hi Amy: I find your question a bit confusing but
tolerance of ambiguity is the hallmark of the good consultant, so here is a
simple answer, based on what I think you most likely want to achieve. Unless the business/application context
prevents you, you can add grad_address to the data
model of grad_student as a sub-element like this: <xsd:complexType name="grad_student">
<xs:element ref="xyz:grad_address" maxOccurs="unbounded" />
</xs:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexContent> This says a grad_student must have one or more
grad_addresses. You literally extend types, not elements. But you can
have multiple levels of derivation by extension. So if you really wanted
to extend grad_address (which is already an extension of address) you could:
<xsd:complexType name="graduate_address"> And then use graduate_address in my first example instead of grad_address
so that you could use address_category to differentiate between campus
addresses and home addresses, for instance. [Examples not validated] BTW, some places follow the naming convention of adding …type
to the names of the complex types to avoid confusion with element names. If this is not the answer you need, I will let the big guns
take over Cheers
Jack Lindsey From:
Amy Wong [mailto:amy_wanes@yahoo.com] Hi, <xsd:complexType name="grad_student"> </xsd:complexContent>
Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone
call rates. |