Confirmed HTTP header/body corruption using XSL

Hello,

I have been plagued by a problem using XSL to markup my XML data.  My problem has been confirmed on the microsoft.public.xml.msxml-webrelease newsgroup (Titled: "XSL and HTTP POST problem").  Basically the problem is as follows...

Case A> The Good Case

I have a FORM in an html file. It submits an INPUT element of type=file.  The submission is successful and the HTTP header/body is correct.

Case B> The Failing Case

I now decide to use an XSL file to represent the FORM and create some XML file on which the stylesheet will be used.  The submission of this form is catastophic.  The HTTP header's ACCEPT_LANGUAGE has its value listed _twice_ (en-us,en-us) and CONTENT_LENGTH does _not_ include the length of the data that should be in the HTTP body due to the POST operation.

The outcome is that it is not possible to upload files via type=post from a FORM when the markup is being done via XSL.  This is obviously unacceptable and in my project's case a definitive show-stopper.

Could someone run the samples below and either provide added information on the behavior and/or a way to sidestep the side-effect?  (I cannot abandone using XML and marking up with XSL).

Code for test case A:

Test2.asp consists of...

   <HTML>
    <BODY>
      <h2>Sample 1: Simple Uploading</h2>
      <FORM METHOD='POST' ENCTYPE='multipart/form-data'
ACTION='UploadScript1.asp'>
        <INPUT TYPE='FILE' SIZE='60' NAME='FILE1'><BR>
        <INPUT TYPE='SUBMIT' VALUE='Upload!'>
      </FORM>
      User : First Middle Last
    </BODY>
    </HTML>

I run it from the Start>Run dialog using http://localhost/Test2.asp and it
successfully uploads the selected file.


Code for test case B:

Test1.xsl consists of...

<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/TR/WD-xsl'>
  <xsl:template match='/'>
    <HTML>
    <BODY>
      <h2>Sample 1: Simple Uploading</h2>
      <FORM METHOD='POST' ENCTYPE='multipart/form-data'
ACTION='UploadScript1.asp'>
        <INPUT TYPE='FILE' SIZE='60' NAME='FILE1'/><BR/>
        <INPUT TYPE='SUBMIT' VALUE='Upload!'/>
      </FORM>
      User : <xsl:value-of select='stuff/name'/>
    </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>

It's the same markup as before, except that the elements are all closed as
required by XML.  i.e. <INPUT ... /> and <BR/>.

Test1.asp consists of...

<% language=vbscript
  ' A database call would retrieve XML doc here...
  ' Simulate this via assignment for simplicity.
  strXML = "<?xml version='1.0' ?>" & vbcrlf & _
    "<?xml-stylesheet href='Test1.xsl' type='text/xsl' ?>" & vbcrlf & _
    "  <stuff>" & vbcrlf & _
    "    <name>First Middle Last</name>" & vbcrlf & _
    "</stuff>" & vbcrlf
  Response.Write strXML
%>

I run it from the Start>Run dialog using http://localhost/Test1.asp and it
throws a HTTP 500.


Thanks in advance,

Martin Douglas
Web Development
Food Services of America



Get your small business started at Lycos Small Business at http://www.lycos.com/business/mail.html

Received on Monday, 15 January 2001 10:32:36 UTC