472,805 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Strange "Obsolete" message with Transform method

I've got two statements in my code that are both generating weird,
weird, weird messages:

The first one was,

Dim document As System.Xml.XmlDocument
Dim navigator As System.Xml.XPath.XPathNavigator
Dim transform As System.Xml.Xsl.XslTransform
..
..
..
navigator = document.CreateNavigator()
transform.Transform(navigator, Nothing, Response.OutputStream)

which generated the following fascinating compiler warning on the call
to Transform:

'Public Sub Transform(input As System.Xml.XPath.XPathNavigator, args As
System.Xml.Xsl.XsltArgumentList, output As System.IO.Stream)' is
obsolete: 'You should pass XmlResolver to Transform() method'

Really! Well, with that fascinating tidbit in mind, I changed the code
as follows:

transform.Transform(New System.Xml.XmlUrlResolver, Nothing,
Response.OutputStream)

And was promptly rewarded with this:

'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'

The messages are virtually identical. So, the original code, which I am
trying to use to master XMLHTTP for use with .NET 1.1 (for a legacy
app) is apparently "naughty" because it uses obsolete code, and the
recommended code is naughty because it's obsolete as well.

Suggestions?

Now, if you'll excuse me, the ambulence has arrived. I have to go to
the hospital and have my forehead looked at. I think I have a
concussion from slamming my head on the desk.

Mar 14 '06 #1
1 1795


Mike Hofer wrote:

Dim document As System.Xml.XmlDocument
Dim navigator As System.Xml.XPath.XPathNavigator
Dim transform As System.Xml.Xsl.XslTransform navigator = document.CreateNavigator()
transform.Transform(navigator, Nothing, Response.OutputStream)

which generated the following fascinating compiler warning on the call
to Transform:

'Public Sub Transform(input As System.Xml.XPath.XPathNavigator, args As
System.Xml.Xsl.XsltArgumentList, output As System.IO.Stream)' is
obsolete: 'You should pass XmlResolver to Transform() method'


For security reasons there were changes from .NET 1.0 to .NET 1.x which
are documented in the .NET framework documentation, see here
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTransformTopic9. asp>

So you now need an _additional_ parameter, see here
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTransformTopic16 .asp>

transform.Transform(navigator, Nothing, Response.OutputStream,
xmlResolverGoesHere)
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 15 '06 #2

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

Similar topics

81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
43
by: Zeng | last post by:
It's so messy w/o the "friend" relationship. Does anyone know why it was not supported in C#. It's almost about as bad as it doesn't support the inheritance hierarchy and method reference...
2
by: Womble One | last post by:
Is there any way to get the 'Obsolete' attribute to work across multiple solutions? I currently have 70 solutions, each with 3 projects in them, and would like to change some base architecture,...
2
by: Mr Flibble | last post by:
Hi All I've decided to put my stylesheets in a base64 .resource file for deployment and versioning reasons. I dont know if it's a great idea to do this but I couldn't think of another way of...
2
by: prabhupr | last post by:
Hi Folks I was reading this article (http://www.dotnetbips.com/articles/displayarticle.aspx?id=32) on "Custom Attribute", written by Bipin. The only thing I did not understand in this article...
93
by: jacob navia | last post by:
In this group there is a bunch of people that call themselves 'regulars' that insist in something called "portability". Portability for them means the least common denominator. Write your code...
28
by: charlie | last post by:
Hi, I found an article on informit.com that talks about C++ casts http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=285&rl=1 The strange thing is the author says the following...
169
by: JohnQ | last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post). It would be more than a little bit nice if C++ was much "cleaner" (less complex) so that it wasn't a major world wide...
2
by: GB | last post by:
I the Start page of the VS 2005 IDE, I would like to be able to delete obsolete entries in "Recents projects" list, but I dont find any way todo it. Any suggestion?
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.