473,379 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

You should pass XmlResolver to Transform() method

Hi,
I'm trying to test the vb.net-exercise "How to use a DataSet with the Office
XP Chart Component and ASP.NET" on
http://support.microsoft.com/kb/303016/en-us

Visual Studio rails against the expression:
"xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As
System.Xml.Xsl.XsltArgumentList, output As System.IO.TextWriter)" is
obsolete: "you should pass XmlResolver to Transform() method"

Sorry, but that's an untasted field for me. Please tell me, what to do.
Thanks!
Rouven
Nov 12 '05 #1
3 2366
Rouven Hertenstein wrote:
I'm trying to test the vb.net-exercise "How to use a DataSet with the Office
XP Chart Component and ASP.NET" on
http://support.microsoft.com/kb/303016/en-us

Visual Studio rails against the expression:
"xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As
System.Xml.Xsl.XsltArgumentList, output As System.IO.TextWriter)" is
obsolete: "you should pass XmlResolver to Transform() method"

Sorry, but that's an untasted field for me. Please tell me, what to do.


Those are .NET 1.1 chages. Pass new XmlUrlResolver() as a fourth argument.

--
Oleg Tkachenko [XML MVP, MCAD]
http://blog.tkachenko.com
Nov 12 '05 #2
Thank you for the answer. But, I got this theoretical information already on
myself. So, I have just no idea to execute it to this example:

Imports System.Web
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Data
Imports System.Data.SqlClient

Public Class MakeData
Implements IHttpHandler

Public ReadOnly Property IsReusable() As Boolean _
Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property

Public Sub ProcessRequest(ByVal context As HttpContext) _
Implements IHttpHandler.ProcessRequest
Dim sConn As String = "User ID=sa;Password=;Initial
Catalog=Northwind;Data Source=ibf-server;"
Dim sSQL As String = _
"SELECT LastName, Sum([UnitPrice]*[Quantity]*(1-[Discount])) AS
OrderTotal " & _
"FROM Employees INNER JOIN (Orders INNER JOIN [Order Details] ON
" & _
"Orders.OrderID = [Order Details].OrderID) ON
Employees.EmployeeID = " & _
"Orders.EmployeeID GROUP BY LastName"

'Connect to the data source.
Dim nwindConn As SqlConnection = New SqlConnection(sConn)
nwindConn.Open()

'Build a dataSet for Employee Sales.
Dim ds As DataSet
ds = New DataSet("MyDataset")
Dim da As SqlDataAdapter = New SqlDataAdapter(sSQL, nwindConn)
da.Fill(ds)

'Transform the dataSet using the stylesheet.
Dim xmlDoc_ds As XmlDataDocument = New XmlDataDocument(ds)
Dim xslTran As XslTransform = New XslTransform
xslTran.Load(context.Server.MapPath("Rowset.xslt") )

'Return the persisted recordset.
context.Response.ContentType = "text/xml"
context.Response.Charset = ""
xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)
End Sub

End Class

"Oleg Tkachenko [MVP]" wrote:
Rouven Hertenstein wrote:
I'm trying to test the vb.net-exercise "How to use a DataSet with the Office
XP Chart Component and ASP.NET" on
http://support.microsoft.com/kb/303016/en-us

Visual Studio rails against the expression:
"xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As
System.Xml.Xsl.XsltArgumentList, output As System.IO.TextWriter)" is
obsolete: "you should pass XmlResolver to Transform() method"

Sorry, but that's an untasted field for me. Please tell me, what to do.


Those are .NET 1.1 chages. Pass new XmlUrlResolver() as a fourth argument.

--
Oleg Tkachenko [XML MVP, MCAD]
http://blog.tkachenko.com

Nov 12 '05 #3
Rouven Hertenstein wrote:
Thank you for the answer. But, I got this theoretical information already on
myself. So, I have just no idea to execute it to this example: 'Transform the dataSet using the stylesheet.
Dim xmlDoc_ds As XmlDataDocument = New XmlDataDocument(ds)
Dim xslTran As XslTransform = New XslTransform
Dim xmlResolver As XmlResolver = New XmlUrlResolver()
xslTran.Load(context.Server.MapPath("Rowset.xslt") )

'Return the persisted recordset.
context.Response.ContentType = "text/xml"
context.Response.Charset = ""
xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)


xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output, xmlResolver)

--
Oleg Tkachenko [XML MVP, MCAD]
http://blog.tkachenko.com
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Collin VanDyck | last post by:
I have a basic understanding of this, so forgive me if I am overly simplistic in my explanation of my problem.. I am trying to get a Java/Xalan transform to pass through a numeric character...
8
by: Ekim | last post by:
my question is as follows: I've got a DLL in which I have a method GetBuffer (this one is extern, exported, is called from outside this program) which shall pass a char-buffer to the...
2
by: Showjumper | last post by:
I've got the following code. But the XSLTransform line is underlined by the blue squiggle and vs tells me c:\inetpub\wwwroot\Sites\RiderDesign\articles\test.aspx.vb(37): 'Public Sub...
4
by: Erwin Gabler | last post by:
Trying to validate a document with a reference to a DTD ("PUBLIC" identifier): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE systems-description PUBLIC "-//foo/nono" ""> .... The DTD uses...
2
by: Paul | last post by:
Hi I'm currently having a problem with XMLResolvers. To put it simply using the same stylesheet and the same xml I am getting different results. When using the code and style sheet below. I...
4
by: damien morton | last post by:
Hi, I need some help... Im trying to use XmlValidatingParser with a custom XmlResolver. Im finding, however, that the custom resolver never gets called, and that the XmlValidatingParser acts as...
2
by: Bennett Smith | last post by:
Could anyone within Microsoft comment on the status of the XmlResolver class in upcoming versions of the .NET framework? I am particularly interested in hearing about any improvements in how...
1
by: Keith Chadwick | last post by:
Have been doing a fair amount of reading but at this point no joy. The scenario is - XSL template is stored within db. - Template has a xsl:include statement as <xsl:include...
1
by: Tony Fabian | last post by:
Hi, the code below produces the following warning: 'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList)' is obsolete: 'You should pass...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.