<xsl:template match="Album">
  <td bgcolor="#E1E1F7">
  <img alt="标头" src="../../../Images/cap.gif" border="0" /><a title="{AlbumName}" href="Album{AlbumID}/Catalog_1.xml"><xsl:value-of /></a>
  </td>
</xsl:template>===================================我是分割线======================================
如上代码如何在template里使用节点的值??在for-each里可以直接用{节点名}读取,但是在template里发现不可以.比如上面的那个链接,指到上面时显示的是
http://localhost/Album{AlbumID}/Catalog_1.xml
而不是我想要的
http://localhost/Album3/Catalog_1.xml

解决方案 »

  1.   

    hi我用的是这个
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">不知道是不是这个的原因。这个
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">好像就可以,谁能告诉我为什么?
      

  2.   

    The XSL version indicated by "http://www.w3.org/TR/WD-xsl" was a working draft proposed by Microsoft. It was implemented in MSXML2.6 and then deployed with IE5/5.5. Simply, it is like an alpha version of a software. It is outdated and no one is using it outside Microsoft world. In this version, xsl:variable is not defined.The XSLT version indicated by "http://www.w3.org/1999/XSL/Transform" is the W3 Recommendation, the de facto industry standard. It is implemented in MSXML3/MSXML4. MSXML3 comes with IE6 as its default XML/XSLT parser. In this version,  xsl:variable is defined Post your code
      

  3.   

    xmlns:xsl="http://www.w3.org/TR/WD-xsl"与xmlns:xsl="http://www.w3.org/1999/XSL/Transform"有什么区别
    http://www.ask321.com/ask9/ask159234.htm
      

  4.   

    hi还是不明白,又遇到个问题<xsl:if expr 标签里如何再嵌套<xsl:if test标签???
      

  5.   

    也可以用如下形式:<xsl:choose>
      <xsl:when test  ....  </xsl:when>
      <xsl:otherwise>  </xsl:otherwise>
    </xsl:choose>