lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV 2.7 doesn't obey official html DTD tag in the file?


From: Klaus Weide
Subject: Re: LYNX-DEV 2.7 doesn't obey official html DTD tag in the file?
Date: Wed, 15 Oct 1997 07:43:24 -0500 (CDT)

On Mon, 13 Oct 1997, Jari Aalto wrote:

>     Hi,
> 
>     I just fetched prebuilt lynx2-7.hppa1.1-hp-hpux10.tar.gz because
>     I noticed that our 2.5 version didn't work right with files having
>     correct DTD tag. For example I tried accessing
> 
>         file:/users/jaalto/test.tmp
> 
>     which had been purposively named that name, having the first line
> 
>         <!DOCTYPE html PUBLIC "-//WC3//DTD HTML 3.2//EN">
>         <HTML>
> 
>     As the sgml standard suggests. However when lynx was up, it didn't
>     recognized the file as HTML at all. If I changed the extension to
>     .html, the html recognition was back.
> 
>     Please correct this, Lynx should not rely on file extensions, but
>     also check the used DTD definition.

I am wondering who gave you this wrong expectation, that <!DOCTYPE is a
"command" which a program (which programs?) has to obey wherever it
occurs.  "Correcting" what you think is wrong would be introducing a bug.

Anyway, why not work _with_ file extensions, rather than trying to work
against them?  See what mime.types (or SUFFIX in lynx.cfg) can do for you.

Or write a script like

  #!/bin/sh
  if [ -z "$1" ];then
     /path/lynx
  elif grep '<!DOCTYPE' "$1" /dev/null >/dev/null 2>/dev/null; then
     /path/lynx -force_html "$@"
  else
     /path/lynx "$@"
  fi
 
then you can blame your script (and change it) if it doesn't do what your
think it should do.

   Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]