This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5781 - identity constrailnt rules refer to 'node sets' - should be 'node sequences'
Summary: identity constrailnt rules refer to 'node sets' - should be 'node sequences'
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: Macintosh Mac System 9.x
: P2 normal
Target Milestone: CR
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2008-06-22 14:18 UTC by C. M. Sperberg-McQueen
Modified: 2009-04-20 22:07 UTC (History)
2 users (show)

See Also:


Attachments

Description C. M. Sperberg-McQueen 2008-06-22 14:18:17 UTC
The Validation Rule: Identity-Constraint Satisfied refers several times to
'node sets'.  This phrasing is inherited from XSD 1.0, but makes no sense
in an XPath 2.0 context.  The rule should be revised to eliminate use of the
term.  (It might usefully be recast for clarity in addition.)
Comment 1 C. M. Sperberg-McQueen 2009-04-13 00:26:59 UTC
A wording proposal intended to resolve this issue is at 
 
  http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b5781.html
  (member-only link)

Comment 2 Sandy Gao 2009-04-13 15:57:25 UTC
I continue to believe that we should not use "sequence" in identity constraint discussions.

I think the differences between "set" and "sequence" (no ordering; no duplicate) match better with identity constraints.

XPath 2.0 moved to sequence for its own reasons. Have we examined that those reasons apply to identity constraints?

Do we know that identity constraint works as expected if the "qualified node sequence" or "target node sequence" contains duplicates? (May not be possible given the current IDC xpath subset, but is that what we want to assume here?) Seems "unique" and "key" rules will always return "invalid" for duplicate items.

The only change we really need seems to be from "all the {fields} evaluate to a node-set" to "all the {fields} evaluate to a node sequence".
Comment 3 Dave Peterson 2009-04-13 16:29:21 UTC
(In reply to comment #0)
> The Validation Rule: Identity-Constraint Satisfied refers several times to
> 'node sets'.  This phrasing is inherited from XSD 1.0, but makes no sense
> in an XPath 2.0 context.

(In reply to comment #2)
> I continue to believe that we should not use "sequence" in identity constraint
> discussions.

> The only change we really need seems to be from "all the {fields} evaluate to a
> node-set" to "all the {fields} evaluate to a node sequence".

As far as I can tell, this is the minimal change required for compatibility with XPath 2.0 .  We do carefully acknowledge that XPath produces sequences, and then explicitly extract the set of terms/values/whatever-you-call-them in the sequence, so our definitions of assorted "sets" do not conflict.

It would be better to recast the definition for clarity to eliminate the "is called", using the "the xxx is yyy" format as is used in the other three added or deleted definitions.
Comment 4 Dave Peterson 2009-04-13 17:23:26 UTC
(In reply to comment #3)

> It would be better to recast the definition for clarity to eliminate the "is
> called", using the "the xxx is yyy" format as is used in the other three added
> or deleted definitions.

Assuming Sandy's objection is upheld, I suggest that the definition of qualified node set be:

"[Definition:]  The qualified node set is that subset of the ·target node set· for which all the {fields} evaluate to a node sequence one of whose members is an element or attribute node with a ·non-absent· [schema actual value]."
Comment 5 David Ezell 2009-04-17 16:54:41 UTC
5781: identity constraint rules refer to 'node sets' - should be
'node sequences'

http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b5781.html

Summary: issue requests that we align our terminology with QT's
by saying 'sequence' not 'set'.

There has been discussion; SG opposes most of the change.

MSM's recommendation:  fairly quick.

   - Amend the proposal by substituting 'set' for 'sequence'
     passim, EXCEPT in the phrase "nodes for which all the
     {fields} evaluate to a node sequence".  Note that for the
     most part, this amounts to reverting the proposal. (It turns
     into a proposal for changing one instance of 'set' to
     'sequence' and rephrasing a definition.)

   - Adopt as amended.

Comment 6 Sandy Gao 2009-04-20 21:23:46 UTC
During its 2009-04-17 telecon, the schema WG adopted the proposal in comment #5 to address this issue.

With this change, the WG believes that the issue raised in this bug report is addressed. I'm marking this RESOLVED accordingly.

Michael, if you would indicate your concurrence with or dissent from the WG's disposition of the comment by closing or reopening the issue, we'll be grateful. If we don't hear from you in the next two weeks, we'll assume that silence implies consent.