<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 2,  comments - 0,  trackbacks - 0

    xsl :

    xsl inclulde xslt,xpath,xsl-FO

    xslt is used transform the xml to the document understood by IE such as html.

    Given these design goals, what are XSLT's strengths? Here are some scenarios:

  • Your web site needs to deliver information to a variety of devices. You need to support ordinary desktop browsers, as well as pagers, mobile phones, and other low-resolution, low-function devices. It would be great if you could create your information in structured documents, then transform those documents into all the formats you need.

  • You need to exchange data with your partners, but all of you use different database systems. It would be great if you could define a common XML data format, then transform documents written in that format into the import files you need (SQL statements, comma-separated values, etc.).

  • To stay on the cutting edge, your web site gets a complete visual redesign every few months. Even though things such as server-side includes and CSS can help, they can't do everything. It would be great if your data were in a flexible format that could be transformed into any look and feel, simplifying the redesign process.

  • You have documents in several different formats. All the documents are machine-readable, but it's a hassle to write programs to parse and process all of them. It would be great if you could combine all of the documents into a single format, then generate summary documents and reports based on that collection of documents. It would be even better if the report could contain calculated values, automatically generated graphics, and formatting for high-quality printing.


    eg.

    
        <?xml version="1.0"?>
        <CATALOG>
          <CD>
            <TITLE>Empire Burlesque</TITLE>
            <ARTIST>Bob Dylan</ARTIST>
            <COUNTRY>USA</COUNTRY>
            <COMPANY>Columbia</COMPANY>
            <PRICE>10.90</PRICE>
            <YEAR>1985</YEAR>
          </CD>
        .
        .
        .
        還有附帶的XSL樣式表:
        <?xml version='1.0'?>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
        <xsl:template match="/">
          <html>
          <body>
            <table border="2" bgcolor="yellow">
              <tr>
                <th>Title</th>
                <th>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>
    

    We can use javascript to implement in client:


  • 
        <html>
        <body>
        <script language="javascript">
        // Load XML
        var xml = new ActiveXObject("Microsoft.XMLDOM")
        xml.async = false
        xml.load("cd_catalog.xml")
        // Load the XSL
        var xsl = new ActiveXObject("Microsoft.XMLDOM")
        xsl.async = false
        xsl.load("cd_catalog.xsl")
        // Transform
        document.write(xml.transformNode(xsl))
        </script>
        </body>
        </html>
    


    In server :
    
        <%
        'Load the XML
        set xml = Server.CreateObject("Microsoft.XMLDOM")
        xml.async = false
        xml.load(Server.MapPath("cd_catalog.xml"))
        'Load the XSL
        set xsl = Server.CreateObject("Microsoft.XMLDOM")
        xsl.async = false
        xsl.load(Server.MapPath("cd_catalog.xsl"))
        'Transform the file
        Response.Write(xml.transformNode(xsl))
        %>
    

    posted on 2006-02-13 11:54 Felix 閱讀(94) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(2)

    隨筆檔案

    文章檔案

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: EEUSS影院WWW在线观看免费 | 亚洲国产情侣一区二区三区| 国产精品视频免费一区二区| 全亚洲最新黄色特级网站 | 国产一区二区三区免费| 亚洲精品天天影视综合网| 免费永久看黄在线观看app| 亚洲av无码兔费综合| 亚洲AV日韩精品一区二区三区| 无码国产亚洲日韩国精品视频一区二区三区| 免费av片在线观看网站| 亚洲无成人网77777| 亚洲不卡无码av中文字幕| 精品熟女少妇av免费久久| 亚洲日本在线电影| 亚洲成AV人片一区二区密柚| 怡红院免费全部视频在线视频| 亚洲AⅤ永久无码精品AA| 91免费国产精品| 免费国产黄网站在线观看动图| 免费一级做a爰片久久毛片潮喷| 亚洲精品中文字幕无码A片老| 大地资源免费更新在线播放| 中文字幕在线免费播放| 亚洲三级高清免费| 亚洲AV乱码久久精品蜜桃 | 国产又黄又爽胸又大免费视频| 久久亚洲高清综合| 国精产品一区一区三区免费视频| 亚洲午夜久久久久久久久电影网 | 亚洲伊人久久大香线蕉苏妲己| 猫咪免费人成网站在线观看入口| 青青草国产免费久久久下载| 99精品视频免费观看| 二级毛片免费观看全程| 亚洲最大无码中文字幕| 久久精品国产亚洲| 久久久亚洲精品蜜桃臀| 四虎影视免费永久在线观看| 成人性生活免费视频| 久久精品无码一区二区三区免费 |