BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} HTML table formatting (long)
Andrew Dalgleish wrote:
>
> One of my cow-orkers criticized BB's HTML output, so I thought I'd try
> patching BB so it passes the HTML 3.2 validator at
> http://validator.w3c.org.
>
> I've fixed the mis-matched start/end tags, etc but I still have a few
> problems and was hoping someone on this list might be able to help.
>
> The problem is using <PRE> inside a <TD> element in the "disk" column.
> Without the <PRE> the space-padded columns don't line up.
>
> Any HTML wizards like to help me out?
>
> (The afore-mentioned cow-orker uses the words "IE5" and "standard" in
> the same sentence. :-)
That's why he's your cow-orker ;) (don't know what orker means, but I
don't think I'd like to be the cow !)
BTW, which version of BB are you running ?
Well, I made it go through 'tidy' (available somewhere at w3c.org)
and here's the output for bb.html (bb2.html and an HTML status file are
further below):
Tidy (vers 26th July 1999) Parsing "/home/sean/bb/www/bb.html"
line 15 column 54 - Warning: unescaped & which should be written as
&
line 24 column 1 - Warning: <table> lacks "summary" attribute
line 37 column 1 - Warning: <td> proprietary attribute value "ABSMIDDLE"
line 45 column 1 - Warning: <table> lacks "summary" attribute
line 288 column 1 - Warning: <table> lacks "summary" attribute
line 288 column 1 - Warning: trimming empty <p>
line 305 column 1 - Warning: <table> lacks "summary" attribute
line 305 column 1 - Warning: trimming empty <p>
line 324 column 5 - Warning: <table> lacks "summary" attribute
line 326 column 19 - Warning: <table> lacks "summary" attribute
line 335 column 4 - Warning: <table> lacks "summary" attribute
line 335 column 4 - Warning: trimming empty <p>
line 336 column 1 - Warning: trimming empty <table>
line 342 column 4 - Warning: malformed comment
Well, if we remove the summary error we get
Tidy (vers 26th July 1999) Parsing "/home/sean/bb/www/bb.html"
line 15 column 54 - Warning: unescaped & which should be written as
&
line 37 column 1 - Warning: <td> proprietary attribute value "ABSMIDDLE"
line 288 column 1 - Warning: trimming empty <p>
line 305 column 1 - Warning: trimming empty <p>
line 335 column 4 - Warning: trimming empty <p>
line 336 column 1 - Warning: trimming empty <table>
line 342 column 4 - Warning: malformed comment
Now empty <P> probably shouldn't be there but they don't cause
much harm (they probably on do a <BR> in this case), so we now get:
They have been changed to <BR>
Tidy (vers 26th July 1999) Parsing "/home/sean/bb/www/bb.html"
line 15 column 54 - Warning: unescaped & which should be written as
&
OK, I'll fix that very bad error ;)
line 37 column 1 - Warning: <td> proprietary attribute value "ABSMIDDLE"
Boy, IE 5.0 would probably die over this :) Fixed to MIDDLE
line 336 column 1 - Warning: trimming empty <table>
Will have to look into this one...
line 342 column 4 - Warning: malformed comment
It doesn't like "--->" as an end of comment, I'll fix it up to be "-->"
Big slap on the hand ... Fixed (in the footer file)
For bb2.html, there were 3 errors
1) summary crap
2) ---> end of comment
3) I forgot, I fixed it before writing this reply
Now, a generated HTML status page did not fare as well
Tidy (vers 26th July 1999) Parsing
"../www/html/www.maclawran.ca.disk.html"
line 20 column 1 - Warning: <table> lacks "summary" attribute
line 49 column 9 - Warning: <table> lacks "summary" attribute
don't care
line 50 column 1 - Warning: missing <tr>
fixed
line 53 column 16 - Warning: trimming empty <code>
line 53 column 16 - Warning: missing </code> before <pre>
Yup, had <code><pre>...</pre></code>. Well, this means
<code> had no actual use
line 53 column 16 - Warning: missing </h4> before <pre>
line 53 column 16 - Warning: trimming empty <h4>
same problem as code, but you can't make <pre> text as header
line 59 column 7 - Warning: discarding unexpected </code>
line 59 column 14 - Warning: discarding unexpected </h4>
problem with <code> and <H4> with <pre>
line 62 column 1 - Warning: <table> lacks "summary" attribute
don't care
line 82 column 1 - Warning: missing </center>
fixed now :)
So, the generated html wasn't too bad, just needed tweaks.
After the minor changes
bb.html:
Tidy (vers 26th July 1999) Parsing "../www/bb.html"
line 24 column 1 - Warning: <table> lacks "summary" attribute
line 45 column 1 - Warning: <table> lacks "summary" attribute
line 288 column 1 - Warning: <table> lacks "summary" attribute
line 305 column 1 - Warning: <table> lacks "summary" attribute
line 324 column 5 - Warning: <table> lacks "summary" attribute
line 326 column 19 - Warning: <table> lacks "summary" attribute
line 335 column 5 - Warning: <table> lacks "summary" attribute
line 336 column 1 - Warning: trimming empty <table>
bb2.html:
Tidy (vers 26th July 1999) Parsing "../www/bb2.html"
line 26 column 1 - Warning: <table> lacks "summary" attribute
line 55 column 5 - Warning: <table> lacks "summary" attribute
line 64 column 1 - Warning: <table> lacks "summary" attribute
www.maclawran.ca.disk.html:
Tidy (vers 26th July 1999) Parsing
"../www/html/www.maclawran.ca.disk.html"
line 20 column 1 - Warning: <table> lacks "summary" attribute
line 49 column 9 - Warning: <table> lacks "summary" attribute
line 62 column 1 - Warning: <table> lacks "summary" attribute
So all's better now :)
BTW, 'tidy' can be used to fix your pages, use it on you co-worker's
HTML output and then fix his errors ;)
Take a look at: http://www.w3.org/People/Raggett/tidy/
Sean used to put the pages through "HTML Doctor" but now it
has become a paid service :( So we always tried to get
as clean HTML code as possible ... I'm sure that different
tools will spit out different errors on the same page so that's
why.
I also ran these pages thru validator (http://validator.w3c.org/) here
are the results:
bb.html:
Error at line 1: Missing DOCTYPE declaration at start
Error at line 330: end tag for element "A" which is not open
This is not true, it is open
Error at line 332: end tag for element "A" which is not open
same thing here
Error at line 336: end tag for "TABLE" which is not finished
Yup, this is our empty <TABLE</TABLE>
bb2.html: Many more errors than tidy
Error at line 1: Missing DOCTYPE declaration at start
of document (explanation...)
Error at line 22:
<A HREF=http://MacLawran.ca/bb-dnld/>
character data is not allowed here
Yeah the URL is not quoted, tsk tsk, fixing every one that
are unquoted
Error at line 23:
<IMG SRC=gifs/bb2.gif ALT="BB" WIDTH=30 HEIGHT=49 BORDER=0></A><BR>
required attribute "ALT" not specified
Caused by the missing quotes
Error at line 23:
<IMG SRC=gifs/bb2.gif ALT="BB" WIDTH=30 HEIGHT=49 BORDER=0></A><BR>
document type does not allow element "IMG" here
Caused by the missing quotes
Error at line 23:
<IMG SRC=gifs/bb2.gif ALT="BB" WIDTH=30 HEIGHT=49 BORDER=0></A><BR>
character data is not allowed here
unquoted
Error at line 23:
<IMG SRC=gifs/bb2.gif ALT="BB" WIDTH=30 HEIGHT=49 BORDER=0></A><BR>
end tag for element "A" which is not open (explanation...)
Caused by the missing quotes
Error at line 23:
<IMG SRC=gifs/bb2.gif ALT="BB" WIDTH=30 HEIGHT=49 BORDER=0></A><BR>
document type does not allow element "BR" here
Caused by the missing quotes
Error at line 24:
<CENTER>
document type does not allow element "CENTER" here
Caused by the missing quotes
Error at line 44:
HEIGHT=12 WIDTH=12 BORDER=0></A></TD>
end tag for element "A" which is not open (explanation...)
Caused by the missing quotes
Error at line 47:
HEIGHT=12 WIDTH=12 BORDER=0></A></TD>
end tag for element "A" which is not open (explanation...)
everybody knows what my response is ...
Error at line 51:
<IMG SRC=gifs/buthelp.gif ALT="Help" WIDTH=74 HEIGHT=29 BORDER=0
VSPA
required attribute "ALT" not specified
Caused by the missing quotes
Error at line 53:
<IMG SRC=gifs/butinfo.gif ALT="Info" WIDTH=74 HEIGHT=29 BORDER=0
VSPA
required attribute "ALT" not specified
Same here
Error at line 55:
<IMG SRC=gifs/butview.gif ALT="View" WIDTH=74 HEIGHT=29 BORDER=0
VSPA
required attribute "ALT" not specified
Gee, will it end ?
Error at line 57:
<IMG SRC=gifs/butpage.gif ALT="Page" WIDTH=74 HEIGHT=29 BORDER=0
VSPA
required attribute "ALT" not specified
My prayers have not been answered
Error at line 71:
</CENTER></BODY></HTML>
end tag for element "BODY" which is not open (explanation...
The're wrong again
I've fixed up the missing quotes and now I only have the DOCTYPE warning
Now, an HTML status page:
Error at line 1:
Missing DOCTYPE declaration at start of document (explanation...)
Like all the other documents
Error at line 54:
(truncated)d.gif" ALT="red" HEIGHT=12 WIDTH=12> / (49%) has reached
the
document type does not allow element "IMG" here
Humm, It really doesn't like the <IMG SRC> tag within a <PRE></PRE>
I don't know if this is legal
This is found in the .disk/.procs output where colored dots appear
with the text
Error at line 68:
(truncated)GE SRC="../gifs/buthist.gif" ALT="History" BORDER=0><INPUT
TYPE=HIDDEN
there is no attribute "BORDER"
(explanation...)
Didn't know you couldn't have a BORDER tag when specifying an IMAGE
as INPUT TYPE. I'll remove it... nope. Netscape actually uses it and
the border around the "HISTORY" button looks ugly so it stays. Don't
know
what IE thinks but I don't care
Now, will all this make your HawaIE 50 friend happy ? Would he get as
a quick reponse from his friends in Redmond as you got here ? And
actually,
get a fix ? ;)
bye
--
Robert-Andre Croteau BSD,MOTU robert@unix.sh
Services Conseils Informatiques MOTU Inc. robert@motu.ca
(514) 465-3057 rcroteau@videotron.ca
http://www.motu.ca/ http://www.bb4.com
Si le bonheur ne s'achete pas alors louez le.
-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index