IOW, an application would need to assume a certain character encoding (family) to process enough of the document to determine whether it is XHTML or HTML and the result of this detection would depend on which processing rules are assumed in order to process it.