[plt-scheme] SXML and JavaScript

From: Arend P. van der Veen (apvanderveen at att.net)
Date: Mon Aug 29 10:17:41 EDT 2005

Hi,

I am trying to use SXML with some javascript code.  The problem that I 
having is that the <, > ect in javascript are being escape sequenced. 
For example,

(html
   (head
     (title ,(alist-get 'title properties))
     (script (@ (language "Javascript")(type "text/javascript"))
"
function isblank(s) {
   if (s = null) || (s = \"\")
     return true;
   else {
     for (var i=0;i<s.length'i++) {
       var c = s.charAt(i);
       if ((c ~= ' ') && (c != '\n') && (c != '')) return false;
     }
   }
   return true;
}
"
)))

becomes:

<html><head><title>Test</title>
<script language="Javascript" type="text/javascript">
function isblank(s) {
   if (s = null) || (s = &quot;&quot;)
     return true;
   else {
     for (var i=0;i&lt;s.length'i++) {
       var c = s.charAt(i);
       if ((c ~= ' ') &amp;&amp; (c != '
') &amp;&amp; (c != '')) return false;
     }
   }
   return true;
}
</script></head></html>

Any help in how to support this would be great.

Thanks,
Arend




Posted on the users mailing list.