I am new to C#-XSLT, I am trying to pass a List to the XSLT file. Someone help me with the below questions. C#:
var Listresponse= Reference.OracleMethod(Parameter);
var settings = new XsltSettings();
settings.EnableScript = true;
// Create the XslCompiledTransform and load the style sheet.
XslCompiledTransform xslTransform = new XslCompiledTransform(true);
xslTransform.Load("xslfile.xsl", settings, null);
// Create an XmlWriter to write the output.
XmlWriter writer = XmlWriter.Create("xmlfile.xml");
// Transform the file.
xslTransform.Transform(new XPathDocument("output.xml"), argsList, writer);
writer.Close();
C# Question 1: How to pass the C# "Listresponse"(List) to the XSLT file.
XSLT:
XSLT Question 2: What is the URL which needs to specify on the XSLT file for C# Listresponse?
for instance, I have specified the oracle URL here. I need the same for C#. Please help.
Sample XSLT file with Oracle Package/SP:
<?xml version="1.0" encoding="UTF-16"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:test="http://Microsoft.LobServices.OracleDB/2007/03/DB/Package/Package_Name"
xmlns:test1="http://Microsoft.LobServices.OracleDB/2007/03/DB/Package/Package_Name_StoredProcedure_Name"><xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/test:ProcedureResponse" />
</xsl:template>
<xsl:template match="/test:ProcedureResponse">
</xsl:stylesheet>