[xsl] Get Variables in XSL from URL

Subject: [xsl] Get Variables in XSL from URL
From: "miouge@xxxxxxxxxxx" <miouge@xxxxxxxxxxx>
Date: Fri, 28 Apr 2006 21:53:56 +0200
I would like to get some variables from the URL (file.xml?var1=value1&var2=value2) in the test.xml's xsl file (all of this in the client-side) and so have try this code:
<msxsl:script language="javascript" implements-prefix="prefix">
function getURLvar(name){
  var params = location.search.substring(1).split("&");
  var variables = new Array();
    for (i in params) {
      var segments_var = params[i].split("=");
      variables[segments_var[0]] = unescape(segments_var[1]);
  function setFile(file) {
    iSend = send;
return variables[name];

and use this one to print on screen the value of the GET variables....

  <xsl:value-of select="prefix:getURLvar(test)" />

But it seems not to be a good Method... and i ask if their is a better solution to achieve my goal.

Thanks, and sorry for my bad english.

Maxime G.

Current Thread