.xht and .xhtml file extensions for xhtml filetype detection

2007-02-25 Thread Sylvain Bertrand

Hi,
Is this possible to add .xht and .xhtml file extensions for xhtml
filetype detection?

Sylvain


Re: .xht and .xhtml file extensions for xhtml filetype detection

2007-02-25 Thread Sylvain Bertrand

I did add support for those extensions manually in file in filetype.vim.
I wonder the same thing than you. Maybe in the next patchset if we
reach the top devs.

Sylvain

2007/2/25, Christian J. Robinson [EMAIL PROTECTED]:

On Sun, 25 Feb 2007, Sylvain Bertrand wrote:

 Hi,
 Is this possible to add .xht and .xhtml file extensions for xhtml
 filetype detection?

Yes, see :help new-filetype.

I think this should be added to the Vim distribution, and often wonder
how it got left out of Vim7.

- Christian

--
   White dwarf seeks red giant for binary relationship.
Christian J. Robinson [EMAIL PROTECTED] http://infynity.spodzone.com/
   PGP keys: 0x893B0EAF / 0xFB698360   http://infynity.spodzone.com/pgp



Re: .xht and .xhtml file extensions for xhtml filetype detection

2007-02-25 Thread Sylvain Bertrand

Hi,
For infos:
If I open file.html (with xhtml content) using firefox 2.0.0.2, the
document will have the text/html mime type which is wrong following
the guidelines of the following document:
http://www.w3.org/TR/xhtml-media-types/

If I open file.xhtml, the document will have the text/xhtml+xml mime type.
The latter w3c document reference an ietf document dealing with the
text/xhtml+xml mime type in which there is a section specific to file
extensions. There, you will find those .xht and .xhtml file extensions
defined: http://www.rfc-editor.org/rfc/rfc3236.txt

I could also use the .xml extension with xhtml content. Firefox will
give the text/xml mime type to the document. But vim will load all its
xml candies leaving out the xhtml ones.

Sylvain

2007/2/25, Nikolai Weibull [EMAIL PROTECTED]:

On 2/25/07, Bram Moolenaar [EMAIL PROTECTED] wrote:

 Christian J. Robinson wrote:

  On Sun, 25 Feb 2007, Sylvain Bertrand wrote:
 
   Hi,
   Is this possible to add .xht and .xhtml file extensions for xhtml
   filetype detection?
 
  Yes, see :help new-filetype.
 
  I think this should be added to the Vim distribution, and often wonder
  how it got left out of Vim7.

 Apparently nobody noticed them.  Are *.xht and *.xhtml widely used for
 XHTML?

I have never seen either.  .xht is perhaps even more of an abomination
than .htm is/was.

  nikolai