HTML XML Use Case 07

From W3C Wiki
Jump to: navigation, search

Get the convenience of forgiving error-handling with XHTML-style markup

Problem statement

The user aspires to create well-formed XHTML5, and wishes to advertise that fact by serving as application/xhtml+xml. The user would be disuaded from this if normal "hard fail on wellformedness-error" XML processing were used, so the user would like the parsers and user agents to be more forgiving.

Solutions

Update or augment the XML specifications to define DOM mappings for non-well formed documents

Currently, the XML, Namespaces, Infoset, etc. Recommendations don't say much about non-well formed documents except that they are not well formed. Those specifications could be modified, or additional specifications could be written, that would define infoset, DOM, and/or XPath data model mappings for some other documents, and perhaps for any input Unicode string.

XML5 is an example of a step toward this style of solution.

Update parsers and user agents

With or without explicitly updating the XML specifications, parsers and user agents can be written to process application/xhtml+xml in a spirit more similar to that proposed for text/html. Maybe or maybe not those user agents should provide more visible indications when errors are "fixed up" (on the theory that when you're taking the trouble to use the xml serialization, your ultimate goal should be to catch and fix errors -- this is obviously in tension with the notion that users get confused if you tell them there's an error, and you could wind up discouraging use of application/xhtml+xml after all).