Hello David, The error being reported is in accordance with the original schema rec [1], however an erratum [2] was issued allowing the length facet to be specified on a different derivation step than minLength/maxLength. We're aware of this discrepancy, but haven't fixed it yet. (By the way, this doesn't concern 'fixed' on minLength which prevents a derivation step from respecifying that facet again with a different value.) If you'd like to open a bug report, please do.
Thanks. [1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#length-coss [2] http://www.w3.org/2001/05/xmlschema-errata#E2-35 On Mon, 22 Dec 2003, David Sheldon wrote: > Using the schema below, and a sample xml file, I get an error that I do > not believe that I should receive. > > On xerces�j I get: > > [Error] file: null a.xml:1:143: Datatype error: It is an error for both > length and minLength to be members of facets.. > > On xerces2-j I get: > > [Error] file: null c.xsd:21:45: length-minLength-maxLength: It is an > error for both length and either of minLength or maxLength to be > specified. > > > Now, the definition for c does not have minLength and length. baseType > has minLength and c just has length. It appears that because the > minLength facet on the basetype is fixed, it objects to me setting the > length. Xerces-C doesn't object to this, and I can see nothing in the > spec that says that anything should object to it. > > Is this a bug that I should report? > > Oh, and can anyone explain what on earth the point of fixed attributes > on facets is? Given that you can only restrict a type to be more > restrictive. A use-case might be handy. > > David > > <?xml version="1.0" encoding="UTF-8" ?> > <!-- > Schema, showing but with inheriting fixed minLength > --> > <xsd:schema xmlns:test="http://example.com/test1" > targetNamespace="http://example.com/test1" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0" id="core" > elementFormDefault="qualified" attributeFormDefault="unqualified"> > <xsd:simpleType name="baseType"> > <xsd:restriction base="xsd:string"> > <xsd:minLength value="1" fixed="true"/> > </xsd:restriction> > </xsd:simpleType> > > > <xsd:element name="c"> > <xsd:simpleType> > <xsd:restriction base="test:baseType"> > <xsd:length value="5"/> > </xsd:restriction> > </xsd:simpleType> > </xsd:element> > </xsd:schema> --------------------------- Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
