From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,ac1252c179cf9560 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-17 04:00:55 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: HTML parser in Ada ? Date: Sun, 17 Nov 2002 12:00:54 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <17cd177c.0211161143.7f8d5842@posting.google.com> NNTP-Posting-Host: kiuk0152.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 1037534454 19318 129.241.83.78 (17 Nov 2002 12:00:54 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sun, 17 Nov 2002 12:00:54 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:30998 Date: 2002-11-17T12:00:54+00:00 List-Id: Gautier wrote: > [x] Yes, I'm aware of it. I would put a "HTML_DTD_Strict: Boolean;" > somewhere, since one aim is to filter HTML files > "from the Web": remove the evil Javascript, meta's, ... > A more ambitious task would be to transform junk HTML into > compliant one - but I won't do it (mmmh... unless...). If you want to do the latter, then make sure you read the whole html file first and then start mending it. Don't try to parse and fix as you read the file. The biggest problem is that people put tags inside other tags where it is not allowed. If only HTML had been more strict to start with or should I say the browsers. Still I don't know a browser who will tell you this page is not valid HTML. There is the W3 pages to do the validation, but I think that browsers should also do this so that when people make web pages they will see it and fix it right away. -- Preben Randhol ------------------------ http://www.pvv.org/~randhol/ -- �There are three things you can do to a woman. You can love her, suffer for her, or turn her into literature.� - Justine, by Lawrence Durrell