zoukankan      html  css  js  c++  java
  • XSL相关

    <?xml version="1.0" encoding="utf-8" ?>
    <?xml-stylesheet type="text/xsl" href="C:UsersAdministratorDesktopemp1.xsl" ?>
    <employees>
      <employee on="01">
        <name>Tom</name>
        <sex>男</sex>
        <birth>
          <year>1982</year>
          <month>5</month>
          <day>22</day>
        </birth>
        <sales>
          <year>2010</year>
          <month>1</month>
          <sale>320000</sale>
        </sales>
        <salary>8600</salary>
      </employee>
      
      <employee on="02">
        <name>Jack</name>
        <sex>男</sex>
        <birth>
          <year>1981</year>
          <month>7</month>
          <day>10</day>
        </birth>
        <sales>
          <year>2010</year>
          <month>1</month>
          <sale>300000</sale>
        </sales>
        <salary>6000</salary>
      </employee>
      <employee on="03">
        <name>Jennifer</name>
        <sex>女</sex>
        <birth>
          <year>1982</year>
          <month>6</month>
          <day>22</day>
        </birth>
        <sales>
          <year>2010</year>
          <month>1</month>
          <sale>500000</sale>
        </sales>
        <salary>7000</salary>
      </employee>
      
    </employees>
    =========================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:fo="http://www.w3.org/1999/XSL/Format" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:fn="http://www.w3.org/2005/xpath-functions" 
    xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
    <!-- 模板 -->
      <xsl:template match="/employees/employee">
         <html>
    <head><title></title></head>
    <body>
       <div>
                        <u>
           <h2>编号:<xsl:value-of select="@no"/>  </h2>
               </u>    
       </div>
       <div>
           姓名:<xsl:value-of select="name"/>
       </div>
       <div>
            <i> 
              生日:
              <xsl:value-of select="birth/year"/>年
              <xsl:value-of select="birth/month"/>月
              <xsl:value-of select="birth/day"/>日
            </i>
       </div>
    </body>
         </html>
      </xsl:template>
    </xsl:stylesheet>
  • 相关阅读:
    点击添加,上面div获取到值
    解决ios浏览器视频无法播放问题
    jquery中使用$(#form).submit()提交表单无效原因分析及解决Script
    html页面,css引用外部字体
    当页面信息填写不完整,点击提交后,直接跳转到未填写位置
    layui日历控件添加js校验后 页面点击提交后,点击日历插件不起作用
    jquery在线引用
    左侧导航高度,自适应右侧内容高度
    Mysql
    Linux文件编辑器,链接,及常用系统命令
  • 原文地址:https://www.cnblogs.com/blogLYF/p/5653958.html
Copyright © 2011-2022 走看看