- From: Ian Stokes-Rees <ian@decisionsoft.com>
- Date: Fri, 12 Jan 2001 17:09:54 +0000
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
I would like to force a single document element to be valid in my
schema, however I have designed my sechma so it looks like (for
illustration purposes only):
<schema>
<element name="documentElement">
<complexType>
<element ref="someRefElement" minOccurs="0"
maxOccurs="unbounded"/>
</complexType>
</element>
<element name="someRefElement">
<complexType>
<attribute name="foo" use="required"/>
<attribute name="bar" use="required"/>
</complexType>
</element>
</schema>
And I would like this XML document to validate:
<documentElement>
<someRefElement foo="1" bar="2"/>
</documentElement>
But not have this validate:
<someRefElement foo="1" bar="2" />
(where "someRefElement" is the document element).
How can I use XSDL to enforce this?
Ian.
--
ian.stokes-rees@decisionsoft.com tel: +1865 203 192
DecisionSoft Ltd. fax: +1865 203 194
www.decisionsoft.com Oxford, UK, OX2 OEA
Received on Friday, 12 January 2001 12:09:47 UTC