restriction validation

Hello,

I'm a newbie at XML Schema, but I have to write a parser that can deal
with every valid schema.

I tried to look at "XML Schema Part 1" to find find the information that
could help me to validate facet constraints for a restriction, but I 
haven't found it.

If I had a document with incompatible length constraint:

EXAMPLE
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
   <xs:element name="elem">
      <xs:complexType>
         <restriction base="string">
            <xs:maxLength value="2"/>
            <xs:minLength value="5"/>
         </restriction>
      </xs:complexType>
   </xs:element>
</xs:schema>

I haven't find a rule that invalid this schema. 
I would therefore know if it is valid or not ?

And if I had a document with two times the same length facet, is it valid or
not ?

Example:
?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
   <xs:element name="elem">
      <xs:complexType>
         <restriction base="string">
            <xs:minLength value="2"/>
            <xs:minLength value="5"/>
         </restriction>
      </xs:complexType>
   </xs:element>
</xs:schema>

If it is legal, which one of the minLength is to be considered ?

Thank you.

--
Michaël Marchegay, Stagiaire France Telecom R&D du 11/02/2002 au 26/07/2002
Sous la responsabilité d'Olivier Dubuisson
DTL/TAL - 22307 Lannion Cedex - France

Received on Thursday, 28 March 2002 11:29:38 UTC