Even McMahon fails validation

T

thedarkman

Congratulations
I created that file exactly as you said, and although it validates, it
says you made 3 errors. I'm assuming you know what you are doing but
the validator does not. It appears just as there is no pleasing some
people there is no pleasing some software programs, therefore I will
not try to please it anymore.

One query about Doc type. Does this apply to all current .htm
and .html files? Or when html is "upgraded" are we supposed to alter
everything?

I've been on-line more than 10 years now and have problems with only a
handful of files and then not with all browsers, so ignorant though I
may be, that is not a bad track record.



Notes and Potential Issues

The following notes and warnings highlight missing or conflicting
information which caused the validator to perform some guesswork prior
to validation, or other things affecting the output below. If the
guess or fallback is incorrect, it could make validation results
entirely incoherent. It is highly recommended to check these potential
issues, and, if necessary, fix them and re-validate the document.
No Character Encoding Found! Falling back to UTF-8.

None of the standards sources gave any information on the character
encoding labeling for this document. Without encoding information it
is impossible to reliably validate the document. As a fallback
solution, the "UTF-8" encoding was used to read the content and
attempt to perform the validation, but this is likely to fail for all
non-trivial documents.

Read the FAQ entry on character encoding for more details and pointers
on how to fix this problem with your document.

Unable to Determine Parse Mode!

The validator can process documents either as XML (for document types
such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions).
For this document, the information available was not sufficient to
determine the parsing mode unambiguously, because:

