I've been looking at other questions but I can't quite see what I'm doing wrong.
I want to pass a parameter to select certain results only, but I'm having problems with the parameter. 

The html (disregard the IE part)

```
<html>
<head>
<script>
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}

function displayResult()
{
xml=loadXMLDoc("f.xml");
xsl=loadXMLDoc("xsl.xsl");
// code for IE
if (window.ActiveXObject)
  {
  ex=xml.transformNode(xsl);
  document.getElementById("example").innerHTML=ex;
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
  {
  xsltProcessor=new XSLTProcessor();
  xsltProcessor.importStylesheet(xsl);

  xsltProcessor.setParameter(null, "testParam", "voo");
  // alert(xsltProcessor.getParameter(null,"voc"));

  document.getElementById("example").innerHTML = "";

  resultDocument = xsltProcessor.transformToFragment(xml,document);
  document.getElementById("example").appendChild(resultDocument);
  }

}

</script>
</head>
<body onload="displayResult()">
    <li><u><a onclick="displayResult();" style="cursor: pointer;">test1</a></u></li>
<div id="example" />
</body>
</html>

```

The xml

```
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="vocaroos.xsl"?>
<test>
    <artist name="Bert">
        <voo>bert1</voo>
    </artist>
    <artist name="Pet">
        <voo>pet1</voo>
    </artist>
</test>

```

xsl

```
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="testParam"/>
<xsl:template match="/">
  <html>
  <body >
  <h2>Titleee</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th>Teeeeeest</th>
    </tr>
    <xsl:for-each select="test/artist">
    <tr>
      <td><xsl:value-of select="$testParam"/></td>
    </tr>
    </xsl:for-each>
  </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet> 

```

Here is the outcome (left)

![outcome](https://i.stack.imgur.com/bIwC0.jpg)

On the left is what this does and on the right, what I actually want. I was expecting that 

```
<xsl:value-of select="$testParam"/>

```

would do the same as

```
<xsl:value-of select="voo"/>     (right outcome)

```

since I do setParameter(null, "testParam", "voo"); in the html, but for some reason the xsl doesn't use "voo" as select, but instead writes "voo".

I've been trying different things but nothing works. Where's the mistake?