[racket] lex-error report while reading HTML using module XML

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Thu Dec 13 09:17:15 EST 2012

On Dec 12, 2012, at 11:42 PM, Haiwei Zhou wrote:

> In HTML the <img> tag has no end tag.

Not exactly true.  In XHTML (i.e. HTML >= 4.0, IIRC), it SHOULD have an end tag -- as should every other tag in XHTML.  You can do this either with
<img src="blah.blah"></img>
or, briefer, with
<img src="blah.blah"/>

However, most or all browsers accept Web pages with certain common tags unterminated: <img>, <p>, <br>, <li>, etc. and there's a reasonable argument that Racket's XML library should be capable of accepting them too.


Stephen Bloch
sbloch at adelphi.edu



Posted on the users mailing list.