the MIME Media Type (text/html) can be used for XML or SGML document
types
the Document Type (-//W3C//DTD HTML 3.2//EN) is not in the validator's
catalog
No XML declaration (e.g <?xml version="1.0"?>) could be found at the
beginning of the document.
No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">) could be found at the root of the document.
As a default, the validator is falling back to SGML mode.

No Character encoding declared at document level

No character encoding information was found within the document,
either in an HTML meta element or an XML declaration. It is often
recommended to declare the character encoding in the document itself,
especially if there is a chance that the document will be read from or
saved to disk, CD, etc.

See this tutorial on character encoding for techniques and
explanations.

The document located at <http://www.infotextmanuscripts.org/
1_son.html> was tentatively checked as -//W3C//DTD HTML 3.2//EN. This
means that with the use of some fallback or override mechanism, we
successfully performed a formal validation of it. In other words, the
document would validate as -//W3C//DTD HTML 3.2//EN if you changed the
markup to match the changes we have performed automatically, but it
will not be valid until you make these changes. The parser
implementations we used for this check are based on OpenSP (SGML/XML).
Linking to this result

If you would like to create a link to this page (i.e., this validation
result) to make it easier to revalidate this page in the future or to
allow others to validate your page, the URI is <http://
validator.w3.org/check?uri=http%3A%2F%2Fwww.infotextmanuscripts.org
%2F1_son.html> (or you can just add the current page to your bookmarks
or hotlist).
Validating CSS Style Sheets
 
J

Jonathan N. Little

thedarkman said:
I've been on-line more than 10 years now and have problems with only a
handful of files and then not with all browsers, so ignorant though I
may be, that is not a bad track record.

Translation: In 10 years you have only had a few files where your markup
was *so bad* that the "error-correction" features of some browsers just
total threw-up-hands in surrender!
 
J

Jonathan N. Little

thedarkman said:
I created that file exactly as you said, and although it validates, it
says you made 3 errors. I'm assuming you know what you are doing but
the validator does not. It appears just as there is no pleasing some
people there is no pleasing some software programs, therefore I will
not try to please it anymore.

I know it is "pearls before swine" but just because you seem incapable
of producing a valid HTML document does not mean that it is impossible.
Took all of 30 seconds:


<http://www.littleworksstudio.com/temp/usenet/ValidationIsPossible>

Validates:
<http://validator.w3.org/check?verbo...ksstudio.com/temp/usenet/ValidationIsPossible>

And the minimal CSS as well:
<http://jigsaw.w3.org/css-validator/...ksstudio.com/temp/usenet/ValidationIsPossible>
 
T

Tim Streater

thedarkman said:
Congratulations
I created that file exactly as you said, and although it validates, it
says you made 3 errors. I'm assuming you know what you are doing but
the validator does not. It appears just as there is no pleasing some
people there is no pleasing some software programs, therefore I will
not try to please it anymore.

One query about Doc type. Does this apply to all current .htm
and .html files? Or when html is "upgraded" are we supposed to alter
everything?

Just use:

<!DOCTYPE html>

in all your html files and you will be fine.
I've been on-line more than 10 years now and have problems with only a
handful of files and then not with all browsers, so ignorant though I
may be, that is not a bad track record.

My word, 10 years eh? Well, using some definitions of "on-line" [1], I
have been "on-line" since 1970.

[1] In particular one that says: sitting at a terminal connected to one
computer and using it to communicate with another computer.
 
J

Joy Beeson

Just use:

<!DOCTYPE html>

in all your html files and you will be fine.

Is that the correct doctype for plain-text files to which have been
added paragraph marks, headers, and an occasional "&eacute;" ?
 
D

Denis McMahon

I created that file exactly as you said, and although it validates, it
says you made 3 errors.

The file as I posted it is at:

http://www.sined.co.uk/tmp/barron/fixed.htm

The validation of my file is at:

http://validator.w3.org/unicorn/check?ucn_uri=www.sined.co.uk/tmp%
2Fbarron%2Ffixed.htm&ucn_task=conformance#

The file exactly as I posted it validates with *NO* errors or warnings.

Hence, you *DID NOT* create the file exactly as I posted it.
One query about Doc type. Does this apply to all current .htm and .html
files? Or when html is "upgraded" are we supposed to alter everything?

You have to use the DOCTYPE that matches the html version that you have
used. For example, if you use the html 5 doctype with font tags, you will
get errors because html 5 does not use font tags at all.

As you seem to be coding in html 3.2, you should be using the html 3.2
doctype. Although you also need to learn to code valid html 3.2 - your
code is not valid for any html doctype because you (1) keep trying to use
block elements inside inline elements, and (2) keep failing to close your
foint and b tags.
No Character Encoding Found! Falling back to UTF-8.

That's because you used direct input.
Unable to Determine Parse Mode!

That's because you used direct input.
No Character encoding declared at document level

That's because you used direct input.

Rgds

Denis McMahon
 
D

Denis McMahon

<!DOCTYPE html>

in all your html files and you will be fine.

No he won't!

Declaring html 5 and using font tags is not fine. html 5 does not support
font tags.

He insists on using font tags. This constrains him to html 4.01 or
earlier doctypes.

Rgds

Denis McMahon
 
D

Denis McMahon

Just use:

<!DOCTYPE html>

Nope - that's declaring html 5 - which doesn't permit font elements. He
insists on using font elements, so he can't use that doctype.

He's constrained by his use of font elements to 4.01 or earlier, so he
needs to declare his html version in the doctype. 3.2 seems to be the
best match to his html, although he managfes to break even that with his
unclosed font and b elements and his placing inline elements outside of
block elements.

Rgds

Denis McMahon
 
D

Denis McMahon

Congratulations
I created that file exactly as you said, and although it validates, it
says you made 3 errors.

No it doesn't, it issues 3 warnings, all related to the lack of a meta
header.

Warnings are not errors. It does not fail validation.

Rgds

Denis McMahon
 
D

Denis McMahon

Congratulations
I created that file exactly as you said, and although it validates, it
says you made 3 errors.

1. It validates.

2. Warnings are not errors.

Rgds

Denis McMahon
 
D

Denis McMahon

Just use:

<!DOCTYPE html>

in all your html files and you will be fine.

Wrong!

See, this sort of broken advice is part of the cause of his problems!

<!doctype html> infers html 5. html 5 does not support the font element.
His documents have lots of font element, hence he can not use the html 5
declaration. He has to use a doctype that allows font elements, ie html
2, html 3.2, or html 4.01 transitional or frameset.

Although it seems the validator can not actually validate against 2.0 or
3.2 doctypes, so 4.01 transitional is the only one that will actually
validate.

Rgds

Denis McMahon
 
T

Tim Streater

<!doctype html> infers html 5.

You mean it *implies* html5. Please learn the difference between infer
and imply.
html 5 does not support the font element.
His documents have lots of font element, hence he can not use the html 5
declaration. He has to use a doctype that allows font elements, ie html
2, html 3.2, or html 4.01 transitional or frameset.

He may be using deprecated elements, but the browser isn't going to
care. No browser writer is going to dare to actually *fail* some element
just because Denis says so.

The only thing that matters these days is to ensure your browser is in
standards mode and the doctype above does that.


Denis McMahon said:
Nope - that's declaring html 5 - which doesn't permit font elements. He
insists on using font elements, so he can't use that doctype.


Denis McMahon said:
No he won't!

Declaring html 5 and using font tags is not fine. html 5 does not support
font tags.


Errm, you trying to make a point or something? :)
 
