[whatwg] Section 3.3.3.2 Attribute value normalization and title attributes

Ian Hickson ian at hixie.ch
Mon Aug 3 03:18:12 PDT 2009


On Fri, 24 Jul 2009, Elliotte Rusty Harold wrote:
>
> A technical point that may perhaps have already been considered. Section 
> 3.3.3.2 states "If the title attribute's value contains U+000A LINE FEED 
> (LF) characters, the content is split into multiple lines. Each U+000A 
> LINE FEED (LF) character represents a line break." However this is 
> incompatible with XML and the XHTML serialization. In XML as specified 
> in http://www.w3.org/TR/REC-xml/#AVNormalize

In XML, you have to use a character reference, but it's still possible (as 
far as I can tell) to include a newline.


> I'm not sure what should be done about this. This is one of the weirder 
> and more error-prone parts of XML. However, since HTML 5 is suspicious 
> of linefeeds in title attributes anyway, we could either forbid them or 
> adopt the XML interpretation.

I don't really see why the minor difficulties in the XML syntax would 
affect the semantics here. Could you elaborate on your concern? What 
problem would changing this solve?


> I first noticed this in the description of the title attribute, but the 
> issue could be deeper. In particular, in the HTML 5 requirement that "If 
> a reflecting DOM attribute is a DOMString but doesn't fall into any of 
> the above categories, then the getting and setting must be done in a 
> transparent, case-preserving manner." it's not clear what "transparent" 
> really means here, and whether it's compatible with XML's attribute 
> value normalization.

Transparent is used here in its normal computer science sense, meaning 
that no modifications are made to the value. In the case of the DOM APIs, 
this is independent of the XML representation, so I don't think there's a 
problem there.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list