<?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>2543</bug_id>
          
          <creation_ts>2005-11-21 14:54:29 +0000</creation_ts>
          <short_desc>Unique constraint misinterpretation.</short_desc>
          <delta_ts>2007-01-12 16:02:54 +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>1.1 only</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>important, work, idc cluster</status_whiteboard>
          <keywords>editorial</keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>4201</blocked>
    
    <blocked>4202</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yevgeniy Tishkin">etishkin</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>sandygao</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>7242</commentid>
    <comment_count>0</comment_count>
    <who name="Yevgeniy Tishkin">etishkin</who>
    <bug_when>2005-11-21 14:54:29 +0000</bug_when>
    <thetext>Hi,
 
Proposed change for the unique constraint definition is:
Change paragraph 3.11.4 by adding a new clause 4.1.1 to make it clear that not
all fields must be present.

3.11.4 Identity-constraint Definition Validation Rules
...
  
4.1.1 The ·target node set· is a subset of the ·qualified node set·, that is,
every member of the ·target node set· is also a member of the ·qualified node
set· however not every member of ·taget node set· is a member of ·qualified node
set·.
...
 
 
Why this is important?
 
Xerces parser has a bug 18405, which has not been resolved since 2003.
The reason for not fixing is :
&quot; ... I (and some others I&apos;ve asked) think 
that the spec seems open to interpretation here; so I&apos;m marking this bug 
invalid for now.  I&apos;d encourage you to pose a question to the Schema working 
group via their comments list; if you get a response that demonstrates that 
your reading is correct, please reopen this bug with the appropriate text and 
I&apos;ll try and fix it when I get a chance.&quot;
 
The below is the comment from Xerces parser BUG 18405 report:
================================================ 
&quot;3 For each node in the
·target node set·
all of the
{fields},
with that node as the context node, evaluate to either an empty node-set or a 
node-set with exactly one member, which must have a simple type.&quot;

The target node set is the set of nodes on which the selector is matched.  Note 
that this condition must hold for *any* identity constraint; only in bullet 4 
of the tableau are the differences between key and unique described.  
Therefore, it seems clear that, if a selector matches, then either all of the 
fields must match or none of them must match; even for xsd:unique, you can&apos;t 
have some fields matching.
=========================================================
 
 
Thanks,
Eugene</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13480</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2007-01-12 16:02:54 +0000</bug_when>
    <thetext>The Schema WG discussed this issue at its 2007-01-05 telecon, and decided to close this bug without adopting the suggested changes.

The 1.0 specification may be unclear with respect to whether &quot;unique&quot; values are allowed to be &quot;partial&quot;. The updated rules in 1.1 is believed to have clarified this.

It may still be helpful to have a note to make this explicit to avoid further mis-interpretation. Bug 4202 is opened to track this, which is purely editorial.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>