I have this friend who keeps claiming that all HTML in a website
should be pure XHTML.
He claims this ideal follows a general and a specific guideline. The
general guideline is that all code should be of the highest possible
quality, with no compromises. Specifically, HTML should never rely on
"browser forgiveness", and get by with mis-matched tags, ill-formed
markup, missing required attributes, etc. No more programming websites
The specific guideline is that if your code is pure XHTML, you can
parse it with XPath at test time. XPath makes a great way to query
into a page and chop out details, competitive with assert_select() or
So I don't want to tell my friend that Rails doesn't produce pure
XHTML. For example, here's a generated script tag:
"What's the hell is wrong with that???" I hear you scream (clear
across the 'net).
It's the first problem XPath finds: the > should be />
Any chance of fixing this, for all of Rails? To appease my friend??