473,623 Members | 3,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get underlying Xslt content from XslTransform object

How do you get the underlying Xslt stylesheet content from an XslTransform object that has been created and loaded with a stylesheet file or some text?

Assume a method will create an XslTransform object, load it with a stylesheet file or some text, and return this object.

public XslTransform Create()
{
XslTransform xslt = new XslTransform();
xslt.Load("styl e.xsl"); //or load with some built-in stylesheet text
return xslt;
}

In the calling method, how do you see the content of the underlying transform (the content of the file style.xsl or whatever text that was loaded to the object) from the object xslt itself?

Assume the file style.xsl is unavailable to you, or the method Create() is actually in a libray with no source code, or xslt was loaded with not file, but built-in text.

Note this is before the xslt object is going to do any transformation on any Xml. I just want to know what this transformation is going to do.

Please help.
Thanks

--------------------------------
From: shell shell

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>TkDyYJU8kkC gwU4iX2sYKg==</Id>
Nov 12 '05 #1
1 1128
shell shell via .NET 247 wrote:
How do you get the underlying Xslt stylesheet content from an XslTransform object that has been created and loaded with a stylesheet file or some text?


If the stylesheet document is still avilable, you can get it using
<xsl:copy-of select="documen t('')"/>
Otherwise you cannot. Loaded XslTransform represens compiled stylesheet
and while internally source XSLT is stored, it's not accessible (other
than using reflection probably).

--
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

0
380
by: Jay Allard | last post by:
Hello I posted this in the vb.net group on the 2/25/2004, but didn't get any response. Here's attempt 2. Does anyone know of a more appropriate place to post this? One new piece of information: It fails on any method that it happens to hit first. I juggled the methods a bit, and it just doesn't matter. As soon as the XslTransform hits an extension function, it fails with an invalid argument exception.
7
8097
by: mike p. | last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl stylesheets to do xhtml transform. Transform works fine when using MSXML. When I try to do the following using asp.net 1.1: private void Page_Load(object sender, System.EventArgs e) { // load content XslTransform trans = new XslTransform();
0
2340
by: Christopher M. Lauer | last post by:
I have done my best to answer this question but can not find the proper set of commands. I would like to transform an xml file (in code behind) and display its output in a specific html tag, such as a div with a runat=server. I can somewhat do this if I create a server control and include the control within the html div tag but this method (borrowed from ASP.NET Website Programming by Wrox press thanks guys) does not give me the full...
3
1767
by: Paul Hatcher | last post by:
Hi Is it possible to control the node style that XslTransform uses to output XML? I'm trying to convert a file from XML to RDF and if I do the transform in XmlSpy I get the following <mySchema rdf:resource='fred' />
4
4817
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 transform via code? Any examples would be great.
2
1640
by: Pawel | last post by:
I have small problem with XslTransformation. I get from WebService xml document. I have xslt and I want transform xml document to html code. It's look easy but I cant't manage with xPath. Maybe someone help me with that. I have problems with xPath in xslt file. I can't navigate by names only by vertical and horizontal axis. What's wrong .... --- Code --- // WebService XmlForAnalysis.Xmla xa = new XmlForAnalysis.Xmla(); xa.Url =...
7
2849
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID parameter to the XSLT stylesheet XsltArgumentList xsltArgList = new XsltArgumentList(); xsltArgList.AddParam("pmID", "", pmID); xmlItems.TransformArgumentList = xsltArgList;
4
1467
by: | last post by:
Hi Guys, I am using XSLT to render my XML dataset at the client side to HTML code. When I am trying to load the XslTransform with an Xslt file, it gives me the following error. >>>> The path is too long after being fully qualified. Make sure path is less than 260 characters.
0
1629
by: ronc85 | last post by:
My environment is ASP.NET 2.0, C# and AJAX. I'm having a problem with 'Button Click' logic which is trying to display a Gridview and then use XML/XSLT to build an Excel file. The following code does not display the Gridview but opens the created file in Excel.If I comment out the ExportDatasetToExcel routine the Gridview displays correctly. I'm assuming the problem is something to do with the Response methods.
0
8162
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8662
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
8603
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
8463
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
5560
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
4067
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2593
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1468
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.