[plt-scheme] html in servlets

From: Zhu Chongkai (mathematica at citiz.net)
Date: Sun May 16 04:03:13 EDT 2004

When devloping some servlets, it seems to me that arbitrary HTML codes can be 
put in XML box and they will be send directly to HTTP clients. But after a few 
tries, I find that these HTML codes will first be converted to S-exps and then 
converted back to HTML, which causes a big problem: many HTML codes just can't 
be converted to S-exps. For example the followings are all HTML code of a table: 

<table>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

<table>
<tr><th>Food</th><th>Drink</th><th>Sweet</th></tr>
<tr><td>A</td><td>B</td><td>C</td></tr>
</table>

<table border>
<tr><th>Food</th><th>Drink</th><th>Sweet</th></tr>
<tr><td>A</td><td>B</td><td>C</td></tr>
</table>

But only the second one can be accepted by DrScheme. (This is only a simple 
example. Some HTML is so complicated that I can't even write them as S-exps 
by hand.)

I know that under some situations DrScheme need to convert XML-box into 
S-exps, but just for servlets, is it possible to give out arbitrary HTML 
codes? 



Posted on the users mailing list.