473,785 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.XmlD ocument
Dim navigator As System.Xml.XPat h.XPathNavigato r
Dim transform As System.Xml.Xsl. XslTransform
..
..
..
navigator = document.Create Navigator()
transform.Trans form(navigator, Nothing, Response.Output Stream)

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

'Public Sub Transform(input As System.Xml.XPat h.XPathNavigato r, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.Strea m)' is
obsolete: 'You should pass XmlResolver to Transform() method'

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

transform.Trans form(New System.Xml.XmlU rlResolver, Nothing,
Response.Output Stream)

And was promptly rewarded with this:

'Public Sub Transform(input As System.Xml.XPat h.IXPathNavigab le, args
As System.Xml.Xsl. XsltArgumentLis t, output As System.IO.Strea m)' 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 1859


Mike Hofer wrote:

Dim document As System.Xml.XmlD ocument
Dim navigator As System.Xml.XPat h.XPathNavigato r
Dim transform As System.Xml.Xsl. XslTransform navigator = document.Create Navigator()
transform.Trans form(navigator, Nothing, Response.Output Stream)

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

'Public Sub Transform(input As System.Xml.XPat h.XPathNavigato r, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.Strea m)' 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/frlrfSystemXmlX slXslTransformC lassTransformTo pic9.asp>

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

transform.Trans form(navigator, Nothing, Response.Output Stream,
xmlResolverGoes Here)
--

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
7354
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 be any advantage in having strcat and strcpy return a pointer to the "end" of the destination string rather than returning a
43
2849
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 (calling tree) browsing that is supported in C++. I don't know how some could write a large scale object-oriented application w/o those. If you have overcome these limitations in C#, please share your thoughts and ideas. Thanks!
2
1307
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, letting the app developers fix their own code over time. It works great in the first solution, but any solution consuming classes defined in an earlier solution does not respond to the attribute at all.
2
4299
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 doing this other than making them available via www which may or may not be accessible (so this is a no go). Bear with me because I've only been using C# for one day so far (today is day 2! wohoo). // begin code snippet
2
2529
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 is the usage of "Custom Attribute" in real life project. Can somebody please help me understand where are these informations really helpful in Development Environment; may be a few example(s) will help me understand.
93
4009
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 so that it will compile in all old and broken compilers, preferably in such a fashion that it can be moved with no effort from the embedded system in the coffe machine to the 64 bit processor in your desktop.
28
2146
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 code will *not* compile: double d=15.95; int n= static_cast<int(d);
169
9219
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 untaking to create a toolchain for it. Way back when, there used to be something called "Small C". I wonder if the creator(s) of that would want to embark on creating a nice little Small C++ compiler devoid of C++ language features that make...
2
1306
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?
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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
7499
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
6739
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();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.