How to get filter filterddatable from XSL Transformation
I am trying to run a DataTable through an XSL tranform and then return the results to the DataTable. My DataTable looks empty. Any help would be great.
Dim finalExelList As New DataTable
Dim xlsMyList = New XPath.XPathDocument(New StringReader(myList.DataSet.GetXml()))
Dim trans As Xsl.XslCompiledTransform = New Xsl.XslCompiledTransform
trans.Load(RequestHandlerBase.ServerLocation & "xsl\dataisland2DotNet.xsl")
Using ms As MemoryStream = New MemoryStream
trans.Transform(xlsMyList, Nothing, ms)
ms.Position = 0
finalExelList.ReadXml(ms)
End Using
0
source to share
1 answer
Your VB code looks sane, which means the XSL is most likely wrong, you need to debug it first. If you have XMLSpy - use it (it has a pretty decent XSL debugger). If you don't have an XSL debugger, I would suggest creating a simple XSL transformation in fact that will actually return something for sure, and then gradually adding features step by step until it does what you want.
+2
source to share