- From: Ayalew Kassahun <A.Kassahun@InfoRay.NL>
- Date: Tue, 20 Mar 2001 17:42:18 +0100
- To: xmlschema-dev@w3.org
- Cc: ht@cogsci.ed.ac.uk
But that is exactly what I want to have (ok to same effect), how do I specify that? What I mean is I want to have <RESPONSE> <RESULT> <PART NAME="HEADER"> <PART NAME="CONTENT"> <EXTRA> </RESULT> </RESPONSE> whereby the PART's (of which i have a long list) should always have the given attribute and attribute-value (fixed) and each occur only once. thanks in advance for any suggestions, ayalew > -----Original Message----- > From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk] > Sent: Tuesday, March 20, 2001 3:12 PM > To: Ayalew Kassahun > Cc: xmlschema-dev@w3.org > Subject: Re: Is this valid schema?? > > > Ayalew Kassahun <A.Kassahun@InfoRay.NL> writes: > > > hi list: > > > > > > xmlspy allows me to make (it validates) the following > schema snipet, but i > > am suspecious about it. Is it allowed to have more than one > "PART" element > > that vary only on a value of an attribute in the element RESULT. > > > > can someone enlighten me. > > > > regards, > > ayalew > > > > <xsd:complexType name="RESPONSE"> > > <xsd:choice> > > <xsd:element name="RESULT"> > > <xsd:complexType> > > <xsd:sequence> > > <xsd:element name="PART"> > > <xsd:complexType> > > <xsd:attribute name="NAME" type="xsd:string" use="fixed" value="HEADER"/> > > </xsd:complexType> > > </xsd:element> > > <xsd:element name="PART"> > > <xsd:complexType> > > <xsd:attribute name="NAME" type="xsd:string" use="fixed" value="CONTENT"/> > > </xsd:complexType> > > </xsd:element> > > </xsd:sequence> > > </xsd:complexType> > > </xsd:element> > > <xsd:element name="EXTRA"/> > > </xsd:choice> > > <xsd:attribute name="NAME"/> > > </xsd:complexType> > > You're right, this should not be allowed, because the two parts have > different types. > > ht > -- > Henry S. Thompson, HCRC Language Technology Group, > University of Edinburgh > W3C Fellow 1999--2001, part-time member of W3C Team > 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) > 131 650-4440 > Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk > URL: http://www.ltg.ed.ac.uk/~ht/ >
Received on Tuesday, 20 March 2001 11:28:12 UTC