W3C home > Mailing lists > Public > public-html@w3.org > December 2008

Re: dataset case issue

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 24 Dec 2008 00:24:36 +0100
To: "Ian Hickson" <ian@hixie.ch>
Cc: "HTML WG" <public-html@w3.org>
Message-ID: <op.umm1zalf64w2qv@annevk-t60.oslo.opera.com>

On Tue, 23 Dec 2008 20:59:03 +0100, Ian Hickson <ian@hixie.ch> wrote:
> On Fri, 13 Jun 2008, Anne van Kesteren wrote:
>> The dataset DOM attribute introduces a small difference between HTML and
>> XHTML that should probably be pointed out explicitly. Namely that if you
>> use dataset.X = "x" you will get a data-x attribute in HTML and a data-X
>> attribute in XHTML.
>>
>> Instead of pointing it out we could also 1) define dataset in terms of
>> setAttributeNS rather than setAttribute in which case you might get
>> problems when you try to seralize. Or 2) be defining a subset of
>> characters that these attributes may consist of and not letting dataset
>> work with characters outside that set.
>>
>> Of the alternative solutions my preference goes to 1. It seems nicer to
>> defer to setAttributeNS rather than subsetting things somehow.
>
> I've defined things so that they are the same for both XHTML and HTML.
> Hopefully the confusion caused by people using upper-case names won't be
> so bad...

Per my reading it is not the same for XHTML and HTML. E.g.

   dataset.X = "test"
   dataset.x = "test"

will result in a single attribute in HTML and two in XHTML. Defining it in  
terms of setAttributeNS would circumvent this. If we think this problem is  
not a huge issue we should at least point out that there is a difference  
here by way of a note.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Tuesday, 23 December 2008 23:25:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:00 UTC