Re: HTML or XHTML - why do you use it?

> <Ian>
>  * If a user saves an XHTML-as-text/html document to disk and later
>    reopens it locally, triggering the content type sniffing code since
>    filesystems typically do not include file type information, the
>    document could be reopened as XML, potentially resulting in
>    validation errors, parsing differences, or styling differences.
> </Ian>
> 
> 
> It depends on what application the user has associated with the file
> extension, does it not?  If the user saves the file with a .htm extension,
> then his/her HTML User Agent will most likely be the one to open the file.  

Extension?  What extension?  On Windows, perhaps, but not on other OSes.  Magic
number detection is a lot more likely on Unix, eg (especially since there is
really no good reason to give the file a ".htm" extension when saving it, since
almost all software I know of will deal with a filename without an extension
(again, on Unix)).

This is a real and serious problem and is the only reason Mozilla detects local
XHTML as HTML, not XML (quite unreliabley, I must add, in addition this problem
forces misdetection of the content type for XSLT stylesheets which contain HTML
in them).  I would dearly love to be able to flip on XML detection for XHTML
and can't because of the way it's authored (the way that Ian's article is
directed against).

Boris
-- 
Ray's Rule of Precision:
   Measure with a micrometer.  Mark with chalk.  Cut
with an axe.

Received on Monday, 6 January 2003 20:03:38 UTC