Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Turn XML Schema into sample document using XSLT >Thread Next - Fwd: RE: Resctriction problem on complexType Resctriction problem on complexTypeTo: <xmlschema-dev@---.---> Date: 7/13/2006 6:03:00 PM
Hi,
I have an error wuth the following schema using a restriction of a complexType.
The schema is not valid using different tools (SQC, XSDValid, Xerces, XmlSpy)...
But the error messages are not really understandable.
The aim is ti defne a restricted type by setting minOccurs to 1 to included choices.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="essai">
<xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="art1"/>
<xs:element ref="art2"/>
</xs:choice>
<xs:choice minOccurs="0">
<xs:element ref="s1" maxOccurs="unbounded"/>
<xs:element ref="s2" maxOccurs="unbounded"/>
</xs:choice>
</xs:choice>
</xs:complexType>
<xs:complexType name="essaiRestrict">
<xs:complexContent>
<xs:restriction base="essai">
<xs:choice>
<xs:choice maxOccurs="unbounded">
<xs:element ref="art1"/>
<xs:element ref="art2"/>
</xs:choice>
<xs:choice>
<xs:element ref="s1" maxOccurs="unbounded"/>
<xs:element ref="s2" maxOccurs="unbounded"/>
</xs:choice>
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="art1"/>
<xs:element name="art2"/>
<xs:element name="s1"/>
<xs:element name="s2"/>
</xs:schema>
Can anybody explain the problem ?
Thanks in advance
--
Bruno Chatel
Tel : (+33) (0)4 96 11 14 57
bcha@c...
http://www.chadocs.com
--------------------------------------
From mike@s... Thu Jul 13 14:14:30 2006
Received: from maggie.w3.org ([193.51.208.68] | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
