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

A validator 'improvement' suggestion

4 views
Skip to first unread message

tlvp

unread,
May 1, 2012, 8:23:45 PM5/1/12
to
Jukka recently had occasion to admonish an org.w3c.validator participant:

> The p element started on line 41 is terminated on line 43 by the <ul>
> tag. A p element must not, by the syntax rules, contain a block element
> like ul. The syntax allows end tag omission for the p element, so the
> end is implied here; this can be described by saying that a <ul> tag
> implies </p> before it, when there is an open p element. This leaves the
> end tag </p> on line 51 homeless.

Would it be possible to introduce a new box for someone submitting an HTML
file for validation to tick, that will result in the validator reporting,
each time it encounters a similarly superfluous end tag </whatever>, just
where it sees the implicit end tag for the most recent prior matching start
tag <whatever>, so that one may learn where one's coding, that one may have
thought to have been "balanced", screwed up?

Would spare you from repeatedly having to parse code and generate
individualized answers like that displayed above :-) , and would help other
folk, like the participant in question, or others even more naive, like me,
to avoid a lot of potentially unnecessary head-scratching :-) .

I know -- "this is not the venue for such a request." But I can't get posts
accepted on gmane.o.w.v through this NNTP client, and know no other/better
way, sorry.

So: TIA, And cheers, -- tlvp
--
Avant de repondre, jeter la poubelle, SVP.

dorayme

unread,
May 1, 2012, 9:43:12 PM5/1/12
to
In article <1b32kv0nj1ayn$.101eye36...@40tude.net>,
tlvp <mPiOsUcB...@att.net> wrote:

> Jukka recently had occasion to admonish an org.w3c.validator participant:
>
> > The p element started on line 41 is terminated on line 43 by the <ul>
> > tag. A p element must not, by the syntax rules, contain a block element
> > like ul. The syntax allows end tag omission for the p element, so the
> > end is implied here; this can be described by saying that a <ul> tag
> > implies </p> before it, when there is an open p element. This leaves the
> > end tag </p> on line 51 homeless.
>
> Would it be possible to introduce a new box for someone submitting an HTML
> file for validation to tick, that will result in the validator reporting,
> each time it encounters a similarly superfluous end tag </whatever>, just
> where it sees the implicit end tag for the most recent prior matching start
> tag <whatever>, so that one may learn where one's coding, that one may have
> thought to have been "balanced", screwed up?

Perhaps "the implicit end tag for the most recent prior matching start
tag <whatever>" might not have an unequivocal answer.

To ask that the validator be more helpful is a big ask. Not saying it
is totally unreasonable to *wish* for it. Many already give
"warnings", you are asking for analysis.

<table>
<tr>
<td>...
</tr>
</td>
</table>

in some checkers in some programs you can get a simple

HTML Error (17, 13): The tag <td> is missing.

In others, you can get the perhaps more helpful

17: Element "<td>" implicitly closed here.
18: Close element "</td>" found but element wasn't open.

The immediate above is from what my BBEdit editor says.

So, there *are* more helpful facilities elsewhere. See Tidy as well.

But, imo, the W3C one should concentrate on being very focussed and
doing what it does best and not be distracted by complications in
order to be Mr. International Nice Guy. I like my W3C validator to be
tough, tall, brave, uncompromising, to make a clear-cut distinction
between good and evil, to be with the one and against the other and to
hold everyone else to account in a Bush-like way, one side or the
other, black or white, no pussyfooting about.

In fact, when there are no good films to be watched, nothing on TV, no
news about terrorists being hunted down, I turn to the W3C Validator
to see it in action, I like its style.

--
dorayme

tlvp

unread,
May 1, 2012, 10:14:33 PM5/1/12
to
On Wed, 02 May 2012 11:43:12 +1000, dorayme wrote:

> 17: Element "<td>" implicitly closed here.
> 18: Close element "</td>" found but element wasn't open.
>
> The immediate above is from what my BBEdit editor says.

BBEdit can tell you that? I'll have to get it! Thanks, dorayme :-) .
(You better not have been pulling my leg ... .)

dorayme

unread,
May 1, 2012, 11:01:03 PM5/1/12
to
In article <qwt5zilkeg8g.1d...@40tude.net>,
tlvp <mPiOsUcB...@att.net> wrote:

> On Wed, 02 May 2012 11:43:12 +1000, dorayme wrote:
>
> > 17: Element "<td>" implicitly closed here.
> > 18: Close element "</td>" found but element wasn't open.
> >
> > The immediate above is from what my BBEdit editor says.
>
> BBEdit can tell you that? I'll have to get it! Thanks, dorayme :-) .
> (You better not have been pulling my leg ... .)

It is a Mac program so don't get it, if you don't have a Mac. Or if
you don't run Mac on your PC somehow (maybe in VirtualBox?).

And if you do have a Mac, still maybe don't get it because there is
the free equivalent for it in *TextWrangler* (same company provide
this software).

Anyway, there have to be many Windows facilities to do similar, surely?

--
dorayme
Message has been deleted

dorayme

unread,
May 2, 2012, 8:19:13 AM5/2/12
to
In article <timstreater-CF16...@news.individual.net>,
Tim Streater <timst...@greenbee.net> wrote:

