Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: asp.net xslt transformation


Message #1 by "sundar srinivasan" <ssrinivasan3@n...> on Fri, 20 Sep 2002 21:18:42
Hello,

In my asp.net page I have an xml string returned by a function. I then
transform it with an xsl residing on disk. My code is:

<div id="LeftDiv">
  <%

        Dim ascEnc As New text.asciiEncoding()
        Dim byteXml As Byte()
        byteXml = ascEnc.GetBytes(XMLRights) 'This is the xml string
        Dim streamXML As New IO.MemoryStream(byteXml)
        streamXML.Position = 0
        Dim doc As XPathDocument = New XPathDocument(streamXML)

        Dim readerXSL As New System.Xml.XmlTextReader
("c:/inetpub/wwwroot/dotnettest/stylesheet/csrmenu.xsl")

        Dim xslt As New System.Xml.Xsl.XslTransform()
        xslt.Load(readerXSL)

        Dim writer As XmlTextWriter = New XmlTextWriter(Console.Out)
        xslt.Transform(doc, Nothing, writer)
	%>		
      </div>

I get no output, but the client-side msxml3.0 transformation works fine.
What's wrong?

Thanks.

Sundar

  Return to Index