By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,606 Members | 3,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,606 IT Pros & Developers. It's quick & easy.

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

P: n/a
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("OneWXClientMultiPrescr iptions.xml",
destFileName,myResolver)
System.Diagnostics.Process.Start(destFileName)

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

Anyone have any idea?
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"steve" <st***@discussions.microsoft.com> schrieb:
Overload resolution failed because no accessible 'Transform'
can be called with these arguments.
[...]
** xslt.Transform("input.xml", "output.htm", Nothing)
[...9
**myXslTransform.Transform("OneWXClientMultiPrescr iptions.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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.