Hi all,
I'm trying to output an xslt into an .aspx page. Here's my code:
However I keep getting the following error message:
System.Xml.Xsl.XslTransformException: Execution of the 'document()' function was prohibited. Use the XsltSettings.EnableDocumentFunction property to enable it.
Does anyone know what this means? If I want to display the XSLT into a portion of my .aspx do I need to add anything else to it? Like a Panel?
Thank you!
I'm trying to output an xslt into an .aspx page. Here's my code:
Code:
StringWriter sw = new StringWriter();
try
{
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(xslPath);
XmlDocument xdoc = new XmlDocument();
xDoc.Load(xmlPath);
xslt.Transform(xDoc, null, sw);
}
catch (Exception excp)
{
Response.Write(excp.ToString());
}
finally
{
sw.Close();
}
However I keep getting the following error message:
System.Xml.Xsl.XslTransformException: Execution of the 'document()' function was prohibited. Use the XsltSettings.EnableDocumentFunction property to enable it.
Does anyone know what this means? If I want to display the XSLT into a portion of my .aspx do I need to add anything else to it? Like a Panel?
Thank you!