Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xhtml validator errors

13 views
Skip to first unread message

ghan...@gmail.com

unread,
Mar 24, 2013, 11:17:36 PM3/24/13
to
When I run the xhtml validator on my page, I get the following errors:
http://validator.w3.org/check?uri=http%3A%2F%2Fdl.dropbox.com%2Fu%2F61646136%2Fastro.html&charset=%28detect+automatically%29&doctype=Inline&group=0

I'm a novice with html, so I'd appreciate any help with trying to address these.

Thanks,
Anoop
Message has been deleted

Jukka K. Korpela

unread,
Mar 25, 2013, 2:22:25 AM3/25/13
to
You're not using an XHTML validator but the W3C Markup Validator, which
is a conglomeration of two rather difference pieces of software: an
SGML/XML validator (which some HTML-specific added featues) and an ad
hoc "HTML5 validator", a checker that checks against some unspecified
version of "HTML5" or "HTML Living Standard". From some recent notes, it
seems that it tries to check against the editor's draft for HTML 5.1, a
document that may and probably will change daily. See the thread starting at
http://lists.w3.org/Archives/Public/www-validator/2013Mar/0052.html

The problems you have faced are directly related to the issue of the
thread. The validator is using definitions that happened to be in the
editor's draft on a cloudy day, namely definitions that forbid both
"ascii" and "iso-8859-1" as encoding names (despite their being
officially registered by IANA and used for billions of documents).

Such foolish prohibitions are best ignored. The problem is that they
make it more difficult to notice any *real* problems the validator might
report.

There is, however, another problem with character encodings, and this is
something that the validator reports properly, though not with optimal
clarity. The document declares "iso-8859-1" in a <meta> tag, but the
server declares "ascii" in HTTP headers, as you can see e.g. by using
http://web-sniffer.net/ - the response headers include
Content-Type: text/html; charset=ascii

By current HTML specifications (HTML 4.01) and in browser practice, the
HTTP headers beat any <meta> tags. So there is no ambiguity: "ascii" is
used. On the other hand, browsers actually treat "ascii" was
"windows-1252", so there is no real problem even if your document were
in fact iso-8859-1 encoded or windows-1252 encoded.

If this was not confusing enough, the validator currently says:

"Internal encoding declaration iso-8859-1 disagrees with the actual
encoding of the document (us-ascii)."

It is *trying* to say what I wrote above, i.e. formal conflict between
<meta> tag and HTTP header, but it fails to say it. The *actual*
encoding of the document might be something completely different. This
isn't about the actual encoding, it's about a conflict between two ways
to *declare* the encoding.

For practical purposes, all the "error messages" in this case can be
ignored. The only thing that really matters here is that the server
declares "ascii", so unless you can change that, you cannot use e.g.
utf-8 encoding (which is generally the preferred encoding these days)
for your page. This in turn does not matter if your page contains only
Ascii characters, as seems to be the case.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Warren Oates

unread,
Mar 25, 2013, 7:37:28 AM3/25/13
to
In article <kioqb5$jh4$1...@dont-email.me>,
"Jukka K. Korpela" <jkor...@cs.tut.fi> wrote:

> By current HTML specifications (HTML 4.01) and in browser practice, the
> HTTP headers beat any <meta> tags. So there is no ambiguity: "ascii" is
> used. On the other hand, browsers actually treat "ascii" was
> "windows-1252", so there is no real problem even if your document were
> in fact iso-8859-1 encoded or windows-1252 encoded.

This can be a pita, too. The only way that I've found around it is to
send my own headers via PHP.
--
Where's the Vangelis music?
Pris' tongue is sticking out in in the wide shot after Batty has kissed her.
They have put back more tits into the Zhora dressing room scene.
-- notes for Blade Runner

ghan...@gmail.com

unread,
Mar 25, 2013, 11:00:39 AM3/25/13
to
Thanks for the detailed response.

On Sunday, March 24, 2013 11:22:25 PM UTC-7, Jukka K. Korpela wrote:

> There is, however, another problem with character encodings, and this is
> something that the validator reports properly, though not with optimal
> clarity. The document declares "iso-8859-1" in a <meta> tag, but the
> server declares "ascii" in HTTP headers, as you can see e.g. by using
> http://web-sniffer.net/ - the response headers include
> Content-Type: text/html; charset=ascii

Given that I don't have access to the server (operated by dropbox),
it looks like, ordinarily, changing the declaration in my document
to ascii (or removing it completely?) should have fixed the problem.
However, as you note above, it sounds like the validator has a
problem accepting 'ascii' as a declaration, and so it continues to
report an error. And if I change it to anything else, I'm back to
the mismatch problem. Right?

>
> For practical purposes, all the "error messages" in this case can be
> ignored. The only thing that really matters here is that the server
> declares "ascii", so unless you can change that, you cannot use e.g.
> utf-8 encoding (which is generally the preferred encoding these days)
> for your page. This in turn does not matter if your page contains only
> Ascii characters, as seems to be the case.

OK, will ignore these errors for now. I was hoping to be able to
put a link to the validator at the bottom of the page to show it
was kosher, but I guess that doesn't make sense if it's throwing
up errors.

Are there other validation tools that would work better?

Anoop

Ed Mullen

unread,
Mar 25, 2013, 7:28:39 PM3/25/13
to
ghan...@gmail.com wrote:
> Thanks for the detailed response.
>
> On Sunday, March 24, 2013 11:22:25 PM UTC-7, Jukka K. Korpela wrote:
>
>> There is, however, another problem with character encodings, and this is
>> something that the validator reports properly, though not with optimal
>> clarity. The document declares "iso-8859-1" in a <meta> tag, but the
>> server declares "ascii" in HTTP headers, as you can see e.g. by using
>> http://web-sniffer.net/ - the response headers include
>> Content-Type: text/html; charset=ascii
>
> Given that I don't have access to the server (operated by dropbox),\

