Solved

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

Posted on 2002-04-12
6
325 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now