Added codes and softcopy.
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE employees [
|
||||
<!ELEMENT employees (employee+)>
|
||||
<!ELEMENT employee (id, name, position, department, salary)>
|
||||
<!ELEMENT id (#PCDATA)>
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
<!ELEMENT position (#PCDATA)>
|
||||
<!ELEMENT department (#PCDATA)>
|
||||
<!ELEMENT salary (#PCDATA)>
|
||||
]>
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="employees.xsl"?>
|
||||
<employees>
|
||||
<employee>
|
||||
<id>1</id>
|
||||
<name>Kshitij K</name>
|
||||
<position>DevOps Engineer</position>
|
||||
<department>IT</department>
|
||||
<salary>6000000</salary>
|
||||
</employee>
|
||||
<employee>
|
||||
<id>2</id>
|
||||
<name>Ayush Kalas</name>
|
||||
<position>Project Manager</position>
|
||||
<department>IT</department>
|
||||
<salary>8000</salary>
|
||||
</employee>
|
||||
<employee>
|
||||
<id>3</id>
|
||||
<name>Ombase</name>
|
||||
<position>Frontend Developer</position>
|
||||
<department>IT</department>
|
||||
<salary>500</salary>
|
||||
</employee>
|
||||
</employees>
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="employees">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="employee" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="id" type="xs:integer"/>
|
||||
<xs:element name="name" type="xs:string"/>
|
||||
<xs:element name="position" type="xs:string"/>
|
||||
<xs:element name="department" type="xs:string"/>
|
||||
<xs:element name="salary" type="xs:decimal"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>Employee List</title>
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Employee List</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Department</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
<xsl:for-each select="employees/employee">
|
||||
<tr>
|
||||
<td><xsl:value-of select="id"/></td>
|
||||
<td><xsl:value-of select="name"/></td>
|
||||
<td><xsl:value-of select="position"/></td>
|
||||
<td><xsl:value-of select="department"/></td>
|
||||
<td><xsl:value-of select="salary"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Employee List</title>
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Employee List</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Department</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Kshitij K</td>
|
||||
<td>DevOps Engineer</td>
|
||||
<td>IT</td>
|
||||
<td>6000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Ayush Kalas</td>
|
||||
<td>Project Manager</td>
|
||||
<td>IT</td>
|
||||
<td>8000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Ombase</td>
|
||||
<td>Frontend Developer</td>
|
||||
<td>IT</td>
|
||||
<td>500</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user