473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

getting TEXT of an xslt.transform

On my page right now, I call a function:

<%=getMenu()%>

in my codebehind, I have the function do an xslt transformation:

sub
xslt.Transform(doc, xslArg, Response.Output, Nothing)
end sub

Instead of calling the function directly on the main page, I now want to
just place a literal on the page and set the literal's text via codebehind.
However, I can't seem to do this:

ltl_menu.Text = xslt.Transform(doc, xslArg, Response.Output, Nothing)

As the 'expression does not return a value'.

How can one get the result of the text as a string?

-Darrel
Nov 12 '05 #1
2 1222
Hello!
ltl_menu.Text = xslt.Transform(doc, xslArg, Response.Output, Nothing)

As the 'expression does not return a value'.

How can one get the result of the text as a string?


Don't write it to Response.Output but use StringWriter: (untested)

StringWriter sw = new StringWriter();
xslt.Transform( doc, xslArg, sw, null );
ltk_menu.Text = sw.ToString();
There is also an XSLT-WebControl...

--
Pascal Schmitt
Nov 12 '05 #2
Don't write it to Response.Output but use StringWriter: (untested)

StringWriter sw = new StringWriter();
xslt.Transform( doc, xslArg, sw, null );
ltk_menu.Text = sw.ToString();
There is also an XSLT-WebControl...


aha! perfect! Thanks!

-Darrel
Nov 12 '05 #3

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

Similar topics

5
by: Don | last post by:
Hi: I have created an xsd from my xml document. I pop this xsd in the following directory: C:\program files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml. That give me...
4
by: schneider | last post by:
Anyone know if there is a way to dynamicly create a Xslt template/s and use them as an xml transform with-out use files for the Xslt? All the methods I see use files. I want to create a Xslt...
2
by: Buddy Ackerman | last post by:
Apparently .NET strips these white space characters (MSXML doesn't) regardless of what the output method is set to. I'm using <xsl:text> </xsl:text> to output a tab character and...
0
by: Trent USTA | last post by:
I'm having a problem with line feeds in an xslcompiledtransform in .net 2.0. I'm trying to use xsl to transform xml to a text file that can be read on a Unix box. The problem is that when I insert...
3
by: R. P. | last post by:
Subject: XSLT to transform a flat XML file into a structured text file I have an XML file that lists the PDF file segment names and titles of a larger document and looks something like this: ...
1
by: the_dog_gabby | last post by:
Hello, I have a stylesheet that contains C# functions to generate XML. When I apply the stylesheet to my document, everything works perfectly except the data I get back is escaped like so: ...
2
by: Simon Harvey | last post by:
Hi all, I'm having a real problem with getting an XMLWriter as a result of an xsl tranform I'm attempting. My code is: private void btnPerformTransform_Click(object sender, EventArgs e) {...
4
by: stuart.jones | last post by:
Dear all I have a Windows Service that retrieves some data as XML, applies an XSLT to produce a CSV which is saved to the filesystem as a text file. This all works fine. Depending upon the...
1
by: darrel | last post by:
I've been struggling for some time now getting a RSS app to work. I'm creating RSS from existing XML files (transforming via XSLT). The problem is that the page, itself, is still being sent at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.