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

facets not working

From: Blaine Simpson <blaine.simpson@admc.com>
Date: Fri, 8 Feb 2002 17:16:48 -0500 (EST)
Message-Id: <200202082215.g18MFKY08204@bifrost.admc.com>
To: xmlschema-dev@w3.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is about your XML Schema Validator.


For both anonymous and named simpleType declarations, restriction facets
result in valid xsd (as they should), but these tests never fail regardless
of the data in the .xml file.

<base:simpleType name="biword"> <base:restriction base="base:string">
    <base:pattern value="ABCDE"/>
</base:restriction> </base:simpleType>

AND
            <base:element name='species'>
               <base:simpleType><base:restriction base="base:string">
                    <base:pattern value="ABCDEFG"/>
                    <base:maxLength value="5"/>
                </base:restriction></base:simpleType>
            </base:element>


The actual length or pattern in the .xml doesn't matter.  The anonymous
declaration above should actually never succeed because no patterm 
matching ^ABCDEFG$ could be 5 chars long.  Here's some .xml that it 
successfully validates:

    <species>alpha alfa three</species>
    <species>bisonismutatis</species>
    <species>homo afaricanis</species>

As you can see, the strings are not 5 chars long, nor do they consist
of the regex "ABCDEFG".
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8ZE18ji/kU3ud00URAoqhAKCKlw8WNbaVbDvCdvN0WKI2RtJZCACfZq4/
yNU7S8WgvImnEYgWrfkRXgQ=
=5aRN
-----END PGP SIGNATURE-----
Received on Saturday, 9 February 2002 05:18:50 GMT

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