我创建了一个带有链接的xsl文件的XML文档。这些文件通过了验证,但是当我尝试在浏览器中查看XML文档时,所有数据都被串成一团糟。我不确定我缺少什么。 XML代码是:
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="EmployeeRecords.xsl"?>
<EmployeeRecords xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="EmployeeRecords.xsd">
<employee>
<Emp_ID>677509</Emp_ID>
<Prefix>Drs.</Prefix>
<FName>Lois</FName>
<Initial>H</Initial>
<LName>Walker</LName>
<Gender>F</Gender>
<Email>lois.walker@hotmail.com</Email>
<FatherName>Donald Walker</FatherName>
<MotherName>Helen Walker</MotherName>
<MotherMaidenName>Lewis</MotherMaidenName>
<DateOfBirth>3/29/1981</DateOfBirth>
<TimeOfBirth>2:31:49 AM</TimeOfBirth>
<Age>36.36</Age>
<WeightKG>60</WeightKG>
<HireDate>11/24/2003</HireDate>
<QuarterOfJoining>Q4</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2003</YearOfJoining>
<MonthOfJoining>11</MonthOfJoining>
<MonthNameJoining>November</MonthNameJoining>
<ShortMonth>Nov</ShortMonth>
<DayOfJoining>24</DayOfJoining>
<DOWJoining>Monday</DOWJoining>
<ShortDOW>Mon</ShortDOW>
<AgeInCompany>13.68</AgeInCompany>
<Salary>168251</Salary>
<LastPayIncrease>21%</LastPayIncrease>
<SSN>467-99-4677</SSN>
<Phone>303-572-8492</Phone>
<PlaceName>Denver</PlaceName>
<County>Denver</County>
<City>Denver</City>
<State>CO</State>
<Zip>80224</Zip>
<Region>West</Region>
<UserName>lhwalker</UserName>
<Password>DCa}.T}X:v?NP</Password>
</employee>
<employee>
<Emp_ID>940761</Emp_ID>
<Prefix>Ms.</Prefix>
<FName>Brenda</FName>
<Initial>S</Initial>
<LName>Robinson</LName>
<Gender>F</Gender>
<Email>brenda.robinson@gmail.com</Email>
<FatherName>Raymond Robinson</FatherName>
<MotherName>Judy Robinson</MotherName>
<MotherMaidenName>Perry</MotherMaidenName>
<DateOfBirth>7/31/1970</DateOfBirth>
<TimeOfBirth>12:13:27 PM</TimeOfBirth>
<Age>47.02</Age>
<WeightKG>60</WeightKG>
<HireDate>7/27/2008</HireDate>
<QuarterOfJoining>Q3</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2008</YearOfJoining>
<MonthOfJoining>7</MonthOfJoining>
<MonthNameJoining>July</MonthNameJoining>
<ShortMonth>Jul</ShortMonth>
<DayOfJoining>27</DayOfJoining>
<DOWJoining>Sunday</DOWJoining>
<ShortDOW>Sun</ShortDOW>
<AgeInCompany>9.01</AgeInCompany>
<Salary>51063</Salary>
<LastPayIncrease>27%</LastPayIncrease>
<SSN>537-71-4566</SSN>
<Phone>225-945-4954</Phone>
<PlaceName>Stonewall</PlaceName>
<County>De Soto</County>
<City>Stonewall</City>
<State>LA</State>
<Zip>71078</Zip>
<Region>South</Region>
<UserName>bsrobinson</UserName>
<Password>TCo\j#Zg;SQ~o</Password>
</employee>
<employee>
<Emp_ID>428945</Emp_ID>
<Prefix>Dr.</Prefix>
<FName>Joe</FName>
<Initial>W</Initial>
<LName>Robinson</LName>
<Gender>M</Gender>
<Email>joe.robinson@gmail.com</Email>
<FatherName>Scott Robinson</FatherName>
<MotherName>Stephanie Robinson</MotherName>
<MotherMaidenName>Taylor</MotherMaidenName>
<DateOfBirth>6/16/1963</DateOfBirth>
<TimeOfBirth>10:45:36 AM</TimeOfBirth>
<Age>54.15</Age>
<WeightKG>68</WeightKG>
<HireDate>8/3/2016</HireDate>
<QuarterOfJoining>Q3</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2016</YearOfJoining>
<MonthOfJoining>8</MonthOfJoining>
<MonthNameJoining>August</MonthNameJoining>
<ShortMonth>Aug</ShortMonth>
<DayOfJoining>3</DayOfJoining>
<DOWJoining>Wednesday</DOWJoining>
<ShortDOW>Wed</ShortDOW>
<AgeInCompany>0.98</AgeInCompany>
<Salary>50155</Salary>
<LastPayIncrease>16%</LastPayIncrease>
<SSN>025-92-3584</SSN>
<Phone>219-904-2161</Phone>
<PlaceName>Michigantown</PlaceName>
<County>Clinton</County>
<City>Michigantown</City>
<State>IN</State>
<Zip>46057</Zip>
<Region>Midwest</Region>
<UserName>jwrobinson</UserName>
<Password>GO4$J8MiEh[A</Password>
</employee>
<employee>
<Emp_ID>408351</Emp_ID>
<Prefix>Drs.</Prefix>
<FName>Diane</FName>
<Initial>I</Initial>
<LName>Evans</LName>
<Gender>F</Gender>
<Email>diane.evans@yahoo.com</Email>
<FatherName>Jason Evans</FatherName>
<MotherName>Michelle Evans</MotherName>
<MotherMaidenName>Allen</MotherMaidenName>
<DateOfBirth>12/4/1977</DateOfBirth>
<TimeOfBirth>2:18:45 AM</TimeOfBirth>
<Age>39.67</Age>
<WeightKG>51</WeightKG>
<HireDate>4/16/1999</HireDate>
<QuarterOfJoining>Q2</QuarterOfJoining>
<HalfOfJoining>H1</HalfOfJoining>
<YearOfJoining>1999</YearOfJoining>
<MonthOfJoining>4</MonthOfJoining>
<MonthNameJoining>April</MonthNameJoining>
<ShortMonth>Apr</ShortMonth>
<DayOfJoining>16</DayOfJoining>
<DOWJoining>Friday</DOWJoining>
<ShortDOW>Fri</ShortDOW>
<AgeInCompany>18.3</AgeInCompany>
<Salary>180294</Salary>
<LastPayIncrease>1%</LastPayIncrease>
<SSN>314-35-9851</SSN>
<Phone>215-793-6791</Phone>
<PlaceName>Hydetown</PlaceName>
<County>Crawford</County>
<City>Hydetown</City>
<State>PA</State>
<Zip>16328</Zip>
<Region>Northeast</Region>
<UserName>dievans</UserName>
<Password>0gGRtp1HfLr5
</Password>
</employee>
<employee>
<Emp_ID>193819</Emp_ID>
<Prefix>Mr.</Prefix>
<FName>Benjamin</FName>
<Initial>R</Initial>
<LName>Russell</LName>
<Gender>M</Gender>
<Email>benjamin.russell@charter.net</Email>
<FatherName>Gregory Russell</FatherName>
<MotherName>Elizabeth Russell</MotherName>
<MotherMaidenName>Nelson</MotherMaidenName>
<DateOfBirth>4/17/1977</DateOfBirth>
<TimeOfBirth>5:41:11 PM</TimeOfBirth>
<Age>40.31</Age>
<WeightKG>58</WeightKG>
<HireDate>7/25/2013</HireDate>
<QuarterOfJoining>Q3</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2013</YearOfJoining>
<MonthOfJoining>7</MonthOfJoining>
<MonthNameJoining>July</MonthNameJoining>
<ShortMonth>Jul</ShortMonth>
<DayOfJoining>25</DayOfJoining>
<DOWJoining>Thursday</DOWJoining>
<ShortDOW>Thu</ShortDOW>
<AgeInCompany>4.01</AgeInCompany>
<Salary>117642</Salary>
<LastPayIncrease>13%</LastPayIncrease>
<SSN>121-98-7248</SSN>
<Phone>262-404-2252</Phone>
<PlaceName>Fremont</PlaceName>
<County>Waupaca</County>
<City>Fremont</City>
<State>WI</State>
<Zip>54940</Zip>
<Region>Midwest</Region>
<UserName>brrussell</UserName>
<Password>RdY8cp!@R;*%F
</Password>
</employee>
<employee>
<Emp_ID>499687</Emp_ID>
<Prefix>Mr.</Prefix>
<FName>Patrick</FName>
<Initial>F</Initial>
<LName>Bailey</LName>
<Gender>M</Gender>
<Email>patrick.bailey@aol.com</Email>
<FatherName>Ralph Bailey</FatherName>
<MotherName>Laura Bailey</MotherName>
<MotherMaidenName>Henderson</MotherMaidenName>
<DateOfBirth>9/27/1982</DateOfBirth>
<TimeOfBirth>1:12:41 PM</TimeOfBirth>
<Age>34.86</Age>
<WeightKG>58</WeightKG>
<HireDate>7/22/2005</HireDate>
<QuarterOfJoining>Q3</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2005</YearOfJoining>
<MonthOfJoining>7</MonthOfJoining>
<MonthNameJoining>July</MonthNameJoining>
<ShortMonth>Jul</ShortMonth>
<DayOfJoining>22</DayOfJoining>
<DOWJoining>Friday</DOWJoining>
<ShortDOW>Fri</ShortDOW>
<AgeInCompany>12.02</AgeInCompany>
<Salary>72305</Salary>
<LastPayIncrease>5%</LastPayIncrease>
<SSN>439-99-7721</SSN>
<Phone>319-812-6957</Phone>
<PlaceName>Macksburg</PlaceName>
<County>Madison</County>
<City>Macksburg</City>
<State>IA</State>
<Zip>50155</Zip>
<Region>Midwest</Region>
<UserName>pfbailey</UserName>
<Password>K755aY/*</Password>
</employee>
<employee>
<Emp_ID>539712</Emp_ID>
<Prefix>Ms.</Prefix>
<FName>Nancy</FName>
<Initial>T</Initial>
<LName>Baker</LName>
<Gender>F</Gender>
<Email>nancy.baker@bp.com</Email>
<FatherName>Scott Baker</FatherName>
<MotherName>Judy Baker</MotherName>
<MotherMaidenName>Thomas</MotherMaidenName>
<DateOfBirth>6/13/1995</DateOfBirth>
<TimeOfBirth>8:56:32 PM</TimeOfBirth>
<Age>22.14</Age>
<WeightKG>50</WeightKG>
<HireDate>9/14/2016</HireDate>
<QuarterOfJoining>Q3</QuarterOfJoining>
<HalfOfJoining>H2</HalfOfJoining>
<YearOfJoining>2016</YearOfJoining>
<MonthOfJoining>9</MonthOfJoining>
<MonthNameJoining>September</MonthNameJoining>
<ShortMonth>Sep</ShortMonth>
<DayOfJoining>14</DayOfJoining>
<DOWJoining>Wednesday</DOWJoining>
<ShortDOW>Wed</ShortDOW>
<AgeInCompany>0.87</AgeInCompany>
<Salary>98189</Salary>
<LastPayIncrease>0%</LastPayIncrease>
<SSN>641-29-2071</SSN>
<Phone>229-336-5117</Phone>
<PlaceName>Atlanta</PlaceName>
<County>Fulton</County>
<City>Atlanta</City>
<State>GA</State>
<Zip>30334</Zip>
<Region>South</Region>
<UserName>ntbaker</UserName>
<Password>xJdKlAcYQhT_BE#</Password>
</employee>
<employee>
<Emp_ID>380086</Emp_ID>
<Prefix>Mrs.</Prefix>
<FName>Carol</FName>
<Initial>V</Initial>
<LName>Murphy</LName>
<Gender>F</Gender>
<Email>carol.murphy@gmail.com</Email>
<FatherName>Eugene Murphy</FatherName>
<MotherName>Katherine Murphy</MotherName>
<MotherMaidenName>Peterson</MotherMaidenName>
<DateOfBirth>6/30/1958</DateOfBirth>
<TimeOfBirth>10:39:33 AM</TimeOfBirth>
<Age>59.12</Age>
<WeightKG>40</WeightKG>
<HireDate>1/28/1983</HireDate>
<QuarterOfJoining>Q1</QuarterOfJoining>
<HalfOfJoining>H1</HalfOfJoining>
<YearOfJoining>1983</YearOfJoining>
<MonthOfJoining>1</MonthOfJoining>
<MonthNameJoining>January</MonthNameJoining>
<ShortMonth>Jan</ShortMonth>
<DayOfJoining>28</DayOfJoining>
<DOWJoining>Friday</DOWJoining>
<ShortDOW>Fri</ShortDOW>
<AgeInCompany>34.52</AgeInCompany>
<Salary>60918</Salary>
<LastPayIncrease>20%</LastPayIncrease>
<SSN>423-67-7023</SSN>
<Phone>216-336-0009</Phone>
<PlaceName>Blanchester</PlaceName>
<County>Clinton</County>
<City>Blanchester</City>
<State>OH</State>
<Zip>45107</Zip>
<Region>Midwest</Region>
<UserName>cvmurphy</UserName>
<Password>Uc+VG%vuZU5k
</Password>
</employee>
<employee>
<Emp_ID>477616</Emp_ID>
<Prefix>Hon.</Prefix>
<FName>Frances</FName>
<Initial>B</Initial>
<LName>Young</LName>
<Gender>F</Gender>
<Email>frances.young@gmail.com</Email>
<FatherName>Fred Young</FatherName>
<MotherName>Lillian Young</MotherName>
<MotherMaidenName>Diaz</MotherMaidenName>
<DateOfBirth>6/9/1959</DateOfBirth>
<TimeOfBirth>4:38:47 PM</TimeOfBirth>
<Age>58.18</Age>
<WeightKG>42</WeightKG>
<HireDate>4/27/1994</HireDate>
<QuarterOfJoining>Q2</QuarterOfJoining>
<HalfOfJoining>H1</HalfOfJoining>
<YearOfJoining>1994</YearOfJoining>
<MonthOfJoining>4</MonthOfJoining>
<MonthNameJoining>April</MonthNameJoining>
<ShortMonth>Apr</ShortMonth>
<DayOfJoining>27</DayOfJoining>
<DOWJoining>Wednesday</DOWJoining>
<ShortDOW>Wed</ShortDOW>
<AgeInCompany>23.27</AgeInCompany>
<Salary>121587</Salary>
<LastPayIncrease>28%</LastPayIncrease>
<SSN>028-92-8912</SSN>
<Phone>210-819-9765</Phone>
<PlaceName>Delmita</PlaceName>
<County>Starr</County>
<City>Delmita</City>
<State>TX</State>
<Zip>78536</Zip>
<Region>South</Region>
<UserName>fbyoung</UserName>
<Password>K}^USc0l7[A</Password>
</employee>
<employee>
<Emp_ID>162402</Emp_ID>
<Prefix>Hon.</Prefix>
<FName>Diana</FName>
<Initial>T</Initial>
<LName>Peterson</LName>
<Gender>F</Gender>
<Email>diana.peterson@hotmail.co.uk</Email>
<FatherName>Jonathan Peterson</FatherName>
<MotherName>Christina Peterson</MotherName>
<MotherMaidenName>Ross</MotherMaidenName>
<DateOfBirth>11/13/1987</DateOfBirth>
<TimeOfBirth>3:59:26 AM</TimeOfBirth>
<Age>29.73</Age>
<WeightKG>60</WeightKG>
<HireDate>2/17/2014</HireDate>
<QuarterOfJoining>Q1</QuarterOfJoining>
<HalfOfJoining>H1</HalfOfJoining>
<YearOfJoining>2014</YearOfJoining>
<MonthOfJoining>2</MonthOfJoining>
<MonthNameJoining>February</MonthNameJoining>
<ShortMonth>Feb</ShortMonth>
<DayOfJoining>17</DayOfJoining>
<DOWJoining>Monday</DOWJoining>
<ShortDOW>Mon</ShortDOW>
<AgeInCompany>3.44</AgeInCompany>
<Salary>43010</Salary>
<LastPayIncrease>4%</LastPayIncrease>
<SSN>512-33-6767</SSN>
<Phone>479-783-5656</Phone>
<PlaceName>Eureka Springs</PlaceName>
<County>Carroll</County>
<City>Eureka Springs</City>
<State>AR</State>
<Zip>72632</Zip>
<Region>South</Region>
<UserName>dtpeterson</UserName>
<Password>3o8>v3tYxjyEAo</Password>
</employee>
</EmployeeRecords>
我拥有的xsl代码是
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>Employee Records</title>
</head>
<body>
<h1>Employee Records</h1>
<table border="1">
<tr bgcolor="#00b3b" >
<th>Employee_ID</th>
<th>Prefix</th>
<th>FName</th>
<th>Initial</th>
<th>LName</th>
<th>Gender</th>
<th>Email</th>
<th>FatherName</th>
<th>MotherName</th>
<th>MotherMaidenName</th>
<th>DateOfBirth</th>
<th>TimeOfBirth</th>
<th>Age</th>
<th>WeightKG</th>
<th>HireDate</th>
<th>QuarterOfJoining</th>
<th>HalfOfJoining</th>
<th>YearOfJoining</th>
<th>MonthOfJoining</th>
<th>MonthNameJoining</th>
<th>ShortMonth</th>
<th>DayOfJoining</th>
<th>DOWJoining</th>
<th>ShortDOW</th>
<th>AgeInCompany </th>
<th>Salary</th>
<th>LastPayIncrease</th>
<th>SSN</th>
<th>Phone</th>
<th>PlaceName</th>
<th>County</th>
<th>City</th>
<th>State </th>
<th>Zip</th>
<th>Region</th>
<th>UserName</th>
<th>Password</th>
</tr>
<xsl:for-each select="Employee">
<tr>
<td>
<xsl:value-of select="Employee_ID"/>
</td>
<td>
<xsl:value-of select="Prefix"/>
</td>
<td>
<xsl:value-of select="FName"/>
</td>
<td>
<xsl:value-of select="Initial"/>
</td>
<td>
<xsl:value-of select="LName"/>
</td>
<td>
<xsl:value-of select="Gender"/>
</td>
<td>
<xsl:value-of select="Email"/>
</td>
<td>
<xsl:value-of select="FatherName"/>
</td>
<td>
<xsl:value-of select="MotherName"/>
</td>
<td>
<xsl:value-of select="MotherMaidenName"/>
</td>
<td>
<xsl:value-of select="DateOfBirth"/>
</td>
<td>
<xsl:value-of select="TimeOfBirth"/>
</td>
<td>
<xsl:value-of select="Age"/>
</td>
<td>
<xsl:value-of select="WeightKG"/>
</td>
<td>
<xsl:value-of select="HireDate"/>
</td>
<td>
<xsl:value-of select="QuarterOfJoining"/>
</td>
<td>
<xsl:value-of select="HalfOfJoining"/>
</td>
<td>
<xsl:value-of select="YearOfJoining"/>
</td>
<td>
<xsl:value-of select="MonthOfJoining"/>
</td>
<td>
<xsl:value-of select="MonthName"/>
</td>
<td>
<xsl:value-of select="ShortMonth"/>
</td>
<td>
<xsl:value-of select="DayOfJoining"/>
</td>
<td>
<xsl:value-of select="DOWJoining"/>
</td>
<td>
<xsl:value-of select="ShortDOW"/>
</td>
<td>
<xsl:value-of select="AgeInCompany"/>
</td>
<td>
<xsl:value-of select="Salary"/>
</td>
<td>
<xsl:value-of select="LastPayIncrease"/>
</td>
<td>
<xsl:value-of select="SSN"/>
</td>
<td>
<xsl:value-of select="Phone"/>
</td>
<td>
<xsl:value-of select="PlaceName"/>
</td>
<td>
<xsl:value-of select="County"/>
</td>
<td>
<xsl:value-of select="City"/>
</td>
<td>
<xsl:value-of select="State"/>
</td>
<td>
<xsl:value-of select="Zip"/>
</td>
<td>
<xsl:value-of select="Region"/>
</td>
<td>
<xsl:value-of select="UserName"/>
</td>
<td>
<xsl:value-of select="Password"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
同样,文档经过验证但未显示。我看不到丢失的内容,也不知道为什么无法正确显示。