⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wml.xsl

📁 用jsp语言自己做的一个网站bookshot的全套程序以及一些样例。完全属于原创。
💻 XSL
字号:
<?xml version="1.0"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output 
      doctype-public="-//WAPFORUM//DTD WML 1.1//EN" 
      doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"/>

  <xsl:template match="employees">
    <wml>
      <card id="list" newcontext="true">
      <p>Phone List</p>
      <p>
        <xsl:apply-templates select="." mode="list"/>
      </p>
      </card>
      <xsl:apply-templates select="." mode="detail"/>
    </wml>
  </xsl:template>

  <xsl:template match="employees" mode="list">
      <xsl:for-each select="employee">
        <anchor>
          <xsl:value-of select="last-name"/>, <xsl:value-of select="first-name"/>
          <go><xsl:attribute name="href">#<xsl:value-of select="last-name"/>_<xsl:value-of select="first-name"/>
          </xsl:attribute></go>
        </anchor>
        <br/>
      </xsl:for-each>
  </xsl:template>

  <xsl:template match="employees" mode="detail">
      <xsl:for-each select="employee">
        <card>
          <xsl:attribute name="id">
            <xsl:value-of select="last-name"/>_<xsl:value-of select="first-name"/>
          </xsl:attribute>
          <p>
            <xsl:value-of select="last-name"/>, <xsl:value-of select="first-name"/>
          </p>
          <p>
            Phone: <xsl:value-of select="telephone"/>
            <do type="prev" label="Back">
              <prev/>
            </do>
          </p>
        </card>
      </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>

⌨️ 快捷键说明

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