> In article <dorayme-8208FD...@news.albasani.net>,
> dorayme <dor...@optusnet.com.au> wrote:
>
...
> > 17: Element "<td>" implicitly closed here.
> > 18: Close element "</td>" found but element wasn't open.
> >
> > The immediate above is from what my BBEdit editor says.
>
> So, can I get TextWrangler to do that too?

Actually, not out of the box, no. It seems TextWrangler does not have
these syntax checking facilities built in like BBEdit. I don't use it
and was too hasty in making a remark about it to ciwa subscriber tlvp,
who probably does not use Macs anyway. I wrongly *assumed* it would
have some basic HTML tools.

There are probably ways for you to get something going with scripts,
loaded into the scripts folder, but really, there are so many other
ways to check, it is perhaps not worth too much effort.

--
dorayme
Message has been deleted

tlvp

unread,
May 2, 2012, 10:04:16 PM5/2/12
to
On Wed, 02 May 2012 18:10:20 +0100, Tim Streater wrote:

> In article <dorayme-7B0D56...@news.albasani.net>,
> dorayme <dor...@optusnet.com.au> wrote:
>
>> In article <timstreater-CF16...@news.individual.net>,
>> Tim Streater <timst...@greenbee.net> wrote:
>>
>>> In article <dorayme-8208FD...@news.albasani.net>,
>>> dorayme <dor...@optusnet.com.au> wrote:
>>>
>> ...
>>> > 17: Element "<td>" implicitly closed here.
>>> > 18: Close element "</td>" found but element wasn't open.
>>> >
>>> > The immediate above is from what my BBEdit editor says.
>>>
>>> So, can I get TextWrangler to do that too?
>>
>> Actually, not out of the box, no. It seems TextWrangler does not have
>> these syntax checking facilities built in like BBEdit. I don't use it
>> and was too hasty in making a remark about it to ciwa subscriber tlvp,
>> who probably does not ...

Correct.

>> ...use Macs anyway. I wrongly *assumed* it would
>> have some basic HTML tools.
>>
>> There are probably ways for you to get something going with scripts,
>> loaded into the scripts folder, but really, there are so many other
>> ways to check, it is perhaps not worth too much effort.
>
> OK. I usually use the Mark I eyeball for this purpose.

Heh-heh ... not until Google showed me the following did I realize you
weren't referring to some arcane bit of software kit:

'Qualcuno saprebbe indicarmi come tradurre in italiano "Mark 1 Eyeball"?'

Ya got me good :-) . Cheers, -- tlvp

Dr J R Stockton

unread,
May 3, 2012, 2:29:43 PM5/3/12
to
In comp.infosystems.www.authoring.html message <qwt5zilkeg8g.1d69k28zgjh
zh....@40tude.net>, Tue, 1 May 2012 22:14:33, tlvp
<mPiOsUcB...@att.net> posted:

>On Wed, 02 May 2012 11:43:12 +1000, dorayme wrote:
>
>> 17: Element "<td>" implicitly closed here.
>> 18: Close element "</td>" found but element wasn't open.
>>
>> The immediate above is from what my BBEdit editor says.
>
>BBEdit can tell you that? I'll have to get it! Thanks, dorayme :-) .
>(You better not have been pulling my leg ... .)

My aforementioned <http://www.merlyn.demon.co.uk/linxchek.htm> will, if
a shibboleth is provided, get for each page tested a string containing
the text of its body. It should not be too difficult to scan that text
for tags and closers, maintaining a stack of unclosed openers. Turn the
stack handling off within script elements, and pop each top implicitly-
closable tag if a tag is found which it cannot contain. Report attempts
to close that which is not at top-of-stack.

FYI, while writing, I frequently test my pages with <http://en.wikipedia
.org/wiki/HTML_Tidy>, checking only. It finds most of the HTML typos.
The batch file which I use to call it also calls a Pascal/Delphi
program, cheklinx.exe.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike 6.05 WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.

tlvp

unread,
May 3, 2012, 10:04:40 PM5/3/12
to
On Thu, 3 May 2012 19:29:43 +0100, Dr J R Stockton wrote:

> FYI, while writing, I frequently test my pages with <http://en.wikipedia
> .org/wiki/HTML_Tidy>, checking only. ...

HTML_Tidy, eh? I'll have to give that a whirl, thanks. Cheers, -- tlvp

Dr J R Stockton

unread,
May 5, 2012, 2:56:51 PM5/5/12
to
In comp.infosystems.www.authoring.html message <743q1k7tu9xe$.165w83vfhj
ex5...@40tude.net>, Thu, 3 May 2012 22:04:40, tlvp
<mPiOsUcB...@att.net> posted:

>On Thu, 3 May 2012 19:29:43 +0100, Dr J R Stockton wrote:
>
>> FYI, while writing, I frequently test my pages with <http://en.wikipedia
>> .org/wiki/HTML_Tidy>, checking only. ...
>
>HTML_Tidy, eh? I'll have to give that a whirl, thanks. Cheers, -- tlvp


For the purpose, I call it by CHK-TIDY.BAT, called by TRY.BAT, both
available /via/ <http://www.merlyn.demon.co.uk/programs/00index.htm>.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk DOS 3.3, 6.20; WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links.
PAS EXE TXT ZIP via <http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.
0 new messages