<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 閱讀(96) 評論(0)  編輯  收藏

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


    網站導航:
     
    <2025年7月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    常用鏈接

    留言簿(2)

    隨筆檔案

    文章檔案

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费日韩在线视频| 亚洲第一黄色网址| 少妇太爽了在线观看免费视频| 中文字幕免费观看视频| 水蜜桃视频在线观看免费播放高清| 精品无码AV无码免费专区| 9久9久女女免费精品视频在线观看| 日韩免费福利视频| 国产亚洲精品影视在线产品| 亚洲狠狠久久综合一区77777| 亚洲理论片在线观看| MM1313亚洲精品无码久久| 国产成人无码精品久久久免费 | 亚洲Av无码精品色午夜| 2020国产精品亚洲综合网| 国产精品亚洲专区无码WEB| 日韩人妻无码免费视频一区二区三区| 亚洲日韩国产欧美一区二区三区| 四虎精品成人免费视频| 2019中文字幕在线电影免费| 亚洲日韩国产一区二区三区| 亚洲AV成人影视在线观看| 免费日本一区二区| 亚洲男人在线无码视频| 亚洲日韩AV一区二区三区中文| 日韩人妻无码免费视频一区二区三区| 人妖系列免费网站观看| 久久精品国产精品亚洲蜜月 | 女人18毛片水真多免费看| 国产亚洲AV夜间福利香蕉149| 亚洲精品无码成人| 国产精品亚洲视频| 曰批全过程免费视频播放网站| 亚洲国产欧洲综合997久久| 天堂在线免费观看中文版| 有码人妻在线免费看片| 亚洲精品欧洲精品| 免费观看国产小粉嫩喷水| 久久久久久久99精品免费观看| 亚洲综合小说另类图片动图| 97在线线免费观看视频在线观看|