0% found this document useful (0 votes)
9 views2 pages

Assignment 3

Uploaded by

sainaniprem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Assignment 3

Uploaded by

sainaniprem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

K. K. Wagh Institute of Engineering Education and Research, Nashik.

Department of Computer Engineering


Academic Year 2023-24
Course: Web Technology Lab Course Code: 310257

Assignment No. 03

Title s:Designing XML Document for Employee Information Storage and Display
Objective : Design of an XML document to store employee information, along with the
implementation of validation techniques using both DTD and XML Schema

Problem Statement:
The task involves designing an XML document to efficiently store the information of
employees within a business organization. Additionally, the assignment requires the
demonstration of two different methods of ensuring the validity and structure of the
XML document: Document Type Definition (DTD) and XML Schema. Furthermore,
it necessitates the presentation of the stored content in a visually appealing format,
such as tabular, by utilizing CSS/XSL.
Requirements :
a) Design an XML document structure to store employee information including
attributes like name, ID, position, department, and contact details.
b) Develop a DTD file to define the structure and constraints of the XML document.
c) Create an XML Schema to validate the XML document's structure, data types, and
constraints.
d) Implement CSS/XSL to style and transform the XML content into a tabular format for
display.

Theory :
XML (Extensible Markup Language) serves as a versatile tool for structuring and storing data
in a hierarchical format. It allows for the creation of customized tags and attributes to
represent various types of information. XML documents consist of elements, attributes, and
text, organized in a tree-like structure. Elements represent the hierarchical structure of the
data, attributes provide additional information about elements, and text nodes contain the
actual data.

1. Document Type Definition (DTD): DTD is a markup declaration language used to


define the structure and constraints of an XML document. It specifies the elements,
attributes, entities, and their relationships within the document. DTD provides a
simple and concise way to validate XML documents, ensuring that they conform to a
predefined structure. DTD declarations include element declarations, attribute lists,
entity declarations, and notations. It supports basic data types and allows defining
constraints such as element occurrence and attribute values.
2. XML Schema: XML Schema, also known as XSD (XML Schema Definition), is an
XML-based language for defining the structure, data types, and constraints of XML
documents. XML Schema provides more advanced validation capabilities compared
to DTD, including support for namespaces, data typing, keys, and references. It offers
a richer set of data types such as string, integer, date, and complex types like
sequence, choice, and restriction. XML Schema enables precise specification of
element structure, data formats, and validation rules, ensuring greater flexibility and
accuracy in defining XML document schemas.

Explanation :
1. XML Document Design: The XML document will be structured to include elements
such as <employee>, <name>, <id>, <position>, <department>, and <contact>. Each
<employee> element will contain sub-elements representing different attributes of an
employee.
2. DTD Definition: The DTD file will specify the structure of the XML document using
element declarations, attribute lists, and entity definitions. It will enforce rules such as
required elements and data types.
3. XML Schema Creation: The XML Schema will be developed using the XSD syntax
to define the structure, data types, and constraints of the XML document. It will
provide a more robust validation mechanism compared to DTD.
4. CSS/XSL Implementation: CSS will be applied to style the XML content, while XSL
will be utilized to transform the structured data into a tabular format suitable for
display.

Conclusion/analysis :
In conclusion, the assignment involves the design of an XML document to store employee
information, along with the implementation of validation techniques using both DTD and
XML Schema. Additionally, it requires the presentation of the stored data in a tabular format
using CSS/XSL. This exercise not only demonstrates proficiency in XML technologies but
also showcases the ability to structure, validate, and present data effectively in different
formats.

Screen shots :
Program codes with sample output

You might also like