From owner-freebsd-questions Sun Sep 27 23:00:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA06339 for freebsd-questions-outgoing; Sun, 27 Sep 1998 23:00:33 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA06307 for ; Sun, 27 Sep 1998 23:00:22 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id BAA24140; Mon, 28 Sep 1998 01:00:06 -0500 (CDT) Date: Mon, 28 Sep 1998 01:00:06 -0500 From: Dan Nelson To: groggy@iname.com Cc: freebsd-questions Subject: Re: lynx & PRE Message-ID: <19980928010006.A23915@emsphone.com> References: <19980927201405.A21471@emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.3i In-Reply-To: ; from "groggy@iname.com" on Sun Sep 27 20:05:54 GMT 1998 X-OS: FreeBSD 2.2.7-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: > [...] [G1] text1 > ^ document type does not > allow element 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 "tables! no tables", and depending on the user-agent, will return either the container or the 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
 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