[racket] Fwd: read-xml: lex-error when reading Javascript

From: Alegria Baquero (alegriabaquero at gmail.com)
Date: Fri Apr 25 16:01:09 EDT 2014

Hello,

I am using the web-server/servlet library to deploy an html:

(let ((start (lambda (req)
                 (response/xexpr
                  (string->xexpr (include-template "ui/page.html"))))))


Page.html includes Javascript code and everything works well until I try to
use a comparison operator.  So for example, when read-xml tries to read the
javascript for loop

for (var i=0;i<nodeList.length;i++) {
                    alert("hello");
                }

It gives the following error:

read-xml: lex-error: at position 42.59/1747: expected / or > to close tag
`nodeList.length'

It turns out it believes the operator '<' is an opening xml tag.

Has anyone found a way to fix/circumvent this problem?

Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140425/7e4ae549/attachment-0001.html>

Posted on the users mailing list.