did you get any errors? do you see a blank screen or errors?1. open "在 IIS 中配置 SQL XML 支持"2. open the Properties page for your NWind virtual directory3. go to Virtual Name tab4. click on New button, enter "template" on the first line, select "template" on the second line, enter "template" on the third line5. copy the following as "myxml.xml" into the template directory: <ROOT xmlns:sql='urn:schemas-microsoft-com:xml-sql' sql:xsl="myxsl.xsl"> <sql:query> SELECT * FROM Employees FOR XML AUTO </sql:query> </ROOT> copy the following as "myxsl.xsl" to the template directory:<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<ROOT xmlns:sql='urn:schemas-microsoft-com:xml-sql' sql:xsl="myxsl.xsl">
<sql:query>
SELECT *
FROM Employees
FOR XML AUTO
</sql:query>
</ROOT> copy the following as "myxsl.xsl" to the template directory:<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match = '*'>
<xsl:apply-templates />
</xsl:template>
<xsl:template match = 'Employees'>
<TR>
<TD><xsl:value-of select = '@FirstName' /></TD>
<TD><B><xsl:value-of select = '@LastName' /></B></TD>
</TR>
</xsl:template>
<xsl:template match = '/'>
<HTML>
<HEAD>
<STYLE>th { background-color: #CCCCCC }</STYLE>
</HEAD>
<BODY>
<TABLE border='1' style='width:300;'>
<TR><TH colspan='2'>Employees</TH></TR>
<TR><TH >First name</TH><TH>Last name</TH></TR>
<xsl:apply-templates select = '*' />
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>6. try
http://localhost/nwind/template/myxml.xml
你在本地测试,和防火墙有关系么??
你仔细CHECK...
http://localhost/nwind/template/first.xml