我写了一个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>
      </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>
[此贴子已经被作者于2007-11-6 21:38:48编辑过]

 
											





 xdcZREHW.txt
xdcZREHW.txt