[plt-scheme] literal html data in servlets

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu Aug 18 17:54:47 EDT 2005

There is a way. Sorry for being away on vaca.

(make-cdata (make-location 0 0 0) (make-location 0 0 0) "the-string")

In an xexpr will insert "the-string" literally.

I think this could be made less verbose, like (cdata "the-string"),
but that's not what it is now.


On 8/18/05, Eli Barzilay <eli at barzilay.org> wrote:
> On Aug 18, Hans Oesterholt-Dijkema wrote:
> > Hmm, ok, but what I really want is to include real (partial) HTML
> > code into an xexpr.
> Seems like there is no way to escape into normal strings using xexprs.
> Besides the advice of switching to another system, the only way I
> could find to do this is escape is through comment objects.  The thing
> is that comments contain arbitrary text which is never checked, so a
> hack that can be used is:
>   (make-comment
>    (format "-->\n~a\n<!--"
>            "arbitrary html string")))
> A proper solution would be to fix the xml collection to have a
> construct that inserts literal text.  (There was probably some reason
> why this wasn't done...)
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                   http://www.barzilay.org/                 Maze is Life!

Jay McCarthy <jay at cs.brown.edu>

Posted on the users mailing list.