book.xsl

来自「java 编程源代码」· XSL 代码 · 共 34 行

XSL
34
字号
<?xml version = "1.0"?>

<!-- Fig. D.17 : book.xsl                -->
<!-- xsl:include example using usage.xml -->

<xsl:stylesheet version = "1.0" 
   xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">

   <xsl:template match = "/">

   <html>
      <body>
         <xsl:apply-templates select = "book"/>
      </body>
   </html>

   </xsl:template>

   <xsl:template match = "book">

      <h2>
         <xsl:value-of select = "title"/>
      </h2>

      <xsl:apply-templates/>
   </xsl:template>

   <xsl:include href = "author.xsl"/>
   <xsl:include href = "chapters.xsl"/>
  
   <xsl:template match = "*|text()"/>

</xsl:stylesheet>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?