I am in a fix here where I have to pass the dynamically created xml in C# code to be passed to xslt as param and then get the values from it.
following is the sample xslt
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
version="1.0">
<xsl:param name="Keys"></xsl:param>
<xsl:template match="/">
<MyKey>MYNODE</MyKey>
<xsl:value-of select="msxsl:node-set($Keys)/Keys/Item/Header"/>
</xsl:template>
</xsl:stylesheet>
Then from the code in C# I call Transform method
XslCompiledTransform proc = new XslCompiledTransform();
proc.Load("sheet.xslt");
XsltArgumentList xsltArgs = new XsltArgumentList();
XmlDocument doc1 = new XmlDocument();
// populate as needed e.g.
doc1.LoadXml("<Keys><Item><Header>fooHeader</Header></Item></Keys>");
xsltArgs.AddParam("Keys", "", doc1.InnerXml.ToString());
// pass xsltArgs as second argument to Transform method
proc.Transform(someInput, xsltArgs, someOutput);
Here I am not able to get the value for MYNODE in results Thanks