472,784 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Transform method of XslCompiledTransform 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
XslCompiledTransform, the Transform method hangs. My code:

Function TransformXML(ByRef FacXML As Xml.XmlDocument, ByVal XslFile As
String) As String
Dim xslt As New System.Xml.Xsl.XslCompiledTransform
Dim xmlFile As String = <code to name XML file>
Dim htmFile As String = <code to name HTML file>
Try
FacXML.Save(xmlFile)
xslt.Load(XslFile)
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 2514
Steve, XslCompiledTransform 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 XslCompiledTransform. Can you
pls send me your XML input and stylesheet, or representative sample thereof
that repro's the issue? Thanks.

Alex
"Steve" <st*********@eglin.af.mil> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.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
XslCompiledTransform, the Transform method hangs. My code:

Function TransformXML(ByRef FacXML As Xml.XmlDocument, ByVal XslFile As
String) As String
Dim xslt As New System.Xml.Xsl.XslCompiledTransform
Dim xmlFile As String = <code to name XML file>
Dim htmFile As String = <code to name HTML file>
Try
FacXML.Save(xmlFile)
xslt.Load(XslFile)
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
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...
7
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...
1
by: Lasse Edsvik | last post by:
Hello I was trying to do this example shown here: ...
3
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...
12
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...
12
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)...
5
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...
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) {...
6
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...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

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.