You could always create a custom DTD ( http://www.alistapart.com/articles/customdtd/).
or create a namespace inside your XHTML document, like MathML ( http://www.alistapart.com/articles/customdtds2/) I have dabbled in both methods. Stealing a bit from the second article I personally don't always care about validating my documents. This is probably the worst mistake that the advocates of web standards can > ever make: to fight for an abstract, arcane concept of standards and > consider validation for the sake of validity a goal in itself. > It is important to remain conscious, however, that validity alone is not a > guarantee of compliance, and even further from being a guarantee of quality. > just food for thought. On Wed, Jul 15, 2009 at 11:45 AM, Rolf <plentyofr...@gmail.com> wrote: > > Hmm grmbl.. hoped on more responses and what others normally use :) > I guess I will stick to (css) classes now and move to data-* > attributes in a couple of months. > Using other custom attributes looks neat, but maybe just awkward, > since its not xml (and you kinda make it look like it with more custom > than standard attributes). > > > On Jul 14, 12:47 am, anutron <aa...@iminta.com> wrote: > > I use css classes. In my mind, saying that a div is of class "locked" > makes > > sense to me. it's not <div css="locked"> it's class="locked" and the > notion > > that I have numerous elements of that class makes sense to me, even if I > > don't style them. It makes it easy to style them later if I decide to, > > though. > > -aaron > > > > 2009/7/13 Fábio M. Costa (via Nabble) < > > ml-user+98816-1760363...@n2.nabble.com<ml-user%2b98816-1760363...@n2.nabble.com> > <ml-user%2b98816-1760363...@n2.nabble.com<ml-user%252b98816-1760363...@n2.nabble.com> > > > > > > > > > > > > > > > on html5 there will be suport for custom attributes. > > > If the attribute starts with "data-" it will be valid. > > > Ex: > > > > > data-locked="true" > > > > > Its for sure what will be done for now on (if you want custom > attributes). > > > > > Fábio Miranda Costa > > > Solucione Sistemas > > > Front-End Engineer > > >http://meiocodigo.com > > > > > On Mon, Jul 13, 2009 at 6:32 PM, Rolf -nl <plentyofr...@...< > http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3253430&i=0> > > > > wrote: > > > > >> This has been talked about before here (search for "custom attributes" > > >> or "custom properties") but without some sort of conclusion. Could try > > >> and revive an old post, but ok... let's start a fresh one in 2009 ;). > > > > >> When working with javascript+moo you have the possibility to use > store/ > > >> retrieve for custom data "attached" to an element. This works dead > > >> easy and is a no brainer basically. > > > > >> But what do you do when you have an html page (either created > > >> dynamically or not) and you apply javascript logic to various elements > > >> after the page is loaded (ondomready) in an unobtrusive way, and you > > >> need some "start up" data from the elements to use store to begin > > >> with. > > > > >> A simple case: a div element that is locked or not (the locked state > > >> is just an example, dunno what's it for ;)). > > > > >> So you could add a custom attribute: > > >> <div locked="true"></div> > > > > >> Or you could use a class: > > >> <div class="locked"></div> > > > > >> Or you could use rel (but hey, it's already in use for other stuff), > > >> let's just assume all valid attributes are already "filled". > > > > >> Solutions: > > >> - The custom attribute is not valid. You can enhance a standard DTD > > >> and create your own custom one. Ok, sounds tedious. > > >> - You could just use the custom attribute and forget about validation. > > >> - You could just use classes.. easy.. but hey, those are meant for css > > >> styling really, so could be confusing. > > > > >> What do you advise? I used css classes to "describe" this sort of > > >> stuff, but now I think about just adding some custom attributes to set > > >> "start up data", as it creates better looking html, and I can add more > > >> detailed "start up data" (e.g. the desired fx transition and length > > >> for each element).. and just forget about w3c. > > > > >> Any input? > > > > > ------------------------------ > > > View message @ > > >http://n2.nabble.com/-Moo--custom-attributes%2C-%28css%29-classes..-w. > .. > > > To start a new topic under MooTools Users, email > > > ml-node+660466-1583815...@n2.nabble.com<ml-node%2b660466-1583815...@n2.nabble.com> > <ml-node%2b660466-1583815...@n2.nabble.com<ml-node%252b660466-1583815...@n2.nabble.com> > > > > > To unsubscribe from MooTools Users, click here< (link removed) >. > > > > ----- > > The MooTools Tutorial: http://www.mootorial.comwww.mootorial.com > > Clientcide: http://www.clientcide.comwww.clientcide.com > > -- > > View this message in context: > http://n2.nabble.com/-Moo--custom-attributes%2C-%28css%29-classes..-w... > > Sent from the MooTools Users mailing list archive at Nabble.com. >