B

Ben Bacarisse

Denis McMahon said:

I think he can be forgiven this mistake. I could not find that version,
though I don't doubt you posted it. All I could turn up was the text
in:

Message-ID: <[email protected]>

which can generate the warnings reported. One of them may be (as you
say) due to using direct input, but it can also be occur when that page
is served.
The validation of my file is at:

http://validator.w3.org/unicorn/check?ucn_uri=www.sined.co.uk/tmp%
2Fbarron%2Ffixed.htm&ucn_task=conformance#

The file exactly as I posted it validates with *NO* errors or warnings.

Hence, you *DID NOT* create the file exactly as I posted it.

It looks like he just picked the wrong version -- an easy thing to do if
two very similar texts are posted, particularly if the correct one is
harder to find (maybe it was posted out of thread?).
You have to use the DOCTYPE that matches the html version that you have
used. For example, if you use the html 5 doctype with font tags, you will
get errors because html 5 does not use font tags at all.

As you seem to be coding in html 3.2, you should be using the html 3.2
doctype. Although you also need to learn to code valid html 3.2 - your
code is not valid for any html doctype because you (1) keep trying to use
block elements inside inline elements, and (2) keep failing to close your
foint and b tags.


That's because you used direct input.

Yes, or a server that fails to send a content-type header with a
"charset" part.
That's because you used direct input.

I see this warning using a served page as well. The version of the page
that I could find has a DOCTYPE of

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

which provokes this warning. Changing this to

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

(which you posted later as a general recommendation for his pages)
eliminates this warning.
That's because you used direct input.

This warning is independent of the input method used. You get it if
there is no character encoding declared in the document (as was the case
with the page that I found), and you don't if there is (as in your HTML
4.01 version lined above).
 
D

Denis McMahon

I think he can be forgiven this mistake.

I issued some cancels, it seems they may not all have been honoured.
which can generate the warnings reported.

Yes, I was overtaken a bit by red rage. The page does validate, despite
Barron's lies - he doesn't appreciate the difference between validating
with warnings and failing validation.

Although the w3c page at:

http://www.w3.org/QA/2002/04/valid-dtd-list.html

lists both the html 2.0 and 3.2 doctypes, the validator doesn't validate
against them - rather it seems you have to use the 4.01 transitional
doctype for both.

However, when I replaced the doctype with the 4.01 declaration and added
a content-type header, all the warnings went away too ...

Rgds

Denis McMahon
 
D

Denis McMahon

You mean it *implies* html5. Please learn the difference between infer
and imply.


He may be using deprecated elements, but the browser isn't going to
care. No browser writer is going to dare to actually *fail* some element
just because Denis says so.

In html 5, font is not deprecated, it is obsolete. It was deprecated in
4.01 transitional, and obsolete in 4.01 strict too.

It is absolutely crap advice to tell him that he can or even should use
"<!doctype html>" when he's using <font> elements!

Rgds

Denis McMahon
 
B

Ben Bacarisse

Denis McMahon said:
I issued some cancels, it seems they may not all have been honoured.

Maybe you cancelled the one that gives no warnings? I still can't find
it, despite some searching.
Yes, I was overtaken a bit by red rage. The page does validate, despite
Barron's lies - he doesn't appreciate the difference between validating
with warnings and failing validation.

Although the w3c page at:

http://www.w3.org/QA/2002/04/valid-dtd-list.html

lists both the html 2.0 and 3.2 doctypes, the validator doesn't validate
against them - rather it seems you have to use the 4.01 transitional
doctype for both.

I don't think so. Using

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

rather than the DOCTYPE you used in the un-cancelled posting, works just
fine for me. The validator I have (v1.2) also validates against HTML
2.0, though the page does not, of course, because it has FONT elements.
However, when I replaced the doctype with the 4.01 declaration and added
a content-type header, all the warnings went away too ...

I get the same effect with the recommended 3.2 DOCTYPE.
 
T

Tim Streater

Denis McMahon said:
In html 5, font is not deprecated, it is obsolete. It was deprecated in
4.01 transitional, and obsolete in 4.01 strict too.

Deprecated, obsolete, who cares. Browsers will continue to support these
features until the cows come home. That's all that matters. Do I use
deprecated features? Quite likely, to some extent. But I update as and
when.
 
J

Jukka K. Korpela

2011-11-18 19:00, Tim Streater wrote under
Subject: Re: Even McMahon fails validation:
Deprecated, obsolete, who cares. Browsers will continue to support these
features until the cows come home. That's all that matters. Do I use
deprecated features? Quite likely, to some extent. But I update as and
when.

I'm trying to convert this troll-spawned discussion, which has some
interesting comments, to a more useful discussion under a more
descriptive Subject line.

I fully agree with Tim here. I'd like to add that the HTML5 drafts
(that's all there is, drafts), in addition to telling authors that they
"must not" use <font>, also tell browsers that they "must" support
<font>. In fact, the drafts require - to the extent a draft can require
anything - that browsers support some constructs, like <nobr>, that were
not contained in any existing specification.

So while the right (or maybe left?) hand of HTML5 forbids <font>, the
left (or right) hand demands that it be supported.

On the (very) technical side of the matter, HTML 4.01 specifies <font>
as deprecated, whereas HTML 4.01 Transitional simply contains it and
HTML 4.01 Strict does not.

Using <font> in new documents is mostly stupid. Replacing it in existing
documents is usually stupid, too, for different reasons.

There are some reasonable use cases for <font> even in new documents,
but more significantly, there are other features declared "obsolete" in
HTML5 that every reasonable author would use under suitable
circumstances. For example, suppose you have a data table, with numbers
(whole numbers, like 42 and 129,338,383) in the second column. I would
use <td align=right> for them. Everyone has the liberty of delegating
this essential rendering feature to CSS, but the HTML way is the only
one that really work in all browsing situations where visual alignment
matters.
 
D

Denis McMahon

Maybe you cancelled the one that gives no warnings? I still can't find
it, despite some searching.

No, I cancelled some responses that I made this morning. I was sure I'd
checked the file with the 3.2 doctype and no meta element (as I
originally posted) and got an error free validation, but that might have
been a combination of tidy which as far as I can tell doesn't generate
charset warnings and also having validated against the 3.2 doctype.

The DTD in the one I posted doesn't quite match the DTD on the W3C
website, which is weird because I thought I'd copy pasted it from the
website!

I'm afraid barron's "mcmahon fails to validate" kind of made me blow up a
bit, as I knew I'd got a validation on what I had posted (although I
concede that there was a warning associated with that validation).
I don't think so. Using

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

rather than the DOCTYPE you used in the un-cancelled posting, works just
fine for me. The validator I have (v1.2) also validates against HTML
2.0, though the page does not, of course, because it has FONT elements.

Yes, that was the doctype that should have appeared in the original post.
I get the same effect with the recommended 3.2 DOCTYPE.

Anyway, using the old validator url, I generated 10 copies of the page,
using 5 doctypes, each with and without a content-type header.

These can be accessed from the index file at

http://www.sined.co.uk/tmp/barron/index.htm

Each file has a link that calls the validator. The "back to sonnets
index" leads back to the index page above.

The only two that validate with no warnings are HTML 3.2 with content-
type meta element and HTML 4.01 Transitional with content-type meta
element.

Without the content-type meta element, these two validate with the
warning "No Character encoding declared at document level".

The other 3 doctypes all fail to validate with errors related to the use
of the font element.

All 10 files are reported as OK by tidy ["HTML Tidy for Linux (vers 25
March 2009)] but it does try and change the doctype on the html 2.0 and
5.0 files to 3.2, and on the 4.01 strict to 4.01 transitional.

I have no idea how the file I posted here ended with part of the doctype
declaration missing, as I was sure I copied and pasted that from the w3c
website. :(

Either way, I stand by my position that (1) Barron needs to write
compliant html wrt the correct structuring of inline and block elements,
(2) Barron needs to use a doctype that matches the html version he is
writing in (3) blithely using the an incorrect doctype is not a solution,
and (4) telling him to do so (I know that wasn't you Ben) is crap advice!

Rgds

Denis McMahon
 
D

Denis McMahon

The DTD in the one I posted doesn't quite match the DTD on the W3C
website, which is weird because I thought I'd copy pasted it from the
website!

I found out where the DTD discrepancy came from.

Tidy generates the 3.2 DTD:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

But w3c website uses:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

It seems that for some reason I'd used the tidy DTD and not the w3c one.

Rgds

Denis McMahon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top