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

dataset case issue

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 13 Jun 2008 13:37:56 +0200
To: "HTML WG" <public-html@w3.org>
Message-ID: <op.ucoqliwy64w2qv@annevk-t60.oslo.opera.com>

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.

Anne van Kesteren
Received on Friday, 13 June 2008 11:38:15 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:34 UTC