Hello,
I am trying to generate a PDF from xml + xsl stylesheet. I copied an example from your website. I am receving the following error:
Execution of the 'document()' function was prohibited. Use the XsltSettings.EnableDocumentFunction property to enable it. An error occurred at (1,2414)
Attached are the source document DCJS_msg_extract.xml and the stylesheet merged-nysrap.xsl(I was required to zip it by your system).
Below is the code:
Dim
pdf AsNew Aspose.Pdf.Generator.Pdf'Create XMLDcoument object for XML file
Dim SourceXML As System.Xml.XmlDocument = New System.Xml.XmlDocument()
Dim
fs As FileStream = New FileStream("c:\DCJS_msg_extract.xml", FileMode.Open)'load the contents of FileStream object into SrourceXML object
SourceXML.Load(fs)
'Create XMLDcoument object for XSL file
Dim SourceXSL As System.Xml.XmlDocument = New System.Xml.XmlDocument()'read the contents of XSL file into FileStream objectDim XSL_FileStream As FileStream = New FileStream("C:\styleRepository\styleRepository\RapGen\merged-nysrap.xsl", FileMode.Open)'load the contents of FileStream object into SrourceXSL object
SourceXSL.Load(XSL_FileStream)
'call the BindFO method with two arguments (XML,XSL)
pdf.BindFO(SourceXML, SourceXSL)
'Write PDF File
pdf.Save(
"c:\testout.pdf")