W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2009

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

From: <bugzilla@wiggum.w3.org>
Date: Wed, 07 Oct 2009 16:28:34 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-7829-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7829

           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:

<INPUT readonly DISABLED></INPUT>

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:

<new>
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.
</new>

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
values.

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:41 UTC