title: Pass parameter to XSLT stylesheet
body: <p>I'm trying to pass a couple of parameters to an XSLT style sheet. I have followed the example: <a href="https://stackoverflow.com/questions/1521064/passing-parameters-to-xslt-stylesheet-via-net">Passing parameters to XSLT Stylesheet via .NET</a>.</p>
  
  <p>But my transformed page is not correctly displaying the value.</p>
  
  <p>Here is my C# code. I had to add a custom function to perform some arithmetic because Visual Studio 2010 doesn't use XSLT 2.0.</p>
  
  <pre><code>  var args = new XsltArgumentList();
    args.AddExtensionObject("urn:XslFunctionExtensions", new XslFunctionExtensions());
    args.AddParam("processingId", string.Empty, processingId);
  
    var myXPathDoc = new XPathDocument(claimDataStream);
    var xslCompiledTransformation = new XslCompiledTransform(true);
  
    // XSLT File
    xslCompiledTransformation.Load(xmlReader);
  
    // HTML File
    using (var xmlTextWriter = new XmlTextWriter(outputFile, null))
    {
        xslCompiledTransformation.Transform(myXPathDoc, args, xmlTextWriter);
    }
  </code></pre>
  
  <p>Here is my XSLT:</p>
  
  <pre><code>    &lt;xsl:template match="/"&gt;
      &lt;xsl:param name="processingId"&gt;&lt;/xsl:param&gt;
      ..HTML..
      &lt;xsl:value-of select="$processingId"/&gt;
  </code></pre>
  
  <p>Am I missing something?</p>