All I want to do is execute a simple transformation in VB.net.... I know
this has to be simple.
I tried the following as suggested by a web page I found....
Dim xslt as New XslTransform()
xslt.Load("Filename")
xslt.Transform("InFile", "ResultFile")
This appears to be very straightforward to me.
However, this causes an error saying the code is obsolete... (I thought the
whole Framework version concept meant backwards compatability, but I guess
not.) it further says "You should pass XmlResolver to Transform() method"
Can anyone tell me how / where / why to add the XmlResolver ?
Thanks ! 3 5067
Rob wrote:
All I want to do is execute a simple transformation in VB.net.... I know
this has to be simple.
I tried the following as suggested by a web page I found....
Dim xslt as New XslTransform()
xslt.Load("Filename")
xslt.Transform("InFile", "ResultFile")
This appears to be very straightforward to me.
However, this causes an error saying the code is obsolete... (I thought the
whole Framework version concept meant backwards compatability, but I guess
not.) it further says "You should pass XmlResolver to Transform() method"
Can anyone tell me how / where / why to add the XmlResolver ?
The method overload you use (Transform(String, String)) is obsolete in
..NET 1.x. For security reasons you should use the overload
Transform(String, String, XmlResolver)
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTransformTopic8. asp>
that allows you to pass in a third argument, an XmlResolver, to have the
XSLT document function enabled, or Nothing, to have the XSLT document
function disabled. So the overload with two arguments has been obsoleted
in .NET 1.x to allow for better control by your code whether the XSLT
stylesheet is allowd to use the XSLT document function or not.
So use e.g.
xslt.Transform("InFile", "ResultFile", New XmlUrlResolver())
to allow the stylesheet to use the XSLT document function or use
xslt.Transform("InFile", "ResultFile", Nothing)
to disallow it.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
Thanks Martin...
"Martin Honnen" <ma*******@yahoo.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Rob wrote:
>All I want to do is execute a simple transformation in VB.net.... I know this has to be simple.
I tried the following as suggested by a web page I found....
Dim xslt as New XslTransform()
xslt.Load("Filename") xslt.Transform("InFile", "ResultFile")
This appears to be very straightforward to me.
However, this causes an error saying the code is obsolete... (I thought the whole Framework version concept meant backwards compatability, but I guess not.) it further says "You should pass XmlResolver to Transform() method"
Can anyone tell me how / where / why to add the XmlResolver ?
The method overload you use (Transform(String, String)) is obsolete in
.NET 1.x. For security reasons you should use the overload
Transform(String, String, XmlResolver)
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTransformTopic8. asp>
that allows you to pass in a third argument, an XmlResolver, to have the
XSLT document function enabled, or Nothing, to have the XSLT document
function disabled. So the overload with two arguments has been obsoleted
in .NET 1.x to allow for better control by your code whether the XSLT
stylesheet is allowd to use the XSLT document function or not.
So use e.g.
xslt.Transform("InFile", "ResultFile", New XmlUrlResolver())
to allow the stylesheet to use the XSLT document function or use
xslt.Transform("InFile", "ResultFile", Nothing)
to disallow it.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
Martin Honnen wrote:
The method overload you use (Transform(String, String)) is obsolete in
.NET 1.x.
Should be "is obsolete in .NET 1.1".
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: beliavsky |
last post by:
Many of my C++ programs have the line
using namespace std;
but the "Accelerated C++" book of Koenig and Moo has many examples
where the library names are included one at a time, for example
using std::cin;
using std::cout;
|
by: Enos Meroka |
last post by:
Hallo,
I am a student doing my project in the university.. I have been trying
to compile the program using HP -UX aCC compiler, however I keep on
getting the following errors.
=================================================================
Error 19: "CORBAManagerMessages.h", line 4 # Unexpected 'std'.
using std::string;
^^^
|
by: Calum Grant |
last post by:
In older C++ computer books, you'll often see
using namespace std;
even in my 1996 copy of Stroustrup. Nowadays, it seems to be considered
better to qualify names to make it clearer what symbol you are using.
Are there any articles that support this viewpoint? Is "using
namespace" definitively wrong, or just a matter of style?
How...
|
by: canasdaq |
last post by:
Can anyone please help me. I was looking at the article "http://www.eggheadcafe.com/articles/20030603.asp". I am new to .net and know nothing in c#. I want to write a menu in asp.net. Can anyone please help me in converting this c# code to vb.net. I tried, but it is not giving the output. Here is the c# code
using System
using...
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on where the job is
running, the job runs sucessfully, PDF files got generated, everything
is good. If I scheduled the job to run at the time that I am...
| |
by: John Spiegel |
last post by:
Hi All,
I've been working on building a .dll in C# (framework 1.1) and using it in
VFP8. As always, the example that runs so smoothly in the article fails at
a rather basic point in practice. When attempting to create the object,
After building a dll, I used RegAsm.exe to register and received "Types
registered successfully" message. ...
|
by: acb |
last post by:
Hi,
I wrote a DLL Component (using Visual Studio 2005) and managed to
include it into a C# Console application.
I am now trying to include this component into a Web project. I copy
the DLL into the bin directory but am not able to progress. Can anyone
please guide me to an online tutorial on the subject.
Thanks,
|
by: Eugene Anthony |
last post by:
The problem with my coding is that despite removing the records stored
in the array list, the rptPages repeater
control is still visible. The rptPages repeater control displayes the
navigation link (1,2,3 so on). The code can be found in
SubscriptionCart.aspx.cs.
Default.aspx
------------
|
by: JDeats |
last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting
and decrypting a file.
http://support.microsoft.com/kb/307010
In .NET 2.0 this approach is not fully supported (a .NET 2.0 build
with these methods, will appear to encrypt and decrypt, but the
resulting decrypted file will be corrupted. I tried encrypting a .bmp
file and...
|
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= |
last post by:
Hi there
I've successfully added some .NET validation controls to a page (using
<asp:RequiredFieldValidator ...), however when I try to set the 'display'
property to 'dynamic', my page then throws up the following error in the
browser:
CS1061: 'System.Web.UI.WebControls.TextBox' does not contain a definition
for 'Web' and no extension...
|
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...
| |
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. ...
|
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...
|
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |