Patchwork [wwwdocs] Make codingconventions.html pass W3 validator.

login
register
mail settings
Submitter Lawrence Crowl
Date June 4, 2012, 10:42 p.m.
Message ID <CAGqM8fasE3o=A_yLM=bRN=HY_iLP9Yyk64D4e3WD8=SuKAcvMQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/162879/
State New
Headers show

Comments

Lawrence Crowl - June 4, 2012, 10:42 p.m.
The following source change enables coddingconventions.html to
pass the HTML validator at validator.w3.org.

Okay?
Gabriel Dos Reis - June 4, 2012, 10:44 p.m.
On Mon, Jun 4, 2012 at 5:42 PM, Lawrence Crowl <crowl@google.com> wrote:
> The following source change enables coddingconventions.html to
> pass the HTML validator at validator.w3.org.
>
> Okay?

Looks obvious! :-)

-- gaby
Gerald Pfeifer - June 5, 2012, 7:15 p.m.
Hi Lawrence,

On Mon, 4 Jun 2012, Lawrence Crowl wrote:
> The following source change enables coddingconventions.html to
> pass the HTML validator at validator.w3.org.

the web pages will be preprocessed before the are put on the server
(this transparently happens upon checkin) and as part of that

  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE html
            PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  >

are going to be prepended to any page, plus the standard CSS reference
and footer are added, for example.

Since you ran into this, I would like to document this better.  Would
http://gcc.gnu.org/projects/web.html be a good place, or do you have
a different suggestion?

Gerald
Lawrence Crowl - June 5, 2012, 8:24 p.m.
On 6/5/12, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> On Mon, 4 Jun 2012, Lawrence Crowl wrote:
> > The following source change enables coddingconventions.html to
> > pass the HTML validator at validator.w3.org.
>
> the web pages will be preprocessed before the are put on the server
> (this transparently happens upon checkin) and as part of that
>
>  <?xml version="1.0" encoding="ISO-8859-1"?>
>  <!DOCTYPE html
>            PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> are going to be prepended to any page, plus the standard CSS
> reference and footer are added, for example.

Okay, but now I have questions!

Where do these prepended pages come from?  How do I test the page
as it will appear?  I guess maybe I'm asking for the makefile that
produces what one would see.  I want to validate that.

BTW, part of the problem is that the pages are complete enough as
they are to be considered complete.  I.e. they are not obviously
fragments.  Would it be better to make them clearly fragments?

Doesn't the prepending prevent incremental migration to new
standards?

> Since you ran into this, I would like to document this better.
> Would http://gcc.gnu.org/projects/web.html be a good place,
> or do you have a different suggestion?

My entry point was http://gcc.gnu.org/cvs.html, so at a minimum it
need to be cross linked with http://gcc.gnu.org/projects/web.html.

Patch

Index: codingconventions.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
retrieving revision 1.66
diff -u -r1.66 codingconventions.html
--- codingconventions.html      19 Feb 2012 00:45:34 -0000      1.66
+++ codingconventions.html      4 Jun 2012 22:39:15 -0000
@@ -1,6 +1,9 @@ 
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
 <html>

 <head>
+<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
 <title>GCC Coding Conventions</title>
 </head>