<?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>2235</bug_id>
          
          <creation_ts>2005-09-14 19:36:27 +0000</creation_ts>
          <short_desc>R-243: Can an attribute prohibited by restriction be added back through a subsequent extension?</short_desc>
          <delta_ts>2009-04-21 19:21:39 +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>Structures: XSD Part 1</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>important, hard</status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <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>6263</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 19:36:27 +0000</bug_when>
    <thetext>The REC says in clause 1.5 of Schema Component Constraint: Derivation Valid 
(Extension): 

Note: This requirement ensures that nothing removed by a restriction is 
subsequently added back by an extension. 

That is where the REC tries to answer &quot;no&quot; to the question of &quot;whether an 
attribute [or element] removed by restriction could be added back in an 
extension.&quot; However the constraint itself, in my view, fails to achieve this, 
so processors which allow it are not broken. 

I think we should fix this one way or another: 

1. No constraint on re-introduction; 
2. No re-introduction of any kind (apparent intention of current REC); 
3. Re-introduction of unchanged originals only (what the current REC actually 
says)? 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2004JanMar/0005.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12181</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2006-09-29 02:03:36 +0000</bug_when>
    <thetext>It&apos;s hard to reconstruct all of the arguments that led to the requirement
that in principle it should be possible to derive any type in three steps
from xsd:anySimpleType:  the first non-primitive ancestor, then one extension
step, then one restriction step.  So I&apos;m diffident about this analysis.

But it seems to me that flavor 3 (reintroduction of unchanged originals
is OK) is not only what the status quo says, but what is most useful to
say.

Given a chain of derivations from some type T, in which restrictions and extensions both occur, it&apos;s useful to know that if any attribute A is
optional in type T, with a binding to a specific simple type S, then in
any type T&apos; derived from T in any number of steps, that A may be present
or may be absent, and if present it will always have type S, or a 
restriction of S.  That&apos;s guaranteed by 3, and by the formulation of the
actual rule.  It&apos;s not guaranteed by 1, which I dislike for that reason.

The constraint (2) actually formulated in the Note (once gone, nothing comes
back -- reminds me of J. K. Rowling&apos;s rules about magic and death) amounts
to saying yes, not only will A always have S or a restriction of S if
it&apos;s around, but the portions of the type hierarchy where A is allowed
will form a tree, not a forest.  I hate to say of any fact that it&apos;s
uninteresting (it seems to suggest a failure of imagination), but this
doesn&apos;t seem particularly relevant to any story about types and 
the substitutability of values.  When considering type coercions and
the acceptability of a value, we typically consider two types: the
one expected and the one encountered.  The details of the chain
connecting them (in a name-based system) isn&apos;t relevant, only which
invariants are guaranteed to hold between these two types.

I think the correct fix is to revise the Note to say &quot;nothing removed
by a restriction is subsequently added back by an extension with a
conflicting type assignment&quot; or &quot;... in an incompatible way&quot;.

Is that plausible?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12571</commentid>
    <comment_count>2</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2006-10-21 20:27:35 +0000</bug_when>
    <thetext>On 20 October 2006 the WG accepted the suggestion in comment #1 and
agreed to close the issue accordingly.  The note in question has been
modified to say &quot;nothing removed by a restriction is subsequently 
added back by an extension with a conflicting type assignment&quot;; the 
change is now in the status-quo document and will appear in due course
as part of the next published working draft.
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12618</commentid>
    <comment_count>3</comment_count>
    <who name="Noah Mendelsohn">noah_mendelsohn</who>
    <bug_when>2006-10-27 14:57:26 +0000</bug_when>
    <thetext>&gt; &quot;nothing removed by a restriction
&gt; is subsequently added back by an
&gt; extension with a conflicting type
&gt; assignment&quot;; 
At risk of taking time at a valuable point in our process, is there any issue with adding something back in a way that is inconsistent with respect to something other than type?  An in consistent value constraint, perhaps (Base has fixed=&quot;a&quot;, nth step derivation has fixed=&quot;b&quot;)?

I haven&apos;t researched in detail.  If others who are expert think there&apos;s no issue here, then let&apos;s move past this very quickly.  I&apos;m just raising it in case anyone with more detailed knowledge than I have says: &quot;oops, right, badly broken&quot;

Thanks.
Noah</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>