CC: | devesh <devesh [...] saralweb.com> |
Subject: | Support for XHTML doctype declaration |
Date: | Tue, 22 Feb 2011 14:32:02 -0800 |
To: | bug-File-Type [...] rt.cpan.org |
From: | kavi <kavi [...] saralweb.com> |
Module : File::Type 0.22
Perl : perl, v5.10.0 built for x86_64-linux
Linux : Linux 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC
2009 x86_64 GNU/Linux
The XHTML doctype declaration is required to be mixed case (DOCTYPE
html) as shown in this documentation :
http://www.w3.org/QA/2002/04/Web-Quality
The declarations for XHTML are documented as :
XHTML 1.0 <http://www.w3.org/TR/xhtml1/> Strict
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>, Transitional
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>, Frameset
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
File::Type supports either DOCTYPE HTML or doctype html, thus the XHTML
document header is not recognized.
Below patch on File/Type.pm fixes the problem :
1432,1434d1431
< if ($data =~ m[^\<\!DOCTYPE\ html]) {
< return q{text/html};
< }
Show quoted text
_____________________________________________________________________
GET Your .com, .in & More From Rs. 199/- Only! http://www.saralweb.com/?page=rfq&rfq_index=0