C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着

 

 

<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
<xsl:template match="/">
<HTML>
 <HEAD>
  <TITLE></TITLE>
 </HEAD>
 <BODY>
 <H1>学生个人信息</H1>
 <table width="200" border="1">
    <tr>
    <td>编号</td>
      <td>姓名</td>
      <td>性别</td>
      <td>生日</td>
      <td>成绩</td>
      <td>技能</td>
    </tr>
 
 <xsl:for-each select="studInfo/student">
 <tr>
<td><xsl:value-of select="position()"/></td>
 <td><xsl:value-of select="name"/></td>
 <td><xsl:value-of select="sex"/></td>
 <td><xsl:value-of select="birthday"/></td>
 <td><xsl:value-of select="score"/></td>
 <td><xsl:value-of select="skill"/></td>
 </tr>
 </xsl:for-each>
<xsl:value-of select="/studInfo/student[@ID]"/>----
<xsl:value-of select="/studInfo/student"/>-----
<xsl:value-of select="/studInfo/student/skill"/>
 </table>
 </BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="gb2312" ?>
<?xml:stylesheet type="text/xsl" href="student.xslt" ?>
<studInfo>
 <student ID="040310125">
  <name>luliuyan</name>
  <sex>男</sex>
  <birthday>1985.8.19</birthday>
  <score>100</score>
  <skill>Java</skill>
  <skill>Oracle</skill>
  <skill>C Sharp</skill>
  <skill>SQL Server</skill>
 </student>

 <student ID="040310150">
  <name>xiaowang</name>
  <sex>女 </sex>
  <birthday>1985.8.20</birthday>
  <score>100</score>
  <skill>C++</skill>
  <skill>Oracle</skill>
  <skill>C Sharp</skill>
  <skill>SQL Server</skill>
 </student>

 <student ID="040310152">
  <name>badboy</name>
  <sex>男</sex>
  <birthday>1985.8.20</birthday>
  <score>100</score>
  <skill>C++</skill>
  <skill>Oracle</skill>
  <skill>C Sharp</skill>
  <skill>SQL Server</skill>
 </student>
 
</studInfo>

posted on 2008-10-31 10:32  王德田  阅读(231)  评论(0编辑  收藏  举报