- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 21 May 2002 17:52:39 +0100
- To: Jingkun Hu <hujingkun@yahoo.com>
- CC: xmlschema-dev@w3c.org
Hi Jingkun, > My question is if I can assign multiple types to a sequence of > elements with same element name. The following is a block of an > example: > > <xsd:complexType name="procedure_report"> > <xsd:sequence> > <xsd:element name="item" type="item_1" minOccurs="0"/> > <xsd:element name="item" type="item_2"/> > <xsd:element name="item" type="item_3" maxOccurs="unbounded"/> > <xsd:element name="item" type="item_4" minOccurs="0"/> > </xsd:sequence> > </xsd:complexType> No, you can't. This violates the "Element Declarations Consistent" constraint which states that, within a particular content model, all elements of the same name must have the same type. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Wednesday, 22 May 2002 02:51:45 UTC