[Bug 5281] Why allow an element to be valid against a declaration with the wrong name?

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5281

           Summary: Why allow an element to be valid against a declaration
                    with the wrong name?
           Product: XML Schema
           Version: 1.0/1.1 both
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: cmsmcq@w3.org
        ReportedBy: cmsmcq@w3.org
         QAContact: www-xml-schema-comments@w3.org


The definition of local validity in Validation Rule: Element Locally 
Valid (Element) specifies that the element

  <b/>

is locally valid against the declaration

  <element name="a"/>

This is crazy and should be eliminated.

The text says "The {name} and {target namespace} properties 
are not mentioned above because they are checked during particle 
·validation·, as per Element Sequence Locally Valid (Particle) 
(§3.9.4.2)", but this is not a persuasive reason for defining local
validity against an element declaration without regard to the 
name declared and the name found in the element.  

The note suggests that XSDL 1.0 was written in the belief that 
the question  "is element E locally valid against declaration D?" 
is logically possible only for an element's context-determined 
declaration. That belief is false and should not be allowed to 
influence our spec.  

In addition to making the definition of local validity more
useful, fixing this bug will make it unnecessary to have 
special-case wording to handle element-driven invocation of 
a validator, in section 5.2.

Received on Friday, 23 November 2007 02:02:04 UTC