Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2013, 12:48 PM
Registered User
 
Join Date: May 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please help me on xslt grouping with table

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT 1. 0 Grouping by two attributes and creating table Narendra.Patil XSLT 29 March 5th, 2012 10:39 AM
XSLT grouping - need help Half-Saint XSLT 9 January 23rd, 2009 11:10 AM
Grouping with XSLT 1.0 rodmcleay XSLT 1 January 14th, 2008 11:42 PM
XSLT Grouping vernc XSLT 2 October 2nd, 2007 03:59 AM
XSLT 1.0 Grouping kwilliams XSLT 0 January 11th, 2006 06:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.