Starting with the 0.2 release, you can use namespaces for attributes and class declarations to declare the dojo type. This feature was removed after the 0.4 release due to performance issues in the parser. Going forward, supplemental DTDs are required for validation.
<button class="dojo-button2" dojo:caption="hello world" />