title: How do I get a less than in a javascript for loop in XSL to work?
body: <p>I am using CDATA to escape the script but in IE8's debugger I still get this message: "Expected ')'" in the for loop conditions. I am assuming it still thinks that the ; in the <code>&amp;lt;</code> generated by CDATA is ending the loop conditions.</p>
  
  <p>Original script in my XSL template:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;  
  &lt;![CDATA[
      function submitform(form){
          var oErrorArray = new Array();
          for (i=0;i&lt;form.length;i++) 
          eval("oErrorArray["+i+"]=oError"+i);
          var goForm = true;
          for(i=0;i&lt;form.length;i++) {
              oErrorArray[i].innerHTML = "";
              if(form[i].value="")){
                  oErrorArray[i].innerHTML = "Error - input field is blank";
                  goForm = false;
              }           
          }
          if(goForm == true) form.submit();
      }
      function resetform(form){
          form.reset();
      }
  ]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Code generated after transformation <em>(from IE8 debugger)</em>:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
      function submitform(form){
          var oErrorArray = new Array();
          for (i=0;i&amp;lt;form.length;i++) 
          eval("oErrorArray["+i+"]=oError"+i);
          goForm = true;
          for(i=0;i&amp;lt;form.length;i++) {
              oErrorArray[i].innerHTML = "";
              if(form[i].value="")){
                  oErrorArray[i].innerHTML = "Error - input field is blank";
                  goForm = false;
              }           
          }
          if(goForm == true) form.submit();
      }
      function resetform(form){
          form.reset();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Error reported by IE8 debugger: <strong>Expected ')'  login.xml, line 29 character 30</strong> <em>(which is right after the first "form.length")</em></p>