Professional Documents
Culture Documents
WT P3
WT P3
Prog1.xml
<organization>
<org_details>
<org_name>EvolvingX Pvt.Ltd.</org_name>
</org_details>
<department>
<dept_name>Department : Administration</dept_name>
<employee>
<sr_no>1.</sr_no>
<first_name> Samuel</first_name>
<last_name> Akhade</last_name>
<age> 31</age>
<phno> 3456781239</phno>
<salary> 25000</salary>
</employee>
<employee>
<sr_no>2.</sr_no>
<first_name> John</first_name>
<last_name> Samson</last_name>
<age> 30</age>
<phno> 8134567239</phno>
<salary> 27000</salary>
</employee>
</department>
<department>
<dept_name>Department : Accounts</dept_name>
<employee>
<sr_no>1.</sr_no>
<first_name> Bob</first_name>
<last_name> Fernandes</last_name>
<age> 28</age>
<phno> 3784561239</phno>
<salary> 28000</salary>
</employee>
<employee>
<sr_no>2.</sr_no>
<first_name> Alice</first_name>
<last_name> Lopez</last_name>
<age> 32</age>
<phno> 4567238139</phno>
<salary> 30000</salary>
</employee>
</department>
<department>
<dept_name>Department : Management</dept_name>
<employee>
<sr_no>1.</sr_no>
<first_name> Kishor</first_name>
<last_name> Bansode</last_name>
<age> 40</age>
<phno> 9456781239</phno>
<salary> 36000</salary>
</employee>
<employee>
<sr_no>2.</sr_no>
<first_name> Pradeep</first_name>
<last_name> Lokhande</last_name>
<age> 39</age>
<phno> 9735167239</phno>
<salary> 34500</salary>
</employee>
</department>
</organization>
prog1.css
organization{
org_details > *{
color : red;
font-size: 30px;
text-align: center;
display: block;
padding: 5px;
margin: 5px;
objective{
font-size: 16px;
padding: 2px;
margin: 5px;
employee{
dept_name{
font-size: 32px;
text-decoration: underline;
color: blue;
department{
font-size: 30px;
display: block;
margin : 10px;
employee > *{
display: block;
font-size: 23px;
department{
name{
text-decoration: underline;
}
Prog1.xsl
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Employee Details</h2>
<table border="1">
<tr>
<th>Sr. No.</th>
<th>First Name</th>
<th>Last name</th>
<th>Age</th>
<th>Phone Number</th>
<th>Salary</th>
</tr>
<xsl:for-each select="organization/department/employee">
<tr>
<td><xsl:value-of select="sr_no"/></td>
<td><xsl:value-of select="first_name"/></td>
<td><xsl:value-of select="last_name"/></td>
<td><xsl:value-of select="age"/></td>
<td><xsl:value-of select="phno"/></td>
<td><xsl:value-of select="salary"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output :