Strange "Obsolete" message with Transform method - XML SOAP

This is a discussion on Strange "Obsolete" message with Transform method - XML SOAP ; 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) ...

+ Reply to Thread
Results 1 to 2 of 2

Strange "Obsolete" message with Transform method

  1. Default 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.


  2. Default Re: Strange "Obsolete" message with Transform method



    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/

+ Reply to Thread

Similar Threads

  1. Strange "Out of RAM" message when I open AI file in Photoshop
    By Application Development in forum Adobe illustrator
    Replies: 2
    Last Post: 08-24-2007, 08:46 AM
  2. Replies: 1
    Last Post: 06-03-2005, 08:39 AM
  3. Replies: 0
    Last Post: 06-02-2005, 04:01 AM
  4. Replies: 0
    Last Post: 04-26-2005, 07:41 PM
  5. Strange "Undeliverable" message when accessing Exchange over VPN
    By Application Development in forum Microsoft Exchange
    Replies: 0
    Last Post: 04-19-2004, 04:04 PM