<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.Stylwiadomocie-mail17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=PL link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>The exact syntax for the attribute
should depend on the script type. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>It can be PythON for
Python (I do not know Python at all but I assume it is possible) and LispON for
Lisp.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>(as client side Lisp is
my personal dream)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Chris<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
whatwg-bounces@lists.whatwg.org [mailto:whatwg-bounces@lists.whatwg.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Jon Barnett<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, April 11, 2007
2:39 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Anne van Kesteren<br>
<b><span style='font-weight:bold'>Cc:</span></b> WHAT working group; ddailey;
Maciej Stachowiak; Simon Pieters; Henri Sivonen; Sam Ruby<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [whatwg] Attribute
for holding private data for scripting</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>If you want structured data in this attribute, why not just use JSON?<o:p></o:p></span></font></p>
</blockquote>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
That's an idea that crossed my mind as well. I dismissed it for a few
reasons: <br>
- authors would have to entitize quotes and ampersands in their attributes,
which they're not used to doing with JSON normally.<br>
- evaluating it would mean:<br>
var obj = eval(myelement.getAttribute("_myjson"); <br>
which I don't like because I prefer to avoid eval at all costs.<br>
- it further marries HTML with JavaScript, which is something I'd like to see
evolve and change in the future - something else widely supported, like
client-side Python is a personal dream. Also, whatever attribute also
needs to have meaning (read: be easy to get to in the DOM) when your document
is processed by something other than a browser, such as PHP or Java. <br>
<br>
You, yourself, could still format your custom data that way, but I don't think
it's a great idea to spec it that way. And I guess it's already been said
that changing something in the DOM a good idea for this. <br>
<br>
We just want to allow authors to continue to do something authors already do
without making validators complain.<br>
<br>
The idea of allowing just any attribute that starts with _ (or x_) has
the best benefit - authors already do it, it's just a matter of making
validators not complain. <o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>