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 2544 - RQ-146: needs clarification re. wildcards
Summary: RQ-146: needs clarification re. wildcards
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: All All
: P4 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: medium, work
Keywords: resolved
: 2823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-21 15:50 UTC by Sandy Gao
Modified: 2009-04-21 19:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2005-11-21 15:50:49 UTC
Consider the following "tricky" indirect case involving a wildcard referencing 
a global element:

<element name="a" type="string"/>
<complexType name="example-2">
  <sequence>
    <element name="a" type="int"/>
    <element name="whatever"/>
    <any namespace="##targetNamespace" processContents="lax"/>
  </sequence>
</complexType>

Clearly the local <a> and the indirect reference to the global <a> 
are "inconsistent" with each other within the content model of the above 
example but I'm not sure if the "directly, indirectly, or implicitly" language 
in the EDC rule captures this case.

See mail from: David Bau
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0029.html

See reply from: Henry Thompson
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0030.html
Comment 1 Sandy Gao 2005-11-21 15:54:20 UTC
Proposals to discharge this requirement also cover RQ-17.

This item was classified as Req in the meeting of 2004-03-12.

This item was discussed in the meeting of 2004-04-09, in connection with RQ-17..

This item was discussed at 2005-11-11 F2F meeting.

The summary of the current proposal:

-no change to the 1.0 formulation of EDC 
- in the PSVI, check each child element against the gi/type bindings directly, 
indirectly, or implicitly present in the content model; the type assigned to 
the child must be compatible (validly derived from) with that given in the 
bindings for its gi. There are three possibilities here:
  - This applies to all elements without exception (this means skip wildcards 
may induce errors if and when they [appear to] match elements with the same 
names as elements used explicitly elsewhere in the content model). (The so-
called level 3.) 
  - This applies to all elements which have types (skip wildcards won't induce 
errors, but xsi:type may). (The so-called level 2.) 
  - This applies only to those elements which match an element declaration 
(xsi:type won't induce errors). (The so-called level 1.) 
  (Let us call this check the EDC runtime check.) 
- The EDC runtime check must be integrated into the definition of local 
validity, to connect with the text now in 3.4.6. 

RESOLVED: to adopt the level 2 version of the constraint.
Comment 2 Sandy Gao 2006-06-12 16:32:49 UTC
*** Bug 2823 has been marked as a duplicate of this bug. ***
Comment 3 C. M. Sperberg-McQueen 2006-10-14 14:45:31 UTC
A proposal to resolve this issue has been placed on the server at 
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.rq146.200610.html
(member-only link) for WG review and action.

The proposal introduces a 'dynamic' EDC rule corresponding to the
static EDC (element declarations consistent) rule.  The static rule
requires that any two element declarations in a content model with 
the same namespace name and local name must have the same {type
definition}.  That type definition is the context-determined type
for elements whose name matches those element declarations.

The dynamic rule requires that any element accepted by the 
content model have a governing type validly substitutable
for the context-determined type.

Comment 4 C. M. Sperberg-McQueen 2007-02-28 03:09:47 UTC
The proposal in comment 3 was adopted by the WG in the face to face
meeting in San Jose in October/November 2007.  This issue should have
been marked 'closed' then.  It's late, but I'm marking it resolved now.