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 5535 - Definition of [nil] is wrong
Summary: Definition of [nil] is wrong
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: Macintosh All
: P2 minor
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2008-03-05 17:00 UTC by C. M. Sperberg-McQueen
Modified: 2008-04-11 21:54 UTC (History)
0 users

See Also:


Attachments

Description C. M. Sperberg-McQueen 2008-03-05 17:00:49 UTC
Both in XSD 1.0 and in XSD 1.1, the property [nil] is described thus:

      true if clause 3.2 of Element Locally Valid (Element) (§3.3.4) 
      above is satisfied, otherwise false  

(although in 1.1 the section number is different).

The problem is that the relevant clause takes the form "if (conditions)
then (consequences)", where the conditions are (a) the element declaration
in question is nillable, (b) the element instance has an xsi:nil attribute,
and (c) the element instance has xsi:nil = true.  

If the element declaration is not nillable, or if the element instance
has xsi:nil = false, then the antecedent in clause 3.2's conditional 
is false, and clause 3.2 is thus satisfied.  This has as a consequence that
if element type my:E is nillable, then the instance

  <my:E xsi:nil="false">Unusual weather we're having here, 
   ain't it?</my:E>

seems to have [nil] = true.

The definition of [nil] needs to be recast.  One clumsy but accurate
change would be

      true if clause 3.2 of Element Locally Valid (Element) (§3.3.4) 
      above applies and is satisfied, otherwise false  

This issue is strictly speaking unrelated to that in bug 5257, but may be
solved for XSD 1.1 at the same time.
Comment 1 C. M. Sperberg-McQueen 2008-03-21 18:08:57 UTC
At our call today, the XML Schema WG agreed that this needs to be fixed,
and should be classed as needsDrafting.  No clone is needed for 1.0, since
the error was introduced inadvertently during a revision for 1.1.  

The editors expect a pending proposal for bug 5195 to address this problem.
Comment 2 C. M. Sperberg-McQueen 2008-04-11 21:54:32 UTC
This issue was resolved by the proposal at
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b5195.html
(member-only link) adopted by the WG 28 March 2008.