Ways to arbitrarily extend text/html for new vocabularies
Please put ideas for what it should look like here, each in their own section.
Each example should explain in details (ideally with examples) how to handle:
- Syntax errors at the tokeniser level, the tree construction level, and the schema level.
- Existing content that happens to use elements or syntax that you are proposing have special processing rules.
- Pages that contain any special syntax after that syntax was copied and pasted by an ignorant Web author from a valid page written by a competent Web author aware of the new syntax.
Proposal 1: xmlns strawman
When you hit an element with an xmlns="" attribute, switch to an XML parser until that parser has parsed the matching end tag.
bla bla text/html bla bla <foo xmlns="http://example.com/foo"><this><must/>be<valid>XML! </valid></this> must be.</foo> bla bla text/html
Errors cause the entire page to stop parsing.
Existing pages are not handled.
Pages that copy-and-paste this syntax then use it incorrectly are not handled.
Reasons why we can't do this
- There are pages that already specify xmlns="" attributes that would break if the content were processed as XML. For example, http://www.live.com/.