Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2002-04-12
6
Medium Priority
?
352 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 800 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

971 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