[Bug 7829] New: [SER] Serialization of minimized attributes.


           Summary: [SER] Serialization of minimized attributes.
           Product: XPath / XQuery / XSLT
           Version: 2nd Edition Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization
        AssignedTo: zongaro@ca.ibm.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

Quoting section 7.2 of the serialization spec:

The HTML output method MUST output boolean attributes (that is attributes with
only a single allowed value that is equal to the name of the attribute) in
minimized form.

You could argue that no attributes in the HTML DTDs have "a single allowed
value that is equal to the name of the attribute" -- The HTML DTDs are case
insensitive, and so every boolean attributes has several allowed values, that
differ only by case.

Take the following example:

<input readonly="READONLY" DISABLED="no" />

The most logical serialization of this is as follows:

<INPUT readonly DISABLED="no"></INPUT>

but as far as I can tell, the spec dictates that it should be:


My reasoning is as follows:

The disabled attribute is an attribute that only has a single allowed value
(ignoring case differences) of "DISABLED", and so it is minimized, even though
the value in the instance document is not this value.

I would suggest the following changes:

The HTML output method MUST output boolean attributes in minimized form.  A
boolean attribute is an attribute whose name is equal to the value of the
attribute regardless of case, and which are defined in the HTML 4.01 DTDs with
a single allowed value (disregarding case differences) that is equal to the
name of the attribute.

It is also worth a note somewhere to clarify that the HTML 4.01 DTDs are case
insensitive for element names and attribute names, and for some attribute

Other places in the spec could also be more clear as to case insensitivity. 
The only place that namespace insensitivity is mentioned is in section 7.1:

The HTML output method MUST recognize the names of HTML elements regardless of
case. For example, elements named br, BR or Br MUST all be recognized as the
HTML br element and output without an end-tag.

This could be interpreted that the element names are output in lower case which
I believe is not the intention.

Take errata SE.E9:

Whitespace MUST NOT be added or removed inside a formatted element, the
formatted elements being pre, script, style, and textarea.

It is not immediately clear that these element names are referring to the
entries in the HTML DTDs and are therefore case insensitive.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 7 October 2009 16:28:40 UTC