+ -
当前位置:首页 → 问答吧 → <xsl:apply-templates/>是如何应用的!

<xsl:apply-templates/>是如何应用的!

时间:2007-09-09

来源:互联网

<?xml version='1.0' encoding="gb2312" ?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/TR/WD-xsl" >

<xsl:template match="/">
  <html>
  <head>
  <title>网上书屋</title>
  </head>
  <body>
      <xsl:apply-templates/>
  </body>
  </html>
</xsl:template>

        <xsl:template match="网上书屋">
     <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="分类">
     <xsl:apply-templates/>
  </xsl:template>
               
</xsl:stylesheet>

<xsl:apply-templates/>所指的节点是哪个节点呢??是<xsl:template match="/">所指的节点吗???这样的话。岂不是造成的递归???

作者: yahoo   发布时间: 2007-09-09

<xsl:apply-templates/>
相当于
<xsl:apply-templates match="*" />

作者: Starling   发布时间: 2007-09-13