W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2005

XSV - simple type restriction - length facet

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Tue, 09 Aug 2005 17:50:50 +0200
To: XML-SCHEMA <xmlschema-dev@w3.org>
Message-Id: <1123602650.11825.11.camel@librax>

Hi,

XSV 2.10-1 does not catch restriction constraints for the "length"
facet.

Example:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:simpleType name="type-1">
		<xsd:restriction base="xsd:string">
			<xsd:length value="5"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="type-2">
		<xsd:restriction base="type-1">
			<xsd:length value="4"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>

XSV reports:

<xsv xmlns="http://www.w3.org/2000/05/xsv" docElt="{None}foo"
     instanceAssessed="true" instanceErrors="0" schemaErrors="0"
     schemaLocs="None -> length.xsd"
     target="file:///p:/libxml2-lab/tests/2005-08-09/length.xml"
     validation="lax" version="XSV 2.10-1 of 2005/04/22 13:10:49">
  <schemaDocAttempt
URI="file:///p:/libxml2-lab/tests/2005-08-09/length.xsd"
                    outcome="success" source="schemaLoc"/>
</xsv>

Xerces-J 2.5.1 reports:

length-valid-restriction: Error for type 'type-2'. The value of length =
'4' must be = the value of that of the base type '5'.

I cannot recall if I already reported this, so excuse me
if I did.


Regards,

Kasimier
Received on Tuesday, 9 August 2005 16:01:49 GMT

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