Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2006, 08:25 PM
Steve
Guest
 
Posts: n/a
Default 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.

  #2  
Old March 13th, 2006, 09:05 PM
Alex Krawarik[MSFT]
Guest
 
Posts: n/a
Default Re: Transform method of XslCompiledTransform hangs

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" <steven.milz@eglin.af.mil> wrote in message
news:1141071352.253675.228320@e56g2000cwe.googlegr oups.com...[color=blue]
> 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.[/color]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles