[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion HTML pages are invalid.

From: Noah Slater <nslater_at_gmail.com>
Date: 2004-12-10 17:29:10 CET


    If I take a vanila page served by svn and add a DOCTYPE specifying
HTML 4.01 Strict we get the following document:


    "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<head><title>Revision 9114: /</title></head>
<h2>Revision 9114: /</h2>

<hr noshade><em>Powered by <a
href="http://subversion.tigris.org/">Subversion</a> version 1.1.1



I chose to use HTML 4.01 for the reasons I specifide in my previous
email. I chose the Strict DOCTYPE because in a simple situation like
this there realy is no excuse not doing.

The main thrust of my initial email was the inclusion of a DOCTYPE and
the migration to HTML 4.01, but if I am being pedantic there are also
a fair few errors or inconsistances in even this simple document. I
shall list them below.

Firslt, there is no character encoding specified in the document. This
could, perhaps, be handled by the webserver - but it doesn't hurt to
include it here. If the webserver is not specifiying character
encoding it most definately must be included as close to the top of
the document as possible due to the fact user-agents scan documents
for the character encoding before returning to the start of the file
to parse from the begining having assertained the correct encoding.

We then come across the <hr noshade> tag. The "noshade" attribute is
not a valid attribute and should be removed. Even if it was a valid
attribute it would be for presentational purposes and hence would have
no place within the body. The correct place for such presentation
element is an inline/external stylesheet.

Later down an <em> tag is opened without an initial <p> tag. You can
only apply an inline element such asemphasis to text which is a child
of some other block level element such as a paragraph.

Moving on to non-errors, we have all documents started with a <h2>
element. This doesn't make any sence since header elements are suposed
to apear in the document in a logical heirarchical order. As such, the
first header of a document should always be <h1>.

There is also a link to the Subversion website at the bottom of all
pages and it might be a semantic boost if this link had an apropriate
"title" attribute.

The head section of the document could also be imporved by providing
some meta information such "rel" links for "next" "previous" and "up"
links etc. I shall quote from "HTML Techniques for Web Content
Accessibility Guidelines 1.0" published by the W3C

"Content developers should use the LINK element and link types (refer
to [HTML4], section 6.12) to describe document navigation mechanisms
and organization. Some user agents may synthesize navigation tools or
allow ordered printing of a set of documents based on such markup.

The following LINK elements might be included in the head of chapter 2
of a book:

   <LINK rel="Next" href="chapter3">

   <LINK rel="Prev" href="chapter1">
   <LINK rel="Start" href="cover">

One final thing that could be added is the language attribute for the
last (to be) paragraph. Something along the lines of lang="en" would

Hope this helps.


On Fri, 10 Dec 2004 15:43:23 -0000, Max Bowsher <maxb@ukf.net> wrote:
> >>> Noah Slater wrote:
> >>>> When browsing a svn repos though a user-agent the HTML documents
> >>>> served are NOT valid HTML and do not even include a DOCTYPE.
> Max Bowsher wrote:
> >>> Granted, they do not include a DOCTYPE, but the W3C validator says
> >>> that a directory listing generated by mod_dav_svn 1.1.1 is valid
> >>> HTML 4.01 Transitional except for the missing DOCTYPE.
> >>>
> >>> So.... what's this invaldity you refer to?
> Noah Slater wrote:
> > Lack of a DOCTYPE is invalid no matter what SGML based markup language
> > you are using.
> >
> > User-agents WILL assume such things, but they only do this to overcome
> > invalid documents.
> >
> > Simply because most user-agents are able to process this invalid
> > "tag-soup" does not mean it is any more valid.
> Your previous statement implied there was additional invalidity besides the
> missing doctype. I could not find any. Do you care to clarify?
> Max.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 10 17:31:28 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.