Overload resolution failed because no accessible 'Transform'....

G

Guest

I am trying to create an XSLT Transform but keep getting the same problem.

Overload resolution failed because no accessible 'Transform' can be called
with these arguments.

I create a reference to System.Xml.dll

Here is the code
Imports System.Xml
Imports System.Xml.Xsl.XslTransform

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xslt As New System.Xml.Xsl.XslTransform()
xslt.Load("transform.xslt")
** xslt.Transform("input.xml", "output.htm", Nothing)
End Sub
End Class

The line with double asterisks is where the problem resides.


Alternatively, I have tried this:

Dim myXslTransform As Xml.Xsl.XslTransform = New Xml.Xsl.XslTransform()
Dim myResolver = New XmlUrlResolver()
myResolver.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim destFileName As String = "ShowIt.html"
myXslTransform.Load("WXDisplayThatPuppy.xslt")

**myXslTransform.Transform("OneWXClientMultiPrescriptions.xml",
destFileName,myResolver)
System.Diagnostics.Process.Start(destFileName)

Again, it seems the Transform methos is where the problem stems from.

Anyone have any idea?
 
H

Herfried K. Wagner [MVP]

steve said:
Overload resolution failed because no accessible 'Transform'
can be called with these arguments.
[...]
** xslt.Transform("input.xml", "output.htm", Nothing)
[...9
**myXslTransform.Transform("OneWXClientMultiPrescriptions.xml",
destFileName,myResolver)

There is no overload of the 'Transform' method that accepts three
parameters, where the first two parameters are of type 'String'. Take a
look at the overloads list for available overloads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top