Oh, you can so write your stuff with the non-standard attributes and, in fact, that's the recommended way to do it. That said, I find it a lot nicer to use code that I can actually control. I don't trust anyone to parse my XHTML other than the browsers and then, I only trust so far. I certainly don't trust someone walking the DOM. I don't even trust my own DOM-walking code. Hence, why everything gets created by hand.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?