teach tidy new attributes ??

I'm trying to use tidy as part of a CMS I'm working on that outputs 
valid html5 content.

I can teach tidy the new html 5 tags, but html 5 allows data-whatever as 
a valid attribute.

The CMS uses:

data-spider (boolean)
	- if false, built in search engine won't index node or children (except 
for child nodes that set it to true)
data-sbgroup
data-sbname
data-sblink
	- used by the cms for menu generation

There also are some new attributes defined in html 5, such as 
autocomplete (which, to be honest, I haven't tested with tidy yet)

Also, when defining new elements, how do I specify what attributes are 
allowed? Seems that adding a new element allows any attribute.

I'm using the php 5 wrapper to tidy if it matters.

I'm guessing that there won't be a release of tidy that internally 
supports html 5 until after the spec is finished, but if I can teach 
tidy about new attributes I don't really need a new tidy.

Thanks for suggestions.

Received on Tuesday, 2 February 2010 07:57:03 UTC