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

Re: [VE][html5]

From: Rui del-Negro <w3validator@dvd-hq.info>
Date: Tue, 14 Jun 2011 02:20:38 +0100
To: "Timothy Burgess" <timothy.burgess.87@gmail.com>
Cc: www-validator@w3.org
Message-ID: <op.vw1koot9jf0k3w@bigbang>
> Validating http://programphp.tfburgess.com/
>
> This is in regards to the following 2 error messages:
>
> 1) "The center element is obsolete. Use CSS instead."
> 2) "Whitespace in path component. Use %20 in place of spaces."
>
> At MOST, these should be warnings in the year 2011.  I do realize your
> validation rules are based on certain standards, but perhaps those
> standards should be revised as well.
>
> 1) The center element works perfectly fine and produces the desired
> result with less effort and less code.  Don't "fix" what isn't
> broken/"obsolete".
> 2) There is absolutely no reason in 2011 for those attributes to be
> url encoded as long as they are surrounded by quotes.  When those
> attributes are dynamically generated, encoding the URLs can result in
> a lot of unnecessary serverside processing.  It is much better to
> leave it for clients to process.  Every clock cycle counts.
>
> Thanks,
>
> Tim

If I write "I'm afraid your wrong", you can probably figure out that I  
mean "you're wrong", but that doesn't mean a spelling or grammar checker  
shouldn't point out my error.

Likewise, web browsers have all sorts of error recovery abilities and are  
able to handle a lot of ancient, obsolete, or plain incorrect markup. A  
browser that manages to display pages with common errors is going to be  
more popular than one that simply refuses to render them. Just because  
something "works", that doesnt' mean it complies with the relevant  
standards.

Regarding 1), what happened was precisely what you wrote: "perhaps those  
standards should be revised". They were, and that element was considered  
obsolete. You can't suggest migrating to improved standards and then  
complain when the validator (correctly) points out that you're using code  
that isn't supported by the standard your document claims to be based on  
(HTML 5). If you change the document type declaration to an older version  
of HTML that does define the center element, you won't get that error  
message.

Regarding 2), there are several very good reasons why they should, in 2011  
or any other year. URLs aren't only meant to be used in electronic form or  
in text-only files; they have to "resist" being printed, handwritten,  
formatted by word-processing software, etc.. Ultimately, the reason that  
matters is that the standard in question says URLs cannot contain spaces.  
Again, if your document claims to follow a certain set of rules (which in  
turn are based on other standards, and so on), the validator is  
(correctly) going to complain when they get broken.

To quote RFC1738: "Characters can be unsafe for a number of reasons. The  
space character is unsafe because significant spaces may disappear and  
insignificant spaces may be introduced when URLs are transcribed or  
typeset or subjected to the treatment of word-processing programs. [...]  
All unsafe characters must always be encoded within a URL."

...and...

"In some cases, extra whitespace (spaces, linebreaks, tabs, etc.) may need  
to be added to break long URLs across lines.  The whitespace should be  
ignored when extracting the URL."

The clock cycles used to encode and decode URLs are irrelevant, and CPU  
load is rarely a limiting factor with web servers anyway.

RMN
~~~
Received on Tuesday, 14 June 2011 01:21:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 14 June 2011 01:21:12 GMT