Error: Keyword xsl:apply-template may not be used here.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span lang="EN
In the sample xsl codes below, I had a root template and an employee template . As suggeted by the textbook, I added
<span lang="EN <xsl:apply-template select="portfolio/Employee" /> directly above the </table> tag in the root template. However, when opening the xml file, the Error, "Keyword xsl:apply-template may not be used here" popped
up. <br/>
<br/>
Whats wrong with <xsl:apply-template select="portfolio/Employee" />?
How to fix the error? Thanks.
***************************************************************<br/>
<?xml version=1.0 ?><br/>
<xsl:stylesheet version=1.0 xmlns:xsl="http://www.w3.org/1999/XSL/Transform <br/>
<xsl:output method="html" version="4.0"/><br/>
<br/>
<xsl:template match="/ <br/>
<html><head><title>Employee at Freezing Point</title><link href="fs.css" rel="stylesheet" type="text/css" /></head><br/>
<body><br/>
<div id="Page_Data <h1 id="Title Freezing Point Refrigerators</h1><h2 id="Subtitle Staff Information Page This page containds information on the staff of FreezingPoint Regrigerators /div><br/>
<table width="460" border="1" class="etable <br/>
<tr><br/>
<th class="etable" width="100 Employee</th><th class="etable" width="90 Department</th><th class="etable" width="100 Position</th><br/>
<th class="etable" width="80 Phone</th><th class="etable" width="30 Years</th><br/>
<th class="etable" width="50 Status</th><br/>
</tr><br/>
<br/>
<xsl:apply-template select="portfolio/Employee" /><br/>
</table><br/>
</body></html></xsl:template><br/>
<br/>
<span lang="EN <xsl:template match="Employee <br/>
<tr bgcolor="silver <br/>
<td valign="top <center><br/>
Ashman.jpg .................

<hr class="sig Jeffrey

View the full article
 
Back
Top