首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

xslt异常

2012-01-06 
xslt错误?xmlversion 1.0 encoding gb2312 ?stylesheetversion 1.0 xmlns http://www.w3.or

xslt错误
<?xml   version= "1.0 "   encoding= "gb2312 "   ?>
<stylesheet   version= "1.0 "   xmlns= "http://www.w3.org/1999/XSL/Transform ">
<xsl:template   match= "/ ">
          <xsl:apply-templates   select= "Card "   />    
</xsl:template>

<xsl:template   match= "Card ">
        <table   width=100%   border=1>
            <tr>
                  <td>
                        <b> <xsl:value-of   select   = "Name "> </xsl:value-of> </b>
                  </td>
                  <td>
                        <b> <xsl:value-of   select= "Email "> </xsl:value-of> </b>
                  </td>
            </tr>
       
        </table>
</xsl:template>
</stylesheet>

   
上面是源码,一执行就报如下的错误:
无法显示   XML   页。  
使用   XSL   样式表无法查看   XML   输入。请更正错误然后单击   刷新按钮,或以后重试。  


--------------------------------------------

操作成功完成。处理资源   'http://localhost/SMSWeb/xml/AddressBook.xslt '   时出错。第   3   行,位置:   25  

<xsl:template   match= "/ ">

 
请各位帮忙!


[解决办法]
<xsl:apply-templates select="Card" / >

改为
<xsl:call-templates select="Card" / >

热点排行