469,923 Members | 1,199 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

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 2316
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Cedric | last post: by
1 post views Thread by Lasse Edsvik | last post: by
3 posts views Thread by BrianDH | last post: by
5 posts views Thread by Kevin Burton | last post: by
6 posts views Thread by Gina_Marano | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.