An XML stand for Extensible Markup Language which allows users to define own tags and is specially used to store and transport data. As per requirement for the assignment an xml website has been created using five document type definition (dtd) and five xml schema definition (xsd). The website is created for and assumed certification training provider (Shrestha Technologies).
Website Structure
This website consisted of ten xml documents. Five xsd documents have been used to define five xml pages where as both internal dtd and external dtd are used to define remaining five xml files. Ten different xsl files are used to present them in browser using one cascading style sheet. The s ructure of website is as follows:
Webpage Details
The website consists of ten different web pages which are as follows:
Home
Home.xml uses internal dtd
XML Tree
Elements
<!DOCTYPE home[
<!ELEMENT home (content)+>
<!ELEMENT content (title, description)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT description (#PCDATA)>
]>
Courses
Courses.xml uses external xls file.
XML Tree
XSD File
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="coursefees">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="course" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="price" type="xsd:integer"/>
<xsd:element name="duration" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Microsoft
XML Tree
XSD File
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="microsoftCertification">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="content" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="image" type="xsd:string"/>
<xsd:element name="information" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="duration" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Cisco
Cisco.xml uses internal dtd.
XML Tree
Elements
<!DOCTYPE cisco[
<!ELEMENT title (#PCDATA)>
<!ELEMENT information (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT duration (#PCDATA)>
<!ELEMENT content (title, information, description, duration)>
<!ELEMENT cisco (content)+>
]>
RedHat
Redhat uses external dtd file name redhat.dtd.
Xml Tree
Elements
<!ELEMENT title (#PCDATA)>
<!ELEMENT information (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT duration (#PCDATA)>
<!ELEMENT content (title, information, description, duration)>
<!ELEMENT redhat (content)+>
Course Fees
Uses external XSD file courses.xsd
Xml Tree
XSD File
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="coursefees">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="course" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="price" type="xsd:integer"/>
<xsd:element name="duration" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Career
Career.xml file uses career.xsd file for