0
如何在Asp.net/VB中啓用xsltSettingf EnableDocumentFunction以便在XSLT中使用document()?EnableDocumentFunction Asp.net XSLT XML
Public Shared Function xmlGetter(ByVal strXSLTFile As String, ByVal strXMLFile As String) As String
Dim reader As XmlReader = XmlReader.Create(strXMLFile)
Dim objXSLTransform As New XslCompiledTransform()
Dim xsltSettings As New XsltSettings()
xsltSettings.EnableDocumentFunction = True
objXSLTransform.Load(strXSLTFile)
Dim htmlOutput As New StringBuilder()
Dim htmlWriter As TextWriter = New StringWriter(htmlOutput)
objXSLTransform.Transform(reader, Nothing, htmlWriter)
Dim s As String
s = htmlOutput.ToString()
Return s
reader.Close()
End Function
昏暗XSLT作爲新XslCompiledTransform() 暗淡設置作爲新XsltSettings() settings.EnableDocumentFunction =真 xslt.Load( 「style.xslt」,設定新XmlUrlResolver()) – user168507 2011-06-16 11:54:30