[Bug 5003] Applicability of <alternative> element to xml:lang

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


cmsmcq@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #8 from cmsmcq@w3.org  2008-01-15 03:19 -------
Michael Kay writes:

    XSLT/XQuery ... rely heavily on the fact that if an element has 
    been validated, then copying it (changing its ancestry but not
    its content) cannot change the validity (or assigned type) of 
    that element.

Thank you; that's valuable information.  

Unfortunately, I'm not sure that either part of the proposition is a 
fact for XSDL 1.0 or 1.1.

If we define three element declarations with the same name and
different fixed values, or different types, in different contexts,
then creating and validating such an element in one context and then
moving it to another will certainly affect its schema-validity,
and the governing type it will have in any PSVI.  

An example, using three elements named 'pi', one at the top
level with the fixed value 3.141592, one in the context of an element
named 'indiana-almost' with the fixed value 4 (to commemorate the
occasion on which the Senate of Indiana passed a bill specifying that
the area of a circle equals the area of a square whose side is 1/4 
the circumference of the circle, which works out algebraically to saying
that pi = 4), and one in the context of an element named 'II_Chronicles'
with the fixed value of 3 (to remember II Chron 4:2-5, which effectively 
gives a value of 3 for pi), may be found, with a document instance, at

  http://www.w3.org/XML/2008/xsdl-exx/b5003.xsd
  http://www.w3.org/XML/2008/xsdl-exx/b5003.xml

An argument against allowing assertions or CTA to look upwards can 
perhaps be constructed nevertheless:  if QT relies upon the invariant 
that an element E valid against type T (independent of whether it's
valid against a particular *element declaration* or not) is valid against
T without regard for its ancestry, then changing that invariant could
be dangerous, and should be discussed extensively with QT.

But if QT relies on the proposition that elements of the same name are 
bound to the same element declaration, and to the same type, regardless
of context, then it relies on a proposition not actually guaranteed by
XSDL.  (And we would have a massive failure of inter-working-group 
coordination.  But I hope that Michael simply misspoke slightly, and QT
doesn't rely on this broader and less reliable proposition.)  

Received on Tuesday, 15 January 2008 03:19:27 UTC