- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Wed, 7 Nov 2001 15:50:53 +0000
- To: "Garrett Steed" <gmsteed@seasllc.com>
- CC: xmlschema-dev@w3.org
Hi Garrett, > I would like to specifically disallow this: > Absent c element: <t><t> <t/> > When parsing a document there must be a string with in the <t/> tags. It's still a little unclear, I'm afraid. I think you're saying that you want to say that the t element must contain a c element. If so, you can do that in XML Schema with: <xs:element name="t"> <xs:complexType> <xs:sequence> <xs:element name="c" /> </xs:sequence> </xs:complexType> </xs:element> The following would both be valid (assuming that the c element declaration means that the c element can have empty content and is nillable): <t><c /></t> <t><c xsi:nil="yes" /></t> Whereas the following would be invalid: <t></t> <t /> <t><d /></t> <t><c /><c /></t> If you want to allow the c element to repeat, you should use the maxOccurs attribute. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Wednesday, 7 November 2001 10:50:56 UTC