W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

restriction validation

From: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN <michael.marchegay@rd.francetelecom.com>
Date: Thu, 28 Mar 2002 17:25:50 +0100
Message-ID: <0489A7888F080B4BA73B53F7E145F29A1B0AA2@LANMHS20.rd.francetelecom.fr>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT