473,614 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Transf orm(xmlDoc_ds, Nothing, context.Respons e.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPat h.IXPathNavigab le, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.TextW riter)" 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 2378
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.Transf orm(xmlDoc_ds, Nothing, context.Respons e.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPat h.IXPathNavigab le, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.TextW riter)" 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.Sql Client

Public Class MakeData
Implements IHttpHandler

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

Public Sub ProcessRequest( ByVal context As HttpContext) _
Implements IHttpHandler.Pr ocessRequest
Dim sConn As String = "User ID=sa;Password= ;Initial
Catalog=Northwi nd;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.Ord erID = [Order Details].OrderID) ON
Employees.Emplo yeeID = " & _
"Orders.Employe eID GROUP BY LastName"

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

'Build a dataSet for Employee Sales.
Dim ds As DataSet
ds = New DataSet("MyData set")
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(co ntext.Server.Ma pPath("Rowset.x slt"))

'Return the persisted recordset.
context.Respons e.ContentType = "text/xml"
context.Respons e.Charset = ""
xslTran.Transfo rm(xmlDoc_ds, Nothing, context.Respons e.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.Transf orm(xmlDoc_ds, Nothing, context.Respons e.Output)"

and comments:
"Public Sub Transform(input As System.Xml.XPat h.IXPathNavigab le, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.TextW riter)" 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(co ntext.Server.Ma pPath("Rowset.x slt"))

'Return the persisted recordset.
context.Respons e.ContentType = "text/xml"
context.Respons e.Charset = ""
xslTran.Transfo rm(xmlDoc_ds, Nothing, context.Respons e.Output)


xslTran.Transfo rm(xmlDoc_ds, Nothing, context.Respons e.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
8548
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 reference (i.e.  ) and it seems to be converting the character to its UNICODE representation. Take this source XML document: <?xml version="1.0" encoding="UTF-8"?>
8
6173
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 calling-function for further handling. If I've confused you, here's the code snippet (it's within a simple Win32-Dll-project): char* buffer; // global buffer - this one points to my buffer (for puttiing it simple in here I assume memory is already...
2
8793
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 Transform(input As System.Xml.XPath.IXPathNavigable, args As System.Xml.Xsl.XsltArgumentList, output As System.IO.Stream)' is obsolete: 'You should pass XmlResolver to Transform() method' What the heck does this mean? Thanks... Dim XMLDoc As New XmlDocument
4
5319
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 some kind of parameter entity with a reference to an entity file:
2
1627
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 get the following. The first file I create, using the obsolete method, creates the text1.txt file correctly. It creates a file with just a single < in it.
4
3977
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 a non-validating parser I created a custom resolver called XmlBreakingResolver, whos GetEntity and ResolveUri methods have breakpoints set in them along with Debug.Assert(false). The breakpoints are never reached, and the the Asserts never...
2
1587
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 PUBLIC and SYSTEM entity references are handled. My hope is that improvements have been made that would finally allow one to build an XmlResolver that provides XML Catalog capabilities as described in the OASIS-OPEN XML Catalogs Working Draft. ...
1
1677
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 href="inc.template.methods.xsl"/> I now I have to pass a resolver when I use the load method so that it understands the xsl include as in:
1
2255
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 XmlResolver to Transform() method' Anyone know how to do that?
0
8182
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8130
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8279
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7093
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5540
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1425
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.