<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)

    隨筆檔案

    文章檔案

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 日本最新免费不卡二区在线| 亚洲熟女一区二区三区| 污污的视频在线免费观看| 亚洲av乱码一区二区三区按摩| 免费在线观看黄网站| 可以免费观看的毛片| 亚洲熟妇久久精品| 亚洲精品成人网站在线观看| 免费福利视频导航| 人妻无码中文字幕免费视频蜜桃 | 精品国产人成亚洲区| 久久久久久毛片免费播放| 亚洲国产精品无码久久九九大片| 中文字幕亚洲乱码熟女一区二区 | 久久亚洲精品成人综合| 毛片免费全部免费观看| 老司机精品免费视频| 亚洲人成影院在线无码按摩店| 亚欧在线精品免费观看一区| 特级毛片全部免费播放| 亚洲精品中文字幕乱码影院| 亚洲人成网站色在线入口| 亚洲精品动漫免费二区| 国产在线观a免费观看| 亚洲成在人线aⅴ免费毛片| 亚洲黄色中文字幕| 亚洲小说区图片区另类春色| 最近2019中文字幕mv免费看| 国产成人精品一区二区三区免费 | 最近中文字幕无吗高清免费视频| 中文字幕免费观看全部电影| 亚洲国产成人久久综合| 91亚洲一区二区在线观看不卡 | 亚洲天堂久久精品| 久久精品国产亚洲一区二区三区 | 久久久久久久尹人综合网亚洲| 国产精品免费看久久久无码| 四虎免费影院ww4164h| 久久免费视频网站| 男女一边桶一边摸一边脱视频免费| 色婷婷精品免费视频|