Solved

SQL 2000/XML/XSL....error loading XSL stylesheet?#$%??

Posted on 2002-04-12
6
342 Views
Last Modified: 2006-11-17
Hi, I'm trying to use XSL to format the XML output generated by SQL XML in IIS.

I pass a SQL command thru HTTP request.
ex) http://www.xyz.com/xml/sql=select * from tblProducts for xml auto&root=root

It displays the output the way I expect it to.

But when I try and use XSL stylesheet to format the output, IIS spits out the following error message. What am I doing wrong? and/or what am I missing?

ERROR: 500 Internal Server Error
HResult: 0x80004005
Source: Microsoft XML Extensions to SQL Server
Description: SQLXML: error loading XSL stylesheet

Here's my xls file.
BTW, I also tried to call the original namespace (http://www.w3.org/TR/WD-xsl) but it still gave me the same error message.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match = "/">
    <HTML>
    <HEAD>

    </HEAD>
    <BODY>
    <TABLE Border="1">
      <TR>
        <TH ColSpan="1">Products</TH>
      </TR>
      <TR>
        <TH>Product Name</TH>
        <TH>Price</TH>
      </TR>
      <xsl:for-each select="root/tblProducts">
        <TR>
          <TD><xsl:value-of select="@ProductName"/></TD>
          <TD><xsl:value-of select="@Price"/></TD>
        </TR>
      </xsl:for-each>
    </TABLE>
    </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>
 
0
Comment
Question by:as66422
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 6938519
as6642, did you run xmlinst.exe on the box?
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6938543
if you did, that may have damaged SQL XML functionality.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6938608
either that or the pathway to the XSL Document is wrong

<?xml-stylesheet href="path.xsl" type="text/xsl"?>
0
Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

 
LVL 23

Expert Comment

by:b1xml2
ID: 6938611
References to Problems with XmlInst.exe
==========================
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q278636
0
 

Author Comment

by:as66422
ID: 6938839
b1xml2, thanks for your comment.
Here are my answers to your questions.
No I didn't run xmlinst.exe and I'm sure that the path to the xsl file is correct.
Any comment/suggestion will be greatly appreciated.
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 200 total points
ID: 6939580
if you were to change the path to a non-existent stylesheet, see what error you will be getting. If the error is the same, then the obvious cause is the wrong path. Try absolute paths and see the results. If all else fails, I will activate the SQL XML functionality on my box and proceed from there.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question