Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 1998 01:00:06 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        groggy@iname.com
Cc:        freebsd-questions <questions@FreeBSD.ORG>
Subject:   Re: lynx & PRE
Message-ID:  <19980928010006.A23915@emsphone.com>
In-Reply-To: <Pine.BSF.3.96.980927191941.1633A-100000@abc.xyz.net>; from "groggy@iname.com" on Sun Sep 27 20:05:54 GMT 1998
References:  <19980927201405.A21471@emsphone.com> <Pine.BSF.3.96.980927191941.1633A-100000@abc.xyz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Sep 27), groggy@iname.com said:
> it's not EASY to explain these problems!!! it's driving me crazy and
> makes me look like a fool.  lynx does not necessarily screw up ON the
> bad html, LYNX WREAKS HAVOC DOWN FARTHER in a document.  does this
> make sense now?

Partially.  But do you have an example?

> now, if you take the example below, which DOES seemingly display OK,
> add run it thru a validator (w3c 4.0 strict for example), you get:
> 
> Error at line X:
> 	[...] <IMG SRC="g.gif" ALT="[G1]"> text1
>                                           ^ document type does not
>                                             allow element <IMG> here

Yeah, because according to the spec (3.2 and 4.0):

   PRE has the same content model as paragraphs, excluding images and
   elements that produce changes in font size, e.g. IMG, BIG, SMALL,
   SUB, SUP and FONT.

As I said before, none of the web browsers are HTML validators.  They
will do their best to display what you ask, but if you give them
unusual input, there's no guarantee that you'll get usable output.

What we sometimes do at work is have two pages, one for lynx, and one
for graphical browsers. This is easy with the Roxen webserver, where
you can do things like "<if supports=tables>tables!</if> 
<else>no tables</else>", and depending on the user-agent, will return
either the <if> container or the <else> container. Take a look at
http://www.emsphone.com/Al to see this in action.  The set of links in
the center is rendered with tables or <pre> tags, depending on the
browser.

> i'm not yet necessarily sure that the problems i'm having are the
> result of the bad HTML.  it could be that lynx chokes on certain
> combinations of elements and tags.  this will take alot of work to
> figure out since lynx appears indescriminate on exactly where the
> crummy output will appear.

You might want to ask the lynx authors about this.  Give them a
reference to your html source, and ask them what the correct way to do
what you want is.

	-Dan Nelson
	dnelson@emsphone.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980928010006.A23915>