<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6447</bug_id>
          
          <creation_ts>2009-01-19 15:05:28 +0000</creation_ts>
          <short_desc>minLength and length both present</short_desc>
          <delta_ts>2009-01-23 16:36:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Datatypes: XSD Part 2</component>
          <version>1.1 only</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsAgreement</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>6446</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>23152</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-01-19 15:05:28 +0000</bug_when>
    <thetext>Bug #6446 points out that (minLength=1, length=6) is illegal unless the type happens to be derived from a type with (minLength=1).

This rule and its consequence for this test shows why paternalism is bad. The minLength constraint here is redundant, whether or not it is present on the base type, and in both cases it does no harm. Requiring a processor to accept it in one case and reject it in the other is crazy - and the fact that this test result has gone unchallenged until now suggests that processors are not doing this properly.

The rule that allows the combination (length, minLength) if minLength is unchanged from the base type is there because minLength might be automatically inherited from the base type. Essentially, because the constraint is at the component level, we don&apos;t know whether the facet was inherited or not, so it would be better not to guess. If we want to have rules that constrain the set of &quot;locally-defined facets&quot;, we should put such rules at the XML representation level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23153</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-01-19 15:17:30 +0000</bug_when>
    <thetext>Just to illustrate the absurdity of the rules further: while it is legal to specify (minLength=1, length=6) on a type derived from NMTOKENS, because NMTOKENS has minLength=1, it is not legal to specify (minLength=1, length=6) on a type derived from NMTOKEN, because although NMTOKEN has a minimum length of 1, this is achieved using a pattern facet rather than a minLength facet.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23197</commentid>
    <comment_count>2</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2009-01-21 00:12:02 +0000</bug_when>
    <thetext>Speaking for myself, I agree that the current rules are broken and should
be changed.  (My preference is to change them as part of a systematic
effort to remove the ad hoc paternalistic rules of the spec.)  But I note
that the WG has in fact discussed either this precise question, or closely
related questions, before, and established that (at least at that time) we
could not achieve consensus either way on what to do about them.  See,
for example, the minutes of the meeting in Redmond in August, 2004 (discussion
of RQ-147b) at

  http://www.w3.org/XML/Group/2004/08/xml-schema-ftf-minutes.html#id2608195

The minutes do not show, but I remember fairly vividly, that we spent an
hour or two on the issue, and feelings ran rather high; they do show
that we did not achieve any consensus at all.

So my personal recommendation is to classify this issue, in view of the
calendar date, as LATER.  I&apos;d like to resolve it, but I do not want to
delay XSD 1.1 for a fruitless attempt to reach consensus on it, or even for
a successful revision of the spec in this regard.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>