473,729 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transform method of XslCompiledTran sform hangs

Using VB.NET 2.0 I have a simple routine that attempts transforms an
XmlDocument with an XSLT stylesheet into HTML. Under the old 1.1
framework with XslTransform, everything worked fine. Now using
XslCompiledTran sform, the Transform method hangs. My code:

Function TransformXML(By Ref FacXML As Xml.XmlDocument , ByVal XslFile As
String) As String
Dim xslt As New System.Xml.Xsl. XslCompiledTran sform
Dim xmlFile As String = <code to name XML file>
Dim htmFile As String = <code to name HTML file>
Try
FacXML.Save(xml File)
xslt.Load(XslFi le)
xslt.Transform( xmlFile, htmFile)
Return htmFile
Catch ex As Exception
Return "ERROR: There was an error creating the XSL transform." &
vbCrLf & ex.Message
End Try
End Function

Basically I pass in an XmlDocument, save it to a file, then load the
XSLT and call Transform. The method hangs the application.

Feb 27 '06 #1
1 2616
Steve, XslCompiledTran sform and XslTransform are twodifferent things.
Offhand you may have been "getting away with something" by using
XslTransform, or you may have found a bug in XslCompiledTran sform. Can you
pls send me your XML input and stylesheet, or representative sample thereof
that repro's the issue? Thanks.

Alex
"Steve" <st*********@eg lin.af.mil> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
Using VB.NET 2.0 I have a simple routine that attempts transforms an
XmlDocument with an XSLT stylesheet into HTML. Under the old 1.1
framework with XslTransform, everything worked fine. Now using
XslCompiledTran sform, the Transform method hangs. My code:

Function TransformXML(By Ref FacXML As Xml.XmlDocument , ByVal XslFile As
String) As String
Dim xslt As New System.Xml.Xsl. XslCompiledTran sform
Dim xmlFile As String = <code to name XML file>
Dim htmFile As String = <code to name HTML file>
Try
FacXML.Save(xml File)
xslt.Load(XslFi le)
xslt.Transform( xmlFile, htmFile)
Return htmFile
Catch ex As Exception
Return "ERROR: There was an error creating the XSL transform." &
vbCrLf & ex.Message
End Try
End Function

Basically I pass in an XmlDocument, save it to a file, then load the
XSLT and call Transform. The method hangs the application.

Mar 13 '06 #2

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

Similar topics

4
1660
by: Cedric | last post by:
Hi, I have a function from one component that returns an XmlDocument object. I have another function in another component that takes an XmlDocument as a property. I have written an XSLT to transform the Xml from the first function to the format expected by the second function. But I don't see how I can call the tranformation process in .NET 2.0. It says that I have to use the XslCompiledTransform class in .NET 2.0, but the transform...
7
3419
by: n33470 | last post by:
We're in the process of migrating our projects to use VS2005 from VS2003. We have a web page that uses the XML WebControl (System.Web.UI.WebControls.Xml) to perform an XSLT tranformation by using the property "Transform" of the webcontrol. Here is a sample: xmlMessage.Transform = _app.Cache.UserMessagesXsltUser; 'xmlMessage' is the XML Web Control, and '_app.Cache.UserMessagesXsltUser' is the transformation to apply.
1
3903
by: Lasse Edsvik | last post by:
Hello I was trying to do this example shown here: http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/ctrlref/webctrl/Xml/Xml2.src&file=CS\Xml2.aspx&font=3 When I run it I get 3 warnings and nothing shows in the browser, what might be wrong? Warning 1 'System.Xml.Xsl.XslTransform' is obsolete: 'This class has been
3
2246
by: BrianDH | last post by:
Hi I am having a problem doing the tranform. Unlike all the examples I have found, I do not load my XML document via a path but from a datacall. I get erros when I try to do the transform (white space cannot be striped) XmlDocument DealXmlDocument = new XmlDocument(); DealXmlDocument.LoadXml(DataCalls);
12
2918
by: das | last post by:
Hello all, I am using .NET XSLT to transform an XML into another XML file. All this is fine with small files, but when tested with big files (30MB) it is taking between 1hr-2hrs to just transform the file. Here is the code snippet: XPathDocument xdoc = new XPathDocument(fs); XPathNavigator nav = xdoc.CreateNavigator(); xslt.Transform(nav, null, strWriter, null);
12
10112
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b) ..... // xsl contents abc.aspx?p1=v1&amp;p2=<xsl:value-of select="$v2" />
5
8642
by: Kevin Burton | last post by:
I am trying an XSLT transformation using the XslCompiledTransform class. I get an exception when I call the Transform method. It seems to point to these two lines: <xsl:namespace name="{$schemaPrefix}" select="$schemaNamespace"/> <xsl:namespace name="{$prefix}" select="$targetNamespace"/> The exception looks like: System.Xml.Xsl.XslTransformException: 'select' is not a recognized extension
2
8829
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) { // Load the style sheet. XslCompiledTransform xslt = new XslCompiledTransform();
6
2695
by: Gina_Marano | last post by:
Hey All, I have a string that contains XML content and I want to transform it in new XML content string. What is the best way of doing this? private string DoXSLTransform(string aXSLFileName, string sOrigXMLContent) {
0
8921
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9427
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
9284
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...
1
9202
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8151
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4528
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
3238
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
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
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.