CSE 5th Semester - Web Technologies Laboratory - CCS375 - Lab Manual
CSE 5th Semester - Web Technologies Laboratory - CCS375 - Lab Manual
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester
4th Semester
- MA3151 MA3251 Computer Organization
1st Semester
2nd Semester
8th Semester
6th Semester
Lab Manual
Prepared By,
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 1 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
AIM:
1. To Create a web page with the following using HTML.
• To embed an image map in a web page.
• To fix the hot spots.
• Show all the related information when the hot spots are clicked.
ALGORITHM:
• Create a html file with map tag.
• Set the source attribute of the img tag to the location of the image and also set the use map
attribute.
• Specify an area with name, shape and href set of the appropriate value.
• Repeat step3 as many hot spots you want to put in the map.
• Create html file for each and every hot spots the user will select the particular location it shows
information about it.
PROGRAM:
/*mapping.html*/
<html>
<head>
<title>India Map</title>
<head>
<body bgcolor="PINK">
<font face="Monotype Corsiva" color="BLUE" size="6">
<marquee direction="left" behavior="alternate">INDIA MAP
</marquee>
</font>
<hr size="6" color="RED">
<map name="pagemap">
<area shape="rect" coords="194,151,247,219" href="map1.html">
<area shape="rect" coords="291,268,384,337" href="map2.html">
<area shape="rect" coords="100,337,197,384" href="map3.html">
<area shape="rect" coords="236,543,344,577" href="map4.html">
</map>
<img src="india.bmp" usemap="#pagemap">
</body>
<font color="#ff0000" size="5">
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 2 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
/*map2.html*/
<html>
<body bgcolor="SKYBLUE">
<font face="Times New Roman" size="18" color="RED">
<center><b><i>Calcutta is the wealthy city in WEST BENGAL<br> and <br>it
has Famous"Sunderbans Forests"</i></b></center>
<a href="mapping.html">Home Page</a>
</font></body></html>
/*map3.html*/
<html>
<body bgcolor="DARKGREEN">
<font face="Times New Roman" size="12" color="RED">
<center>MUMBAI is the capital of Maharashtra<br> and <br>it has
Famous IndiaGate</center>
<a href="mapping.html">Home Page</a>
</font>
</body>
</html>
/*map4.html*/
<html>
<body bgcolor="BLACK">
<font face="Times New Roman" size="12" color="RED">
<center>Chennai is hte capital of Tamil Nadu<br> and <br>More IT companies
are camped at Chennai</center>
<a href="mapping.html">Home Page</a>
</font></body></html>
OUTPUT:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 3 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
RESULT: Thus creation of an webpage using cascading style sheet has been developed successfully.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 4 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Map Example</title>
<style>
#map-container {
position: relative;
}
#info-box {
position: absolute;
top: 10px;
left: 10px;
padding: 10px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
display: none;
}
</style>
</head>
<body>
<div id="map-container">
<img src="c:\Users\A\Downloads\example-map-image.jpg" alt="Example Image Map"
usemap="#hotspots">
<map name="hotspots">
<!-- Define hot spots with coordinates -->
<area shape="rect" coords="10,10,100,100" alt="Hotspot 1" onclick="showInfo('Hotspot 1
Information')">
<area shape="circle" coords="150,150,50" alt="Hotspot 2" onclick="showInfo('Hotspot 2
Information')">
<area shape="poly" coords="300,10,400,50,350,100" alt="Hotspot 3"
onclick="showInfo('Hotspot 3 Information')">
</map>
</div>
<div id="info-box"></div>
<script>
function showInfo(info) {
// Display related information in the info-box
var infoBox = document.getElementById("info-box");
infoBox.innerHTML = info;
infoBox.style.display = "block";
}
</script>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 5 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
</body>
</html>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 6 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
AIM:
To create a webpage with the following using html to embedded the style sheet
ALGORITHM:
Step1: Create html file with the style tag, inside head tag.
Step2: Set the style such as font-family, font-size, color, left etc, for
the headingh1,h2,…h6 and respectively.
Step3: Close the head tag.
Step4: Specify the heading and information required inside
the body tag.Step5: Close the opened tag.
PROGRAM:
<! DOCTYPE html >
<html xmlns="http://www.w3org/1999/xhtml">
<head>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 7 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
<style type="text/css">
h1
{
font-family:arial;
color:green;
}
h2
font-family:arial;
color:red;
left:20px;
}
h3
font-family:arial;
color:blue;
}
font-sise:14pt;
font-family:verdana;
</style>
</head>
<body>
<h1>
<center>This is created using embedded style sheet
</center>
</h1>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 8 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
</h2>
<p>
<h3>
</h3>
</body>
</html>
OUTPUT:
(ii) To Create a web page that displays college information using various style
sheets.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 9 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>College Information</title>
header {
background-color: #c683d7;
color: white;
text-align: center;
padding: 1em;
}
section {
margin: 20px;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
}
p{
line-height: 1.6;
color: #666;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 1em;
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 10 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
position: fixed;
bottom: 0;
width: 100%;
}
</style>
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 8px;
}
</style>
<header>
<h1> Grace College Information</h1>
</header>
<section>
<h2>About Us</h2>
<p>Welcome to our college! We are committed to providing quality education
and fostering a supportive learning environment.</p>
</section>
<section>
<h2>Courses Offered</h2>
<ul>
<li>CSE</li>
<li>EEE</li>
<li>ECE</li>
<li>B.Tech: AI-DS</li>
<li>CIVIL</li>
<li>MECH</li>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 11 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
</ul>
</section>
<section>
<h2>Contact Information</h2>
<p>Email: [email protected]</p>
<p>Phone: +91 9585511757</p>
<p>Website:www.gracecoe.org</p>
</section>
<footer>
© 2023 College Information
</footer>
</body>
</html>
Output:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 12 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
RESULT:Thus creation of an webpage using cascading style sheet has beendeveloped successfully.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 13 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
AIM:
ALGORITHM:
Step1:Start the program.
Step2: Define the title within the tag.
Step3: Give the script type within the script tag.
Step4: Validate each and every column as the box with the if condition.
Step5: If empty value are given or the block term are next then it is verified
with certaincondition.
Step6:If values is empty then a message is been displayed.
Step7: Form is designed with GUI tool is description.
Step8: All buttons are processed accordingly.
Step9: Stop the program.
PROGRAM:
//Webforms.html
<html>
<head>
<script type='text/javascript'>
function formValidator()
{
var firstname=document.getElementById('firstname');
var lastname=document.getElementById('lastname');
var addr=document.getElementById('addr');
var zip=document.getElementById('zip');
var Countries=document.getElementById('Countries');
var username=document.getElementById('username');
var email=document.getElementById('email');
var dd=document.getElementById('dd');
var mm=document.getElementById('mm');
var yyyy=document.getElementById('yyyy');
var comment=document.getElementById('comment');
var password=document.getElementById('password');
if(isAlphabet(firstname,"Please enter only letters for your First name"))
{
if(isAlphabet(lastname,"Please enter only letters for your Last name"))
{
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 14 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 15 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
}
function isAlphabet(elem,helperMsg)
{
var alphaExp=/^[a-zA-Z]+$/; if(elem.value.match(alphaExp))
{
return true;
}
else
{
alert(helperMsg);
elem.focus();
return false;
}
}
function isAlphanumeric(elem,helperMsg)
{
var alphaExp=/^[0-9, a-z a-z, 0-9, A-Z A-Z, - 0-9 . ]+$/;
if(elem.value.match(alphaExp))
{
return true;
}
else
{
alert(helperMsg);elem.focus(); return false;
}
}
function lengthRestriction(elem,min,max)
{
var unput=elem.value;
if(unput.length>=min&&unput.length<=max)
{
return true;
}
else
{
alert("Please enter between "+min+" and "+max+" charactters");
elem.focus();
return false;
}
}
function madeSelection(elem,helperMsg)
{
if(elem.value=="Please Choose")
{
alert(helperMsg);elem.focus(); return false;
}
else
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 16 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
{
return true;
}
}
function emailValidator(elem,helperMsg)
{
var emailExp=/^[0-9 a-z . a-z 0-9]+\@[a-z]+\.[a-z]{2,4}$/;
if(elem.value.match(emailExp))
{
return true;
}
else
{
alert(helperMsg);elem.focus(); return false;
}
}
</script>
<h1><center><b>
<font color="#347235">Please Enter YourDetails</font></b></center>
</h1>
</head>
<body bgcolor="LIGHTGREEN">
<hr>
<form onsubmit='return formValidator()' height="50%">
<table height="50%" border="3pt" align="center">
<tr><td><b>
<font color="#347235">First Name:</font></b></td>
<td><input type='text' id='firstname'/></td></tr><br />
<tr><td><b>
<font color="#347235">Last Name:</font></b></td>
<td><input type='text' id='lastname'/></td></tr><br />
<tr><td><b>
<font color="347235">Date of Birth(dd/mm/yyyy):</font></b></td>
<td><input type='text' id='dd' />
<select id='mm'>
<option>Please Choose</option>
<option value="1">Jan</option>
<option value="2">Feb</option>
<option value="3">Mar</option>
<option value="4">Apr</option>
<option value="5">May</option>
<option value="6">Jun</option>
<option value="7">Jul</option>
<option value="8">Aug</option>
<option value="9">Sep</option>
<option value="10">Oct</option>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 17 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
<option value="11">Nov</option>
<option value="12">Dec</option>
</select>
<input type='text' id='yyyy' /></td></tr><br />
<tr><td><b>
<font color="#347235">Address:</font></b></td>
<td><input type='text' id='addr'/></td></tr><br />
<tr><td><b>
<font color="#347235">Zip code:</font></b></td>
<td><input type='text' id='zip'/></td></tr><br />
<tr><td><b>
<font color="#347235">Countries:</font></b></td>
<td><select id='Countries'>
<option>Please Choose</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="America">America</option>
<option value="India">India</option>
<option value="Tanzania">Tanzania</option>
<option value="Zimbabwe">Zimbabwe</option>
<option value="Switzerland">Switzerland</option>
</select></td></tr><br />
<tr><td><b>
<font color="#347235">Username(6-8 characters):</font></b></td>
<td><input type='text' id='username' /></td></tr><br />
<tr><td><b><font color="#347235">Password:</font></b></td>
<td><input type='password' id='password' /></td></tr><br />
<tr><td><b><font color="#347235">Email:</font></b></td>
<td><input type='text' id='email' /></td></tr><br />
<tr><td><b>
<font color="#347235">Comment:</font></b></td>
<td><textarea id='comment'cols="20"rows="5"
name="Address"></textarea></td></tr><br />
<tr><td><input type='submit' value='Check Form' /></td></tr>
</table>
</form>
</body>
</html>
OUTPUT:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 18 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
Apply validation
RESULT:Thus developing client side scripts for validating web from controls usingDHTML has been
verified.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 19 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
AIM
Step1: In html program, define the html, head and title tag.
Step2: Then the title is Student Information Form and close the title and head tag.
Step3: Define the body tag inside the body tag create form and table simultaneously.
Step4: The table consists of following information Roll no, Student name, Address, Phone no
Step5: In the servlet program, import the summary package and create a ownservlet class
Step7: Create the object and for print writer and get writer() value.
Step9: Create objects for string method and it is displayed another object value
received get parameter of name received and displayed the value received
value.
PROGRAM:
//index.jsp
<html>
<head>
<title>Processing get requests with data</title>
</head>
<body>
<form action = "Servlet3" method = "get">
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 20 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
//Servlet3.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Servlet3 extends HttpServlet
{
protected void doGet(HttpServletRequest request, HttpServletResponseresponse)
throws ServletException, IOException
{
String firstName = request.getParameter( "firstname" );
response.setContentType( "text/html" );
PrintWriter out = response.getWriter();
// send XHTML document to client
// start XHTML documentout.println( "<html>" );
// head section of documentout.println( "<head>" );
out.println("<title>Processing get requests with data</title>" );
out.println( "</head>" );
// body section of document out.println( "<body>" );
out.println( "<h1>Hello " + firstName + ",<br />" );
out.println( "Welcome to Servlets!</h1>" );
out.println( "</body>" );
// end XHTML document
out.println( "</html>" );
out.close(); // close stream to complete the page
}
public String
getServletInfo() {
return "Short
description";
}
}
Program (ii)
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 21 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
Session tracking
GfgSession.java
// Java Program to Illustrate Creation and last-accessed
// Times for a Session
// Import required java libraries
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 22 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
response.setContentType("text/html");
PrintWriter out = response.getWriter();
"<tr>\n"
+ " <td>id</td>\n"
+ " <td>" + session.getId() + "</td>"
+ "</tr>\n"
+
"<tr>\n"
+ " <td>Creation Time</td>\n"
+ " <td>" + createTime + " </td>"
+ "</tr>\n"
+
"<tr>\n"
+ " <td>Time of Last Access</td>\n"
+ " <td>" + lastAccessTime + "</td>"
+ "</tr>\n"
+
"<tr>\n"
+ " <td>User ID</td>\n"
+ " <td>" + userID + "</td>"
+ "</tr>\n"
+
"<tr>\n"
+ " <td>Number of visits</td>\n"
+ " <td>" + visitCount + "</td>"
+ "</tr>\n"
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 23 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
+ "</table>\n"
+ "</body>"
+ "</html>");
}
}
web.xml
<web-app>
<servlet>
<servlet-name>GfgSession</servlet-name>
<servlet-class>GfgSession</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GfgSession</servlet-name>
<url-pattern>/GfgSession</url-pattern>
</servlet-mapping>
</web-app>
OUTPUT:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 24 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
RESULT:Thus the invocation of servlet from HTML from has been developed
successfully.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 25 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
AIM:
To write a java servlet program to conduct online examination and to
display student mark list available in a database.
ALGORITHM:
Step1: Create a html file with form tag.
Step2: The form tag action=”http://localhost:8080/example/servlet/exam”.
Step3: Create a two textbox(name & seat number).
Step4: The 5 question are defined into true or false model and close the all tags.
Step5: Import the necessary packages and declare class, class name in exam.
Step6: Declare the connection, statement and result set object.
Step7: Use the deposit () for check the connection in JDBC:ODBC driver.
Step8: The data are inserting into corresponding table.
Step9: The execute update () are update the database.
Step10: Display the table in after html file compilation.
PROGRAM:
//index.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome to Online Examination!!!!</title>
</head>
<body>
Welcome to Online Examination!!!!
<form action="exam" method="get">
<label><p> Enter Your name Please!!<br/> <input type="text"name="name"/>
<br/>
<input type="submit" name="SUBMIT"/>
</p></label>
</form>
</body>
</html>
//exam.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 26 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 27 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
out.println("<hr>");
out.println("<input type=submit value=Done>");
out.println("</form>");
out.println("</body>");
out.println("</html>");
}
public String getServletInfo() { return "A Servlet of the user";
}
}
//exam2.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class exam2 extends HttpServlet
{
protected void doGet(HttpServletRequest request, HttpServletResponseresponse)
throws ServletException, IOException
{
int count=0,j; response.setContentType("text/html");
PrintWriter out=response.getWriter();
String q1=request.getParameter("q1");
String q2=request.getParameter("q2");
String q3=request.getParameter("q3");
String q4=request.getParameter("q4");
String q5=request.getParameter("q5");
if(q1.equals("1"))
{
count=count+1;
}
if(q2.equals("1"))
{
count=count+1;
}
if(q3.equals("1"))
{
count=count+1;
}
if(q4.equals("1"))
{
count=count+1;
}
if(q5.equals("1"))
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 28 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
{
count=count+1;
}
out.println("<html>");
out.println("<head><title>Examination Results</title></head>");
out.println("<body>");
out.println("<h2 align=center<Online Examination</h2><hr>");
out.println("<h3>Number of Questions answered correctly:</h3>"+count); if(count>=3)
{
out.println("<hr><h3>Congrats!!! You Have Passed!!!</h3><hr>");
out.println("<h4><b>Try Other Tests!!</b></h4>");
}
else
{
out.println("<hr><h3>Sorry!!! You Have Failed!!!</h3><hr>");
out.println("<h4><b>Try Again:</b></h4>");
}
out.println("</body>");
out.println("</html>");
}
public String getServletInfo() { return "A Servlet of the User";
}
}
RESULT:Thus the creation of three tier application using database and JSP
has been verified successfully.
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 29 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
Ex No : 8
XML SCHEMA FOR STUDENT DETAILS
Date:
To write a program for implementing student information using using XML – Schema –
XSLT/XSL..
ALGORITHM:
Step4:In XSL document create a html file include the student information in
PROGRAM:
//student.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="student.css"?>
<!DOCTYPE student SYSTEM "student.dtd">
<students>
<student>
<sno>801041</sno>
<sname>S.Soundarapandian</sname>
<dob>05/081991</dob>
<address>Neyveli</address>
<m1>80</m1>
<m2>90</m2>
<m3>95</m3>
</student>
<student>
<sno>801049</sno>
<sname>R.Vadivelan</sname>
<dob>22/07/1990</dob>
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 30 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
<address>Pondicherry</address>
<m1>90</m1>
<m2>95</m2>
<m3>80</m3>
</student>
<student>
<sno>801037</sno>
<sname>R.Satheesh</sname>
<dob>21/01/1991</dob>
<address>Kanyakumari</address>
<m1>80</m1>
<m2>90</m2>
<m3>95</m3>
</student>
</students>
//student.css
Student {
background.color:#aabbcc;width:100%;}
Sno { display:block; color:GREEN;
font.size:25pt; } Sname { display:block;
color:BLACK; font.size:20pt; }Dob {
display:block; color:BLUE; font.size:15pt; }
Address { display:block; color:BLUE;
font.size:15pt; }m1 { display:block;
color:BLUE; font.size:15pt; }
m2 { display:block; color:BLUE;
font.size:15pt; }m3 { display:block;
color:BLUE; font.size:15pt;}
//student.dtd`
<?xml version="1.0"?>
<!ELEMENT students (student+)>
<!ELEMENT student (sno,sname,dob,address,m1,m2,m3)>
<!ELEMENT sno (#PCDATA)>
<!ELEMENT sname (#PCDATA)>
<!ELEMENT dob (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT m1 (#PCDATA)>
<!ELEMENT m2 (#PCDATA)>
<!ELEMENT m3 (#PCDATA)>
OUTPUT:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 31 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
RESULT:Thus the creation of XSL document using Xml has been verified
successfully.
EX 7 OUTPUT:
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 32 of 33
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
CCS375_WT
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 33 of 33
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester
4th Semester
- MA3151 MA3251 Computer Organization
1st Semester
2nd Semester
8th Semester
6th Semester