Solved

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

Posted on 2002-04-12
6
329 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Merge XML into DOM 5 45
How do I bind the results to a grid 3 36
Formatting issues in XSL FO 3 38
read an xml file in perl 2 32
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
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. 
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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