So why not spend a few bucks a month and get a proper Web host?


--
Ed Mullen
http://edmullen.net/
"An ounce of practice is worth more than tons of preaching." - Mohandas
Gandhi

Jukka K. Korpela

unread,
Mar 26, 2013, 2:08:29 AM3/26/13
to
2013-03-25 17:00, ghan...@gmail.com wrote:

> Given that I don't have access to the server (operated by dropbox),
> it looks like, ordinarily, changing the declaration in my document
> to ascii (or removing it completely?) should have fixed the problem.
> However, as you note above, it sounds like the validator has a
> problem accepting 'ascii' as a declaration, and so it continues to
> report an error. And if I change it to anything else, I'm back to
> the mismatch problem. Right?

Right. It will keep whining about "ascii" due to the HTTP header.

> OK, will ignore these errors for now. I was hoping to be able to
> put a link to the validator at the bottom of the page to show it
> was kosher, but I guess that doesn't make sense if it's throwing
> up errors.

It would not make sense even if the validator behaved and your page
actually validated. Such a link would add nothing positive to the value
of the page, but it would be a distraction. And especially considering
the current state of the validator, what sense could it possibly make to
claim that a page validates when you have no control of the situation?
The validator, being now based on some people's understanding of some
daily drafts, may well display error messages tomorrow for a document
that it validates without remarks today?

> Are there other validation tools that would work better?

None that I know of. If I were a few decades younger and had more time
in my hands, plus some spare money to hire some people, I would create one.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

ghan...@gmail.com

unread,
Mar 26, 2013, 10:31:09 AM3/26/13
to
On Monday, March 25, 2013 4:28:39 PM UTC-7, Ed Mullen wrote:

> So why not spend a few bucks a month and get a proper Web host?

I've never really learnt how to do that...just seems like too much work.
The web page seemed quick and easy.

Where would be a good place to learn about this?

Things that concern me:
- Are there security issues that I don't understand?
- What are all the pieces of the solution? (domain name, managing a server, etc.)
- How easy will it be to switch from one provider to another?
- How to go about evaluating the options?

Anoop

Thomas 'PointedEars' Lahn

unread,
Mar 26, 2013, 11:32:50 AM3/26/13
to
ghan...@gmail.com wrote:

> On Monday, March 25, 2013 4:28:39 PM UTC-7, Ed Mullen wrote:
>> So why not spend a few bucks a month and get a proper Web host?
>
> I've never really learnt how to do that...just seems like too much work.
> The web page seemed quick and easy.
>
> Where would be a good place to learn about this?
>
> Things that concern me:
> - Are there security issues that I don't understand?

Probably. But with regard to server software there are people trained in
understanding them whose salary you and other customers are paying for with
a hosting subscription. It does not hurt to educate yourself regarding
those issues and regarding Web security in general, though.

> - What are all the pieces of the solution? (domain name, managing a
> server, etc.)

Sorry, this is not and cannot be Webmaster 101. STFW.

> - How easy will it be to switch from one provider to another?

That depends on the Web hoster(s), but it is not that hard.

> - How to go about evaluating the options?

How about using Google for searching for information instead of just for
posting to Usenet (which is bad enough already)?


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

Warren Oates

unread,
Mar 26, 2013, 3:49:32 PM3/26/13
to
In article <1550671.S...@PointedEars.de>,
Thomas 'PointedEars' Lahn <Point...@web.de> wrote:

> --
> realism: HTML 4.01 Strict
> evangelism: XHTML 1.0 Strict
> madness: XHTML 1.1 as application/xhtml+xm

simple: <!DOCTYPE html>

ghan...@gmail.com

unread,
Mar 27, 2013, 11:08:49 AM3/27/13
to Thomas 'PointedEars' Lahn

Thanks for the response. As I suspected, I think it will require a lot
more investment of time (in addition to the money) to run my own
site as opposed to simply editing a bunch of files in the dropbox
folder on my computer, which for now seems adequate for my needs.

I'll keep reading about this stuff and hopefully some day will make
the jump.

Anoop

Martin Leese

unread,
Mar 27, 2013, 11:13:19 AM3/27/13
to
Warren Oates wrote:
> In article <1550671.S...@PointedEars.de>,
> Thomas 'PointedEars' Lahn <Point...@web.de> wrote:
>
>> --
>> realism: HTML 4.01 Strict
>> evangelism: XHTML 1.0 Strict
>> madness: XHTML 1.1 as application/xhtml+xm
>
> simple: <!DOCTYPE html>

So, are you going to use the new <dialog>
element to mark up dialogue? Oops, too
late, it has gone again. How about using
<time> for dates and times? That was in,
then out, but now appears to be back in
again. But for how long?

--
Regards,
Martin Leese
E-mail: ple...@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
Message has been deleted

Warren Oates

unread,
Mar 27, 2013, 1:24:31 PM3/27/13
to
In article <kiv26i$gim$1...@dont-email.me>,
Martin Leese <ple...@see.Web.for.e-mail.INVALID> wrote:

> So, are you going to use the new <dialog>
> element to mark up dialogue? Oops, too
> late, it has gone again. How about using
> <time> for dates and times? That was in,
> then out, but now appears to be back in
> again. But for how long?

I don't use stuff like that.
0 new messages