Hello every one I'm a new member and I really need help on the following xml's xslt grouping with table. The xml is as shown below:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="performance3.xsl"?>
<report>
<meta_data>
<company_name>The InSIST School</company_name>
<company_logo>/images/logo.jpg</company_logo>
</meta_data>
<employee employee_name="Mr Ousainou Panneh" position="Teller 1">
<individual_objective description="Engage customer " required_target="10.0" actual_target="2.0" achievement="-8.0">
<kpi name="explain other services to customer" min_value="3" max_value="5.0" value="2.0" updated_on="2013-04-19" status="exceeded"/>
<kpi name="determine compatibility of product to client" min_value="1" max_value="5.0" value="6.0" updated_on="2013-04-19" status="passed"/>
</individual_objective>
<individual_objective description="Engage 40 customers per day" required_target="50.0" actual_target="44.0" achievement="-6.0">
<kpi name="Serve 50 customers per day" min_value="1" max_value="50.0" value="45.0" updated_on="2013-04-19" status="exceeded"/>
</individual_objective>
</employee>
<employee employee_name="Ms Agnes Camara" position="Grade 10 teacher">
<individual_objective description="Utilize student assessment procedures" required_target="10.0" actual_target="-2.5" achievement="-12.5">
<kpi name="increase number of assignments" min_value="5" max_value="8.0" value="2.0" updated_on="2013-04-18" status="exceeded"/>
<kpi name="increase number of field trips" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
</individual_objective>
<individual_objective description="Promote Positive student behaviour" required_target="10.0" actual_target="-2.0" achievement="-12.0">
<kpi name="Creative teaching method" min_value="2" max_value="5.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
<kpi name="create conducive classroom environ" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
</individual_objective>
<individual_objective description="Promote positive student involvement" required_target="10.0" actual_target="-3.33333" achievement="-13.3333">
<kpi name="sensitivity to students ideas" min_value="3" max_value="5.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
<kpi name="acknowledge student achievement and performance" min_value="5" max_value="10.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
<kpi name="create curriculum designs with students input" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
</individual_objective>
<individual_objective description="Study groups" required_target="10.0" actual_target="-6.0" achievement="-16.0">
<kpi name="add students to study groups" min_value="6" max_value="6.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
</individual_objective>
<individual_objective description="utilize a variety of teaching methods" required_target="10.0" actual_target="-3.0" achievement="-13.0">
<kpi name="add an innovative teaching method into curriclum" min_value="3" max_value="5.0" value="0.0" updated_on="2013-04-18" status="exceeded"/>
</individual_objective>
</employee>
<employee employee_name="Mr Lamin Cham" position="Grade Five teacher">
<individual_objective description="Utilize student assessment procedures" required_target="10.0" actual_target="-3.5" achievement="-13.5">
<kpi name="increase number of assignments" min_value="5" max_value="8.0" value="0.0" updated_on="2013-04-10" status="exceeded"/>
<kpi name="increase number of field trips" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-10" status="exceeded"/>
</individual_objective>
<individual_objective description="Promote Positive student behaviour" required_target="10.0" actual_target="-2.0" achievement="-12.0">
<kpi name="Creative teaching method" min_value="2" max_value="5.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
<kpi name="create conducive classroom environ" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
</individual_objective>
<individual_objective description="Promote positive student involvement" required_target="10.0" actual_target="-3.33333" achievement="-13.3333">
<kpi name="sensitivity to students ideas" min_value="3" max_value="5.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
<kpi name="acknowledge student achievement and performance" min_value="5" max_value="10.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
<kpi name="create curriculum designs with students input" min_value="2" max_value="4.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
</individual_objective>
<individual_objective description="Study groups" required_target="10.0" actual_target="-6.0" achievement="-16.0">
<kpi name="add students to study groups" min_value="6" max_value="6.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
</individual_objective>
<individual_objective description="utilize a variety of teaching methods" required_target="10.0" actual_target="-3.0" achievement="-13.0">
<kpi name="add an innovative teaching method into curriclum" min_value="3" max_value="5.0" value="0.0" updated_on="2013-04-11" status="exceeded"/>
</individual_objective>
</employee>
<employee employee_name="teacher Ebrima kani jobe" position="unassigned">
<individual_objective description="test" required_target="100.0" actual_target="0.0" achievement="-100.0">
</individual_objective>
</employee>
</report>
I want an output on html looking like this:
Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Report1</title>
<style type="text/css">
table { empty-cells: show; }
table, td, th
{
border:1px solid cadetblue;
}
table th
{
background-color:cadetblue;
color:white;
}
</style></head>
<body>
<table border="1">
<tr>
<th colspan="2">Employee</th>
<th colspan="4">Individual Objective</th>
<th colspan="6">KPI</th>
</tr>
<tr>
<th>Name</th>
<th>Position</th>
<th>Description</th>
<th>Required Target</th>
<th>Actual Target</th>
<th>Achievement</th>
<th>Name</th>
<th>Min Value</th>
<th>Max Value</th>
<th>Value</th>
<th>Updated On</th>
<th>Status</th>
</tr>
<tr>
<td rowspan="6">Mr Ousainou Paneh</td>
<td rowspan="6">Teller</td>
<td rowspan="6">Attend customers</td>
<td rowspan="6">100/day</td>
<td rowspan="6">69/day</td>
<td rowspan="6">57%</td>
<td>running the biz</td>
<td>30</td>
<td>49</td>
<td>34</td>
<td>june-2012</td>
<td>complete</td>
</tr>
<tr>
<td>running the biz</td>
<td>30</td>
<td>49</td>
<td>34</td>
<td>june-2012</td>
<td>complete</td>
</tr>
<tr>
<td>running the biz</td>
<td>30</td>
<td>49</td>
<td>34</td>
<td>june-2012</td>
<td>complete</td>
</tr>
<tr>
<td>running the biz</td>
<td>30</td>
<td>49</td>
<td>34</td>
<td>june-2012</td>
<td>complete</td>
</tr>
<tr>
<td>running the biz</td>
<td>30</td>
<td>49</td>
<td>34</td>
<td>june-2012</td>
<td>complete</td>
</tr>
</table>
</body>
</html>
Thanks in advance.