473,395 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

namespace problem

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 **
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <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">
  3. <xsl:template match="/">
  4. <table><tr><td>test me</td></tr></table>
  5. <xsl:for-each select="DataSet/diffgr:diffgram/MPDataSet/Record">
  6.   <xsl:value-of select="id"/><br />
  7. </xsl:for-each>
  8. <table><tr><td>test me 2</td></tr></table>
  9.  
  10. </xsl:template>
  11. </xsl:stylesheet>
** XML Retrieval Code **
Expand|Select|Wrap|Line Numbers
  1. Dim objXML
  2. Dim objXSL
  3. Dim strHTML
  4.  
  5. 'Load the XML File
  6. Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  7. objXML.async = False
  8. objXML.setProperty "ServerHTTPRequest", true
  9. objXML.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") & "")
  10.  
  11. if objXML.parseError.errorcode<>0 then
  12.   strHTML="XML Load error: " & objXSL.parseError.errorcode
  13. else
  14.   'Load the XSL File
  15.   Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
  16.   objXSL.async = False
  17.   objXSL.setProperty "ServerHTTPRequest", true
  18.   'objXSL.validateOnParse=false
  19.   objXSL.load(Server.MapPath("memberstest.xsl"))
  20.   if objXSL.parseError.errorcode<>0 then
  21.     strHTML="XSL Load: Reason - " & objXSL.parseError.reason & "Line - " & objXSL.parseError.line & "Line Pos - " & objXSL.parseError.linePos
  22.   else
  23.     ' Transform the XML file using the XSL stylesheet
  24.     strHTML = objXML.transformNode(objXSL)
  25.  
  26.     Set objXML = Nothing
  27.     Set objXSL = Nothing
  28.  
  29.   end if
  30. end if
  31.  
  32. Response.Write("strHTML: " & strHTML)
Sep 29 '06 #1
0 1343

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Marcin Kalicinski | last post by:
Is the code below ill formed (because operator >> is defined in different namespace than class B)? It fails with VS 2005 Beta. I don't know if I should redesign my code or if I should find a...
5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
30
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" <<...
7
by: Armin Zingler | last post by:
Hi all, I have a Form called "Main": Public Class Main Private Sub Button1_Click( _ ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.