Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncated or no output after transformation

Status
Not open for further replies.

DrDDT

Technical User
Apr 6, 2005
88
NL
Hi!

I'm trying to transform xml with the microsoft parser. Somehow, I cannot get it to output the full tranformed document to the browser.

If I try:
Code:
<% @Language = "VBScript" %>
 
<%
Dim xmlDoc
Dim xslDoc
Dim xmlOutput
Dim xslProc

Set xslt = Server.CreateObject("MSXML2.XSLTemplate.4.0")
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument.4.0")
Set xslDoc = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.4.0")

 
xslDoc.async = False
xslDoc.load "" + Request.QueryString("stylesheet")
 
Set xslt.stylesheet = xslDoc.documentelement
xmlDoc.async = False
xmlDoc.validateOnParse = False
xmlDoc.load "" + Request.QueryString("input")
 
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
xslProc.Output = Response

xslProc.Transform
 
%>

I only see a '?' in the browser.

If I try replacing the last lines of the script with

Code:
'xslProc.Output = Response

xslProc.Transform
Response.write xslProc.output

(Should be somewhat slower, and I need the best speed I can get)
I DO get output, but the output is truncated a about 10.000 bytes. If I request the length of the xslProc.output, I get 23000 bytes.

I'm using IIS6 and Windows 2003.
Testing the transformation using the command line tool works fine.

Any ideas?
 
Try adding these?
[1] At the top, set expires property of response object.
[tt] response.expires=-1[/tt]

[2] After transform flush out the response.
[tt] xslProc.Transform
response.flush
[/tt]
[3] For the loading of various source files, make sure the absolute paths are in place, otherwise, make good use of server.mappath(). (But, you said you get what expected amid partially, may be your querystring take care of itself.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top