Loading ...
Sorry, an error occurred while loading the content.
 

ASP, XML, XSL huh?

Expand Messages
  • ravefish
    Hi all, I ve written as asp script which pull stuff out of a db and turns it into xml, now i want to transform my xml to html through xsl, but my script
    Message 1 of 1 , Feb 1, 2002
      Hi all,<br><br>I've written as asp script which
      pull stuff out of a db and turns it into xml, now i
      want to transform my xml to html through xsl, but my
      script won't do it with the asp page as the input xml
      document.<br><br>when i save the output of the asp script as .xml and
      then run my script it works.<br><br>does anyone know
      whats going on here.<br><br>the offending code is
      below<br><br>Thanks in advance for any help or suggestions
      recieved<br><br>RF<br><br><%@ Language=VBScript %><br><%<br>option
      explicit<br><br>dim sXMLFilename<br>dim sXSLFilename<br><br>Dim id,
      prefix<br><br>id=Request.QueryString("id")<br>prefix=Request.QueryString("prefix")<br><br>sXMLFilename = "testXML2.asp"<br>sXSLFilename =
      "test.xsl"<br><br>TransformXMLtoHTML sXMLFilename, sXSLFilename<br><br>sub
      TransformXMLtoHTML(sXMLFilename, sXSLFilename)<br> dim objXMLDoc<br> dim
      objXSLDoc<br><br> 'First, load the XML Document<br> set objXMLDoc =
      Server.CreateObject("Microsoft.XMLDOM")<br> objXMLDoc.async = false<br>
      objXMLDoc.load(Server.MapPath(sXMLFilename))<br><br> 'Now Load the XSL Document<br> set objXSLDoc =
      Server.CreateObject("Microsoft.XMLDOM")<br> objXSLDoc.async = false<br>
      objXSLDoc.load(Server.MapPath(sXSLFilename))<br><br> ' Now simply transform the XML/XSL files into
      HTML<br>
      Response.Write(objXMLDoc.transformNode(objXSLDoc))<br>end sub<br>%>
    Your message has been successfully submitted and would be delivered to recipients shortly.