zoukankan      html  css  js  c++  java
  • XSL

    创建 XSL 样式表
    然后创建一个带有转换模板的 XSL 样式表("cdcatalog.xsl"):

    <?xml version="1.0" encoding="ISO-8859-1"?>

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

    <xsl:template match="/">
      <html>
      <body>
        <h2>My CD Collection</h2>
        <table border="1">
        <tr bgcolor="#9acd32">
          <th align="left">Title</th>
          <th align="left">Artist</th>
        </tr>
        <xsl:for-each select="catalog/cd">
        <tr>
          <td><xsl:value-of select="title"/></td>
          <td><xsl:value-of select="artist"/></td>
        </tr>
        </xsl:for-each>
        </table>
      </body>
      </html>
    </xsl:template>

    </xsl:stylesheet>查看 "cdcatalog.xsl"
    把 XSL 样式表链接到 XML 文档
    向 XML 文档("cdcatalog.xml")添加 XSL 样式表引用:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
    <catalog>
      <cd>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <country>USA</country>
        <company>Columbia</company>
        <price>10.90</price>
        <year>1985</year>
      </cd>

    </catalog>

    XSLT <template>
    XSLT <xsl:value-of>
    XSLT <for-each>
    XSLT <sort>
    XSLT <if>
    XSLT <choose>
    XSLT apply

  • 相关阅读:
    chrome远程调试真机上的app
    高性能Cordova App开发学习笔记
    eclipse导入cordova项目
    跨域后模拟器上还是不能显示数据
    跨域请求数据
    eclipse导入cordova创建的项目
    cordova添加platform
    sdk更新代理设置
    NPM安装之后CMD中不能使用
    android开发环境搭建
  • 原文地址:https://www.cnblogs.com/liuzhendong/p/2244799.html
Copyright © 2011-2022 走看看