title: Pass javascript variable to a xsl condition
body: <p>I would like to know if it's possible to include an "external" variable (javascript in my case) in a xsl condition.</p>
  
  <p>In my example, I get a coordinate on a map with some javascript, my xMax var. And I would like to use this xMax var in a "xsl:if" to find all the 'entries' for which the latitude is inferior or equal to xMax.</p>
  
  <p>An excerpt of my script :</p>
  
  <pre><code>var cpt = 0;
  var xMax = map.getBounds().getNorthEast().lat();
  
  &lt;xsl:for-each select="entries/entry"&gt;
     &lt;xsl:if test="latitude &amp;lt;= xMax"&gt;
          cpt++;
      &lt;/xsl:if&gt;
  &lt;/xsl:for-each&gt;
  alert(cpt);
  </code></pre>
  
  <p>I found the "msxsl:script" element, and i tried this :</p>
  
  <pre><code>&lt;msxsl:script language="JScript" implements-prefix="user"&gt;
      function getXMax(){
          var xMax = map.getBounds().getNorthEast().lat();
          return xMax;
      }
  &lt;/msxsl:script&gt;
  </code></pre>
  
  <p>and called it with :</p>
  
  <pre><code>&lt;xsl:value-of select='user:getXMax(.)'/&gt;
  </code></pre>
  
  <p>But it doesnt seems to work.
  (I have also included</p>
  
  <pre><code>xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  xmlns:user="http://localhost:8080/Projet/map"
  </code></pre>
  
  <p>in the xsl:stylesheet)</p>
  
  <p>If someone know how to pass my js var into the condition or how to parse a js var to a xslt var,
  thank for any help !</p>