利用XSL样式表,XML怎么不能正确显示呢

XML内容
---------------

]>

 1<classmate>
 2<person>
 3<name>郝庆锋</name>
 4<sex>男</sex>
 5<phone>027-50105662</phone>
 6<address>4#525</address>
 7<province>&amp;province</province>
 8<city>&amp;city</city>
 9<school>&amp;school</school>
10<email>[email protected]</email>
11</person>
12</classmate>

---------------
XSL内容
---------------

 1<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 2<xsl:template match="/">
 3<html>
 4<head>
 5<title>同学录</title>
 6</head>
 7<body>
 8<xsl:apply-templates select="ClassMate/Person"></xsl:apply-templates>
 9</body>
10</html>
11</xsl:template>
12<xsl:template match="Person">
13<table bgcolor="#800080" border="0" cellpadding="0" cellspacing="0" width="750">
14<tr>
15<td>
16<table border="0" cellpadding="0" cellspacing="1" style="font-family: 楷体_GB2312; font-size: 14pt" width="750">
17<tr>
18<xsl:apply-templates select="Name"></xsl:apply-templates>
19<xsl:apply-templates select="Sex"></xsl:apply-templates>
20</tr>
21<tr>
22<xsl:apply-templates select="Phone"></xsl:apply-templates>
23<xsl:apply-templates select="Email"></xsl:apply-templates>
24</tr>
25<tr>
26<xsl:apply-templates select="Address"></xsl:apply-templates>
27<xsl:apply-templates select="School"></xsl:apply-templates>
28</tr>
29<tr>
30<xsl:apply-templates select="Province"></xsl:apply-templates>
31<xsl:apply-templates select="City"></xsl:apply-templates>
32</tr>
33</table>
34</td>
35</tr>
36</table>
37</xsl:template>
38<xsl:template match="Name">
39<td bgcolor="#FFFFFF" width="187">姓名</td>
40<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Name"></xsl:value-of></td>
41</xsl:template>
42<xsl:template match="Sex">
43<td bgcolor="#FFFFFF" width="187">性别</td>
44<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Sex"></xsl:value-of></td>
45</xsl:template>
46<xsl:template match="Phone">
47<td bgcolor="#FFFFFF" width="187">电话</td>
48<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Phone"></xsl:value-of></td>
49</xsl:template>
50<xsl:template match="Address">
51<td bgcolor="#FFFFFF" width="187">宿舍</td>
52<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Address"></xsl:value-of></td>
53</xsl:template>
54<xsl:template match="School">
55<td bgcolor="#FFFFFF" width="187">学校</td>
56<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="School"></xsl:value-of></td>
57</xsl:template>
58<xsl:template match="Province">
59<td bgcolor="#FFFFFF" width="187">省份</td>
60<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Province"></xsl:value-of></td>
61</xsl:template>
62<xsl:template match="City">
63<td bgcolor="#FFFFFF" width="187">城市</td>
64<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="City"></xsl:value-of></td>
65</xsl:template>
66<xsl:template match="Email">
67<td bgcolor="#FFFFFF" width="187">电子邮件</td>
68<td bgcolor="#FFFFFF" width="187"><xsl:value-of select="Email"></xsl:value-of></td>
69</xsl:template>
70</xsl:stylesheet>

---------------
帮我看看,怎么回事?谢谢。
---------------------------------------------------------------

1<xsl:value-of select="Name"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="Sex"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="Phone"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="Address"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="School"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="Province"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="City"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
1<xsl:value-of select="Email"></xsl:value-of>

==>

1<xsl:value-of select="."></xsl:value-of>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus