[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Schema Component Constraint: length valid restriction

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Wed, 30 Mar 2005 14:06:09 +0200
To: XML-SCHEMA <xmlschema-dev@w3.org>
Message-Id: <1112184369.1297.12.camel@librax>
xsd valid restriction

Hi,

"Length valid restriction" says: 
"It is an ·error· if length is among the members of {facets} of {base
type definition} and {value} is not equal to the {value} of the parent
length."

Xerces 2.6.2 and XSV 2.7 seem to handle this constraint differently.

Example:
<xsd:simpleType name="fooType">
  <xsd:restriction>
    <xsd:simpleType>
      <xsd:restriction base="xsd:string">
        <xsd:length value="2"/>
      </xsd:restriction>
    </xsd:simpleType>			
    <xsd:length value="1"/>
  </xsd:restriction>
</xsd:simpleType> 

While XSV does not report an error, Xerces reports:
"(Error) length-valid-restriction: Error for type 'fooType'. The value
of length = '1' must be = the value of that of the base type '2'."

Whom to follow here?

If this is not a bug in the spec, what is the intention of disallowing
to restrict the length of e.g. a string?

Regards,

Kasimier
Received on Wednesday, 30 March 2005 12:06:16 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.