DTD comparison
As a follow-up on my toying with DTDs, I added a new Python script to my toolbox this morning: dtd-compare.py allows to compare the vocabularies defined in several DTDs to see which elements and attributes are present or absent among them.
For instance, running python dtd-compare.py http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd has allowed me to build a comparison of the various mobile XHTML flavors with the content of XHTML 1.0 Strict.
I haven’t included XHTML MP 1.1 and XHTML MP 1.2 in that comparison chart since the officlal DTDs seems to have syntax errors, reported by the script as follows: