You are here: Re: What's wrong with this HTML (fails validation) ? « HTML « IT news, forums, messages
Re: What's wrong with this HTML (fails validation) ?

Posted by robert maas, see http://tinyurl.com/uh3t on 02/14/07 21:43

> From: "Jukka K. Korpela" <jkorp...@cs.tut.fi>
> Content-Type: text/plain;
> format=flowed;
> charset="Windows-1252";
> reply-type=original

That's not a valid charset to use for posting to newsgroups.
Could you please use US-ASCII or ISO 8859-1 (Latin 1) instead?
In particular, I don't have access to any machine capable of
displaying text in Windows-1252 character set, and the Web browser
doesn't do a particularily good job of rendering non-USASCII
characters in USASCII/VT100, so anything you said might be mangled
by the time I see it here.
Do you by any chance have a validator that spots each time you use
a character of Windows-1252 that is not compatible with US-ASCII,
so that you could eliminate all such characters from your article,
and then post what's left as US-ASCII instead?

> >> The useful thing is that the validator reports the existence of an
> >> error.
> > That's not very useful at all when the error is reported several
> > thousand lines after where the actual error happened.
> Not very useful, but useful. Knowing whether there is an error or
> not is more information than not knowing whether there are errors
> or not.

Well that depends on whether you consider the purpose of a
validator to be:
-1- Show the author where the error is, and explain what's wrong,
so that the author can immediately fix it.
-2- Flag the entire WebPage as INVALID, with no idea where the
error actually is, so the author must post to a newsgroup
asking for help, and spend several days before a single error
can be fixed.
I'll agree the W3C validator accomplished -2- in this case.

> In my wild youth, I wrote major parts of a Pascal compiler,
> including error processing, and I still remember it was rather
> difficult to be correct and helpful at the same time.

Hey, as long as you're here, I have an OT question just for you:
Do you have access to any Pascal system (compiler and runtime
library) which is suitable for writing CGI server-side
applications? I.e. it must have some way to inspect system
variables such as REQUEST_METHOD and CONTENT_LENGTH and
QUERY_STRING, and it must have some way to read n characters from
standard input, in order to obtain the urlencoded form contents as
a string for both GET and POST methods.

> On the contrary. A utility that reports mistakes (even on a
> "There is an error" basis, though naturally I prefer more exact
> reports) is often essential, but it is not a _substitute_ for
> learning and understanding. Rather, an incentive and tool for them.

Well so-far all I've learned is that:
While <tag /> is a perfectly acceptable non-container XML tag, it's
totally invalid as such in SGML, generating completely different
longuange semantics, therefore must be totally avoided in any
WebPage that is supposed to be transitional between HTML and XHTML.
The br element is defined in a way that's totally incompatible
between HTML and XHTML, so must be completely avoided in
transitional WebPages.
There's a second validator that is very much different from the W3C
validator and can help diagnose errors where the W3C validator gave
an error apparently unrelated to anything wrong in the syntax.

> Compare this with spelling checkers.

My experience with spelling checkers was totally frustrating. For
trying to spot typographic mistakes in my transcription of my
personal diary to computer file, I spent many hours adding new
words to the dictionary, such as girls' names, places/streets, and
even psychological jargon that didn't happen to be in the base
dictionary. In the end, after many many hours of such work, not a
single real typo was spotted. Meanwhile several typos crept through
because the mis-typed word happened to match a real word, usually
an archaic word, that happened to be in the base dictionary.

My current computer (Macintosh Performa 600 running System 7.5.5)
doesn't even have a spelling checkers as far as I know, and I'm not
going to waste my time downloading one. Whenever I'm about to use a
new word I haven't used before, I type it as I best think it should
be spelled, and feed it to either dictionary.com or google.com, and
see what turns up. Sometimes it matches but gives a meaning I
didn't intend, indicating I either picked the wrong word or
accidently misspelled one word to yield another word. Often it says
no match but offers alternative spellings, and I try any that look
likely and eventually find the one with the meaning I intended.
About once every few months my spelling is wrong and none of the
offered corrections are what I intended and I have no idea how to
spell the word correctly. So then I have to post to a newsgroup
asking what is the word that sounds like "mumleblortch" and means
"suchandsuch", and hope somebody knows and will tell me.
I have the same problem with movie titles, where indb.com maps from
title to movie, and from actor in movie to all movies that starred
that actor, but has no way to map from concept to movie title.
For example for years I remembered a movie that had somebody go
back in time and almost collide with themselves making the return
trip, and then at the end the time machine is damaged causing the
whole movie to repeat at hyper-speed. I couldn't find anyone who
knew what that movie was. Finally a few years ago the movie
appeared on TV again, and I was able to find the title: "Journey to
the Center of Time".

In cryptography there's a concept of "trapdoor function", where
it's very easy to compute one function but not its inverse. The
same idea applies to information retrieval such as spelling and
movie titles with current network technology. A few WebSites try to
provide the reverse mapping in some very special cases, such as the
site that recognizes famous integer sequences. I don't know any
dictionary/spellcheck reverse-mapping service, do you?

> if Word flags an entire sentence in a manner that effectively
> says "hey, this went over my head, the sentence is too
> complicated", I'm grateful for the information and don't require
> it to tell _where_ its analysis broke. Rather, I read the
> sentence carefully and then usually reformulate it, typically
> breaking it to two sentences.

That's not at all comparable to what I experienced with with the
W3C validator. Imagine if you had a sentence that said:
I rather like using the open parens, i.e. "(", to start a footnote.
And then ten pages later you had another sentence that started:
I have 6 (six) reasons to love Heather Thompson:
And the spelling checker showed you just that last line and told
you that that was not a valid sentence. It didn't bother to tell
you that it considered the entire ten pages from the first open
paren, ignoring the second open paren, to the finally matching
close paren, as a single "sentence". It didn't tell you that it was
ignoring that second open parens because you are already in scope
of open parens and it's bad style to nest parens. How can you
carefully read "the sentence" when you don't even know how many
pages were gulped into a single sentence by the parsing of the
spell checker?

> All human people should learn more every day to the extent they
> can.

I agree. But the ancient practice of throwing somebody in jail, or
flogging somebody, or just saying "that's it" and walking away,
without even telling them what crime they committed that warranted
such punishment, is not the way to help somebody learn to avoid
such mistakes in the future. Unfortunately that ancient practice is
still practiced today, and I've been unable to learn several topics
as a result (of the combination of lack of meaningful error
diagnostics and my lack of knowledge sufficient to guess what I did
wrong).

And let me say something about the word "diagnostic"!! The word
comes from "diagnose", which means to figure out what's wrong and
state that clearly. If you go to a doctor, and he says "Yes, you're
sick, but I won't tell you what is causing you to be sick, you need
to learn enough to figure that out yourself, and I won't even tell
you what topic you need to learn", that's not a diagnosis, IMO.

> These days, you can easily use CSS to set the relevant
> properties (margin-top and margin-bottom for applicable elements)
> to zero, with the usual CSS caveats of course.

The usual caveat is that it doesn't work, plain and simple.

> In this context, "net" (better written as "NET") means "null end
> tag". When you have "<p /", you have a NET-enabling start tag,
> i.e. a start tag that makes the next "/" act as the end tag for
> the element that was opened. It's a nice idea in SGML, but it was
> never implemented in HTML browsers, even though it was formally
> part of HTML up to and including HTML 4.01.

Ah, thanks for telling me that NET is an abbreviation, nothing to
do with Visual Basic .NET, or InterNet, or net profit, etc., and
for telling me what the abbreviation stands for. That's a start.
Now I still don't know why it's called "null" and why it's called
"end tag" and why it really acts like a start tag instead of a end
tag, etc. But clearly it's not anything I ever intended, so my De
Anza class instructor was wrong that I should use empty tags in
transitional HTML documents, so I've stopped using them as of
today. Now I just need to find alternative syntax in all my
existing Web pages that I've created or edited since 2.5 years ago.

> > How the fuck do I get a horizontal rule any more???
> By using <hr>.

That violates what I learned in the "Web Design" class.
The instructor required two things:
- Set up header (doctype etc.) as transitional.
- Never use an opening tag without the matching close tag.
As you point out, neither br nor hr is compatible with those two
rules. So I've been forced to go back to what I used to do before I
ever learned about the hr element:
----------------------------------------------------------------

> Alternatively, by setting a top or bottom border for an element.

I just want a few blank lines followed by a bar across the screen
to mark the end of each section and start of next section, because
I want a whole lot of sections to be all in a single physical
WebPage, but I want readers to notice when they've run off the end
of one topic and are starting to bump into the next (unrelated)
topic.

> There are other techniques like images and background images too,

That doesn't work with text-only access such as the only access I
have here.

So on another pending topic: Do you know any way to force a line
break without causing a blank line? Do you know any way to avoid a
blank line at the end of a pre block?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация