W3C home > Mailing lists > Public > www-validator-css@w3.org > October 2011

Re: Add support for HTML files with the htm extension as the file name for the command line interface.

From: Yves Lafon <ylafon@w3.org>
Date: Thu, 6 Oct 2011 14:30:01 -0400 (EDT)
To: "Lenahan, Peter" <Peter_Lenahan@ibi.com>
cc: "www-validator-css@w3.org" <www-validator-css@w3.org>
Message-ID: <alpine.DEB.1.10.1110061429430.16822@wnl.j3.bet>
On Wed, 5 Oct 2011, Lenahan, Peter wrote:

> When using the command line interface with the file:/   syntax.
> When attempting to validate an html files that end in the extension  ".htm" the validator does not correctly recognize the file as an HTML file.

Added in CVS.
Thanks!

>
> This change adds a test for the file suffix  ".htm"
>
> /css-validator/src/org/w3c/css/css/DocumentParser.java
>
>
> Around line 58 add a test for the shorter extension.
>
>            } else if (urlLower.endsWith(".htm") ||
>                       urlLower.endsWith(".html") || urlLower.endsWith(".shtml") || urlLower.endsWith("/")) {
>
>
> A test for this looks like this:
>
> java -jar css-validator.jar  -vextwarning true -profile css3 file:/C:\workspace3_4\css-validator\testdata\testhtm.htm
>

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Thursday, 6 October 2011 18:30:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:28 GMT