+2  A: 

You need to define a parameter in your stylesheet and then use that parameter. Here is a simple example, the stylesheet looks as follows:

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:docs="http://example.com/2010/docs"
  exclude-result-prefixes="docs"
>
  <xsl:param name="docs:doc1" select="/.."/>

  <xsl:template match="/">
    <xsl:apply-templates select="$docs:doc1/node()"/>
  </xsl:template>

  <xsl:template match="root">
    <ul>
      <xsl:apply-templates/>
    </ul>
  </xsl:template>

  <xsl:template match="foo">
    <li>
      <xsl:apply-templates/>
    </li>
  </xsl:template>
</xsl:stylesheet>

The C# code looks as follows:

    string xml = "<root><foo>1</foo><foo>2</foo></root>";
    XPathDocument doc = new XPathDocument(new StringReader(xml));

    XslCompiledTransform proc = new XslCompiledTransform();
    proc.Load(@"..\..\XSLTFile1.xslt");

    XsltArgumentList xsltArgs = new XsltArgumentList();
    xsltArgs.AddParam("doc1", "http://example.com/2010/docs", doc.CreateNavigator());

    proc.Transform(XmlReader.Create(new StringReader("<dummy/>")), xsltArgs, Console.Out);

This is a console application which for simplicity writes to Console.Out but you can of course use other outputs the Transform method allows.

That example then writes <ul><li>1</li><li>2</li></ul> so the input parameter has been processed.

So that should show you how to pass in a parameter that XslCompiledTransform sees as a node-set you can process with XSLT.

As for writing a stylesheet that merges two documents, please post two input samples and the corresponding result sample you want to create if you have problems writing that XSLT.

Martin Honnen
Martin,Thank you for your assistance. Your example worked perfectly. I'm having some difficulty getting my code to work as well as yours, but I'm sure its just a matter of figuring out how to apply your techniques to my code.
GunnerL3510
Martin, I was able to massage your example to work with my xml, I needed to add the namespace to the elements, but I did get it to work. Thanks again.
GunnerL3510