[plt-scheme] Re: Html in Servlets

From: Zhu Chongkai (mathematica at citiz.net)
Date: Mon May 17 01:25:30 EDT 2004

>ifconfig nslookup wrote:
>> This would work for:
>> <script language="JavaScript">
>>   if (a < b)
>>     a = b;
>> </script>
>>
>> (because of the < symbol)
>
>Ouch!  Assuming you mean that this *wouldn't* work, you're right.
>
>Wrapping the code in a CDATA doesn't seem to solve this, either: although
>the xexpr which results from an XML box which uses CDATA looks correct, when
>it's converted to XML, > and < etc. are still converted to entity
>references.
>
>Another solution might be to wrap the code in a <!-- comment -->, but
>DrScheme just strips the comment out, eliminating the script code.  Setting
>(read-comments #t) didn't seem to affect that.
>
>I found one way to make this work with an XML box: inside the SCRIPT
>element, insert a Scheme box, and insert the script using the make-comment
>procedure:
>
>  (make-comment "
>     if (a < b)
>       a = b;")
>
>You can do something similar in plain code without XML boxes:
>
>`(script ([type "text/javascript"])
>   ,(make-comment "
>      if (a < b)
>        a = b;"))
>
>This isn't ideal.  I'll post a separate message about that.
>
>Anton
>

Thank you for all of yours help (Anton & ipconfig). Now I can use script. 

And, waiting for the "separate message about that". 



Posted on the users mailing list.