Using custom DOM Attributes in XHTML

Unspace: Attributes > Classes: Custom DOM Attributes for Fun and Profit

"Classes can correspond to CSS classes on a 1:1 basis, or they could be keywords that imply meta-data. You can use a combination of both to implement rich functionality on the client. Prototype provides a set of tools to add, remove, query and reset the classes attached to a node. Life is grand %u2014 right?

To date, I have not drunk the class Kool-Aid. Molly Holzschlag assures me that the class attribute is to be used for visual as well as non-visual classes, yet I still have three primary reasons for questioning this approach:"

A very interesting and well articulated article. I need to check the validity of inventing arbitrary attributes for XHTML elements (without declaring them to be from a namespace), but I'm going to give him the benefit of the doubt until I'm convinced his approach is invalid.

I'm explicitly posting this separately from the linkdump because I didn't want my XHTML/JS/AJAX-savvy readers to gloss over it in a list of 50 other links. IMHO, this article is worth a careful read.

I'm not a JS/Ajax developer, but I see value in this approach. Do you?

JS developers who read this site: please share your opinion of the ideas presented in that essay, I value your input. If you like it, and the reason isn't obvious from the essay, please say why, but if you don't like it, convince me! :-)

Written on March 7, 2007