Re: Amaya parser misses badly formed code

> 
> http://www.racersinfo.com/folders/safety/safeMain.htm
> illustrates a problem within the parser where badly formed
> html is not flagged as such .... it is basically
> a numbered list that was terminated with a typo ....
> ie 
> <ol>
> <li>foo</li>
> <li>bar></li>
> <ol>
> 
> instead of closing with a </ol>........  
> Shouldn't the Amaya parser signal all errors or divergences 
> from the spec, even if it doesn't cause problems in rendering.
> This is in addition to the parser not warning about backslashes
> being the wrong separator in image file names although it 
> prevents the display of the image...  that is another parser 
> problem needing fixing ....  

Hello John,

Actually, Amaya uses 2 different parsers, one for HTML documents, another one 
from XML documents (XHTML, MathML, SVG, ...).
The HTML parser tries to correct the most common errors (like the missing and 
tags) otherwise, most of the document on the web wouldn't be rendered (as the 
document you mentionned).
The XML parser is more strict and points out each not well-formed document 
(according to the XML spec.)

Laurent Carcone

Received on Tuesday, 26 November 2002 04:04:19 UTC