You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Noah Slater <ns...@gmail.com> on 2004/12/07 13:33:31 UTC

Subversion HTML pages are invalid.

Hello,

When browsing a svn repos though a user-agent the HTML documents
served are NOT valid HTML and do not even include a DOCTYPE.

This would not be hard to amend and I would advise using HTML 4.01
instead of XHTML as this would cause issues with MIME type handling
when properly served.

Regards,
Noah Slater

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion HTML pages are invalid.

Posted by Rainer Müller <mu...@gmx.de>.
Max Bowsher wrote:
> Noah Slater wrote:
>> 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>.
> 
> The standard merely says "Some people consider". I think that <h2> is 
> generally rendered in a more appropriate size, and don't see anything 
> wrong with exploiting this.

But the html outline will be a bit wired with h2 without a h1 before.
h1 should be the most important heading in the page and the same as the 
title in head.
The appearance/rendering in the browser is secondary. First in a good 
HTML page there should be only the structur, design should be done using 
CSS.

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion HTML pages are invalid.

Posted by Max Bowsher <ma...@ukf.net>.
Noah Slater wrote:
> Hello,
>
>    If I take a vanila page served by svn and add a DOCTYPE specifying
> HTML 4.01 Strict we get the following document:
>
> ---------------------------------------
>
> <!DOCTYPE HTML PUBLIC
>    "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
>
> <html>
> <head><title>Revision 9114: /</title></head>
> <body>
> <h2>Revision 9114: /</h2>
> <ul>
>  <li><a href="branches/">branches/</a></li>
>  <li><a href="trunk/">trunk/</a></li>
>
> </ul>
> <hr noshade><em>Powered by <a
> href="http://subversion.tigris.org/">Subversion</a> version 1.1.1
> (r11581).</em>
>
> </body></html>
>
> ---------------------------------------
>
> 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.

In general, I'm content with "Transitional", for cases where a minimal 
amount of style information is to be conveyed using legacy means. On the 
other hand given that the sole Transitional element in use is <hr noshade> 
Which renders _almost_ indistinguishably from a plain <hr> in my Mozilla and 
IE, I think we should sacrifice the noshade for the sake of standards - 
especially since the usual Apache signature footers use plain <hr>.

> 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.

mod_dav_svn will always provide charset=UTF-8 in the headers for HTML 
dirlists.
Therefore, I don't think there is any reason to duplicate the information.

> 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.

I ended up responding to this as part of the Strict/Transitional issue 
above, so I have nothing more to add here.

> 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.

True, will fix.

> 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>.

The standard merely says "Some people consider". I think that <h2> is 
generally rendered in a more appropriate size, and don't see anything wrong 
with exploiting this.

> 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.

I don't see what a title could usefully say.

> 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
> (http://www.w3.org/TR/WCAG10-HTML-TECHS/):
>
> "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">
> "

We are talking about directory listings - not a book.

> 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
> work.

IMO, overkill.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion HTML pages are invalid.

Posted by Noah Slater <ns...@gmail.com>.
Hello,

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

---------------------------------------

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

<html>
<head><title>Revision 9114: /</title></head>
<body>
<h2>Revision 9114: /</h2>
 <ul>
  <li><a href="branches/">branches/</a></li>
  <li><a href="trunk/">trunk/</a></li>

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

</body></html>

---------------------------------------

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
(http://www.w3.org/TR/WCAG10-HTML-TECHS/):

"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
work.

Hope this helps.

Noah


On Fri, 10 Dec 2004 15:43:23 -0000, Max Bowsher <ma...@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

Re: Subversion HTML pages are invalid.

Posted by Max Bowsher <ma...@ukf.net>.
>>> 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

Re: Subversion HTML pages are invalid.

Posted by Noah Slater <ns...@gmail.com>.
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.

On Fri, 10 Dec 2004 15:34:49 +0100, Vincent Lefevre
<vi...@vinc17.org> wrote:
> On 2004-12-09 11:09:45 -0000, Max Bowsher 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.
> >
> > 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?
> 
> If there's no DOCTYPE, one could also assume HTML 2.0, for instance.
> Is it also valid HTML 2.0?
> 
> --
> Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
> Work: CR INRIA - computer arithmetic / SPACES project at LORIA
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Subversion HTML pages are invalid.

Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2004-12-09 11:09:45 -0000, Max Bowsher 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.
> 
> 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?

If there's no DOCTYPE, one could also assume HTML 2.0, for instance.
Is it also valid HTML 2.0?

-- 
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion HTML pages are invalid.

Posted by Max Bowsher <ma...@ukf.net>.
Noah Slater wrote:
> Hello,
>
> When browsing a svn repos though a user-agent the HTML documents
> served are NOT valid HTML and do not even include a DOCTYPE.

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?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org