新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 关于 XML 的一般性技术讨论,提供 XML入门资料 和 XML教程
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 XML基础 』 → [求助]初学者的XML程序,怎么显示不出来 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3215 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [求助]初学者的XML程序,怎么显示不出来 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     小斌 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:0
      积分:52
      门派:XML.ORG.CN
      注册:2007/11/6

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给小斌发送一个短消息 把小斌加入好友 查看小斌的个人资料 搜索小斌在『 XML基础 』的所有贴子 引用回复这个贴子 回复这个贴子 查看小斌的博客楼主
    发贴心情 [求助]初学者的XML程序,怎么显示不出来

    如题!
    XML文件:
    <?xml version="1.0" encoding="gb2312"?>
    <?xml-stylesheet href="resume.xsl" type="text/xsl"?>

    <resume xmlns:xsi="http://www.sina.com.cn" xsi:naNamespaceSchemaLocation="resume.xsd">
     <session1 date="2007-11-1" property="Personal information">
      <name>Wang</name>
      <sex>male</sex>
      <id>0709120456</id>
      <major>Cryptography</major>
      <telephone>88200147</telephone>
      <taste>swimming</taste>
     </session1>

     <session2>
      <subtitle>Objective</subtitle>
      <information authenticity="ture">To obtain a challenging position as a software engineer with an emphasis in software design and development.
      </information>
      
      <subtitle>Education</subtitle>
      <information authenticity="ture">2003.9-2007.7 Graduate School of XD University, B.E.
      </information>
      
      <subtitle>Computer Abilities</subtitle>
      <information authenticity="ture">Skilled in use of matlab,HTML, JavaScript, C, C++, Office 2003, SQL2000.
      </information>
      
      <subtitle>English Skills</subtitle>
      <information>Past CET-4 and CET-6.Have a good command of both spoken and written English.
      </information>
      
      <subtitle>Scholarship and Awards</subtitle>
      <information>Excellent graduate student</information>
      
      <subtitle>Qualifications</subtitle>
      <information>Liablity for my job,innovative and sence of teamwork</information>
     </session2>
    </resume>

    XSL文件:
    <?xml version="1.0" encoding="gb2312"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.sina.com.cn">
    <xsl:template match="/">
    <html>
     <head>
      <title>Resume</title>
     </head>
     <body background="dirt.gif">
      <h1 style="color:#000000;font-size:large;text-align:center;letter-spacing:normal ">Resume</h1>
      <br/>
      <xsl:apply-templates/>
     </body>
    </html>
    </xsl:template>

    <xsl:template match="resume">
     <xsl:apply-templates select="session1">
     </xsl:apply-templates>
     <xsl:apply-templates select="session2">
     </xsl:apply-templates>
    </xsl:template>

    <xsl:template match="session1">
     <h2 style="font-weight:bold;text-align:left;font-size:18px"><xsl:value-of select="@property"/></h2>
     Name:<xsl:value-of select="name"/><br/>           Sex:<xsl:value-of select="sex"/><br/>
     ID:<xsl:value-of select="id"/><br/>               Major:<xsl:value-of select="major"/><br/>
     phone:<xsl:value-of select="telephone"/><br/>     Taste:<xsl:value-of select="taste"/><br/>
    </xsl:template>

    <xsl:template match="session2">
     <xsl:for-each select="subtitle">
     <h2 style="font-weight:bold;text-align:left;font-size:18px"><xsl:value-of select="subtitle"/></h2>
     <xsl:value-of select="information"/>
     </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    好心人帮忙看看吧?


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/11/6 23:23:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XML基础 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/5/18 17:58:28

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    62.500ms