Jump to content

jeffdegarmo

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by jeffdegarmo

  1. Unfortunately, I'm using an XML feed from a third-party. After much trouble-shooting, I figured out that the third-party XML feed declared a namespace (xmlns=http://www.sbainc.net/products/sbawebservice) that did not exist. The link went to a Page Cannont Be Found page. Apparently, this adversely affected the XSL file that I had created. Once I got them to remove that declaration everything worked fine.Thanks for the response.
  2. I have a styleshee that displays XML data properly if I use <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> . I know this isn't the right one to use. However, when I use <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> the page does not display any of the XML data. It's as if it hasn't even pulled in the data.** XSL Code ** <?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><xsl:template match="/"><table><tr><td>test me</td></tr></table><xsl:for-each select="DataSet/diffgr:diffgram/MPDataSet/Record"><xsl:value-of select="id"/><br /></xsl:for-each><table><tr><td>test me 2</td></tr></table></xsl:template></xsl:stylesheet> ** XML Retrieval Code ** Dim objXMLDim objXSLDim strHTML'Load the XML FileSet objXML = Server.CreateObject("Microsoft.XMLDOM")objXML.async = FalseobjXML.setProperty "ServerHTTPRequest", trueobjXML.load("http://mail.sbainc.net:8800/sbawebservice.asmx/BusinessSearch?strAllAnyExact=" & request("strAllAnyExact") & "&strSearchType=" & request("strSearchType") & "&intPageNum=" & request("intPageNum") & "&intItemsPerPage=" & request("intItemsPerPage") & "&strKeywords=" & request("strKeywords") & "&strKWWhere=" & request("strKWWhere") & "&strBusinessStatus=" & request("strBusinessStatus") & "")if objXML.parseError.errorcode<>0 thenstrHTML="XML Load error: " & objXSL.parseError.errorcodeelse'Load the XSL FileSet objXSL = Server.CreateObject("Microsoft.XMLDOM")objXSL.async = FalseobjXSL.setProperty "ServerHTTPRequest", true'objXSL.validateOnParse=falseobjXSL.load(Server.MapPath("memberstest.xsl"))if objXSL.parseError.errorcode<>0 thenstrHTML="XSL Load: Reason - " & objXSL.parseError.reason & "Line - " & objXSL.parseError.line & "Line Pos - " & objXSL.parseError.linePoselse' Transform the XML file using the XSL stylesheetstrHTML = objXML.transformNode(objXSL)Set objXML = NothingSet objXSL = Nothingend ifend ifResponse.Write("strHTML: " & strHTML)
×
×
  • Create New...