SlideShare a Scribd company logo
1 of 19
Download to read offline
P a g e | 56




                                                 XML

    1. XML DTD and XML document for bookstore details using internal DTD

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE bookstore[
<!ELEMENT bookstore (book+)>
<!ELEMENT book (title, author+, price, year, description, userreviews*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT userreviews (#PCDATA)>
<!ATTLIST book id CDATA #REQUIRED category CDATA #IMPLIED>
<!ATTLIST title language CDATA "english">
<!ATTLIST price currency CDATA #FIXED "rupees">
<!ENTITY d1 "description on web designing">
<!ENTITY d2 "description on oosd">
<!ENTITY r1 SYSTEM "r1.txt">
<!ENTITY r2 SYSTEM "r2.txt">
]>
<bookstore>
<book id="111" category="Computer Science">
<title language="greek"> Web Designing </title>
<author> sebesta </author>
<author> robert </author>
<price currency="rupees"> 200 </price>
<year> 2000 </year>
<description> &d1; </description>
<userreviews> &r1;</userreviews>
</book>

<book id="112" category="Computer Science">
<title language="english"> OOSD </title>
<author> grady </author>
<author> booch </author>
<price currency="rupees"> 500 </price>
<year> 2003 </year>
<description> &d2; </description>
<userreviews> &r2;</userreviews>
</book>
</bookstore>




M.J.C.E.T                                                                  04-09-8127L
P a g e | 57




M.J.C.E.T   04-09-8127L
P a g e | 58


    2. XML DTD and XML document for bookstore details using external DTD

Bookstore DTD

<!ELEMENT bookstore (book+)>
<!ELEMENT book (title, author+, price, year, description, userreviews*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT userreviews (#PCDATA)>
<!ATTLIST book id CDATA #REQUIRED category CDATA #IMPLIED>
<!ATTLIST title language CDATA "english">
<!ATTLIST price currency CDATA #FIXED "rupees">
<!ENTITY d1 "description on web designing">
<!ENTITY d2 "description on oosd">
<!ENTITY r1 SYSTEM "r1.txt">
<!ENTITY r2 SYSTEM "r2.txt">

Bookstore XML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE bookstore SYSTEM "2bookstore.dtd">
<bookstore>
<book id="111" category="Computer Science">
<title language="greek"> Web Designing </title>
<author> sebesta </author>
<author> robert </author>
<price currency="rupees"> 200 </price>
<year> 2000 </year>
<description> &d1; </description>
<userreviews> &r1;</userreviews>
</book>

<book id="112" category="Computer Science">
<title language="english"> OOSD </title>
<author> grady </author>
<author> booch </author>
<price currency="rupees"> 500 </price>
<year> 2003 </year>
<description> &d2; </description>
<userreviews> &r2;</userreviews>
</book>
</bookstore>




M.J.C.E.T                                                                  04-09-8127L
P a g e | 59




M.J.C.E.T   04-09-8127L
P a g e | 60


     3. XML DTD and XML document for employee details using internal DTD
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE emp_db[
<!ELEMENT emp_db (employee+)>
<!ELEMENT employee (name, salary, age, experience, designation, dept, address, contact_info,
email_id)>
<!ELEMENT name (first, middle?, last)>
<!ELEMENT salary (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT experience (#PCDATA)>
<!ELEMENT designation (#PCDATA)>
<!ELEMENT dept (#PCDATA)>
<!ELEMENT address (flatno, street, city)>
<!ELEMENT contact_info (landline?, mobile+)>
<!ELEMENT email_id (#PCDATA)>
<!ELEMENT first (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ELEMENT flatno (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT landline (#PCDATA)>
<!ELEMENT mobile (#PCDATA)>
<!ATTLIST employee id CDATA #REQUIRED
                      organization CDATA #FIXED "MJCET"
                      gender (male|female) "male">
<!ENTITY ap "Assistant Professor">
<!ENTITY asp "Associated Professor">
]>
<emp_db>
<employee id="101" gender="female">
<name>
<first> Mrs. </first>
<middle> Farheen </middle>
<last> Iqbhal </last>
</name>
<age> 27 </age>
<salary> 45000 </salary>
<designation> &asp; </designation>
<experience> 6 Years </experience>
<dept> C.S.E </dept>
<address>
<flatno> 12345. </flatno>
<street> silver street </street>
<city> Hyderabad </city>
</address>
<contact_info>
<landline> 040-66554433 </landline>


M.J.C.E.T                                                                                04-09-8127L
P a g e | 61


<moblie>+919876543210 </moblie>
</contact_info>
<email_id> Farheen_Iqbhal@gmail.com</email_id>
</employee>
<employee id="102" gender="female">
<name>
<first> Mrs. </first>
<middle> Ambreen </middle>
<last> Rana </last>
</name>
<age> 28 </age>
<salary> 35000 </salary>
<designation> &ap; </designation>
<experience> 4 Years </experience>
<dept> C.S.E </dept>
<address>
<flatno> 54321. </flatno>
<street> sun city</street>
<city> Hyderabad </city>
</address>
<contact_info> <landline> 040-66552233 </landline>
<moblie>+919854231067 </moblie>
</contact_info>
<email_id> Ambreen_rana@Yahoo.com</email_id>
</employee>
</emp_db>




M.J.C.E.T                                            04-09-8127L
P a g e | 62


    4. XML DTD and XML document for employee details using external DTD

EMP-DB DTD

<!ELEMENT emp_db (employee+)>
<!ELEMENT employee (name, salary, age, experience, designation, dept, address, contact_info,
email_id)>
<!ELEMENT name (first, middle?, last)>
<!ELEMENT salary (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT experience (#PCDATA)>
<!ELEMENT designation (#PCDATA)>
<!ELEMENT dept (#PCDATA)>
<!ELEMENT address (flatno, street, city)>
<!ELEMENT contact_info (landline?, mobile+)>
<!ELEMENT email_id (#PCDATA)>
<!ELEMENT first (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ELEMENT flatno (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT landline (#PCDATA)>
<!ELEMENT mobile (#PCDATA)>
<!ATTLIST employee id CDATA #REQUIRED organization CDATA #FIXED "MJCET" gender CDATA "male">
<!ENTITY ap "Assistant Professor">
<!ENTITY asp "Associated Professor">

EMP-DB XML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE emp_db SYSTEM "4empdb.dtd">
<emp_db>
<employee id="101" gender="female">
<name>
<first> Mrs. </first>
<middle> Farheen </middle>
<last> Iqbhal </last>
</name>
<age> 27 </age>
<salary> 45000 </salary>
<designation> &asp; </designation>
<experience> 6 Years </experience>
<dept> C.S.E </dept>
<address>
<flatno> 12345. </flatno>
<street> silver street </street>
<city> Hyderabad </city>


M.J.C.E.T                                                                         04-09-8127L
P a g e | 63


</address>
<contact_info>
<landline> 040-66554433 </landline>
<moblie>+919876543210 </moblie>
</contact_info>
<email_id> Farheen_Iqbhal@gmail.com</email_id>
</employee>

<employee id="102" gender="female">
<name>
<first> Mrs. </first><middle> Ambreen </middle><last> Rana </last>
</name>
<age> 28 </age>
<salary> 35000 </salary>
<designation> &ap; </designation>
<experience> 4 Years </experience>
<dept> C.S.E </dept>
<address>
<flatno> 54321. </flatno><street> sun city</street><city> Hyderabad </city>
</address>
<contact_info>
<landline> 040-66552233 </landline><moblie>+919854231067 </moblie>
</contact_info>
<email_id> Ambreen_rana@Yahoo.com</email_id>
</employee>
</emp_db>




M.J.C.E.T                                                                     04-09-8127L
P a g e | 64


    5. XML Schema and XML document for message details

Message XSD

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://www.messages.org/note"
         elementFormDefault="qualified"
         xmlns="http://www.messages.org/note">

<xsd:element name="note">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element name="to" type="xsd:string" maxOccurs="unbounded"/>
        <xsd: element name="from" type="xsd:string" />
        <xsd: element name="heading" type="xsd:string" />
        <xsd: element name="body" type="xsd:string" />
 </xsd:sequence>
 <xsd: attribute name="id" type="xsd: integer" use="required" />
 <xsd: attribute name="date" type="xsd: date" />
</xsd:complexType>
</xsd:element>

<xsd:element name="messages">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element ref="note" maxOccurs="unbounded"/>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

Message XML

<?xml version="1.0" encoding="utf-8"?>
<messages xmlns="http://www.messages.org/note"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema?-instance"
        xsi:schemaLocation="http://www.message.org/note message.xsd">

<note id="111" date="2011-09-14">
<to> Robert Sebesta </to>
<to> Tanenbaum </to>
<form> Herbert schildt </form>
<heading> Reminder</heading>
<body> Conference Meeting of authors on 5pm tomorrow</body>
</note>

<note id="112">
<to> Kernighan </to>


M.J.C.E.T                                                                   04-09-8127L
P a g e | 65


<form> Ritchie </form>
<heading> Important News </heading>
<body> Tomorrow's meeting is cancelled </body>
</note>

</messages>




M.J.C.E.T                                        04-09-8127L
P a g e | 66


    6. XML Schema and XML document for employee details

EMP XSD

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://www.employee.org/emp"
         elementFormDefault="qualified"
         xmlns="http://www.employee.org/emp">

<xsd:element name="name">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element name="first" type="xsd:string"/>
        <xsd: element name="middle" type="xsd:string" minOccurs="0"/>
        <xsd: element name="last" type="xsd:string"/>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="address">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element name="flatno" type="xsd:string"/>
        <xsd: element name="street" type="xsd:string"/>
        <xsd: element name="city" type="xsd:string"/>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="contact-info">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element name="landline" type="xsd:integer" minOccurs="0"/>
        <xsd: element name="mobile" type="xsd:integer" maxOccurs="unbounded"/>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:simpleType name="agetype">
<xsd:restriction base="xsd:positiveInteger">
        <xsd:minInclusive value="20">
        <xsd:maxInclusive value="65">
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="gendertype">
<xsd:restriction base="xsd:string">
        <xsd:enumeration value="male">


M.J.C.E.T                                                                        04-09-8127L
P a g e | 67


        <xsd:enumeration value="female">
</xsd:restriction>
</xsd:simpleType>

<xsd:element name="employee">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element ref="name"/>
        <xsd: element name="age" type="agetype"/>
        <xsd: element name="salary" type="xsd:integer"/>
        <xsd: element name="designation" type="xsd:string"/>
        <xsd: element name="dept" type="xsd:string"/>
        <xsd: element ref="address"/>
        <xsd: element ref="contact-info"/>
        <xsd: element name="email-id" type="xsd:string"/>
 </xsd:sequence>
        <xsd:attribute name="id" type="xsd:integer" use="required" />
        <xsd:attribute name="gender" type="gendertype" default="male" />
        <xsd:attribute name="organization" type="xsd:string" fixed="mjcet" />
</xsd:complexType>
</xsd:element>

<xsd:element name="emp-db">
<xsd:complexType>
 <xsd:sequence>
        <xsd: element ref="employee" maxOccurs="unbounded"/>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

EMP XML

<?xml version="1.0" encoding="utf-8"?>
<emp-db xmlns="http://www.employee.org/emp"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.employee.org/emp emp.xsd">

<employee id="100" gender="male" organization="mjcet">
<name>
<first> Robert </first>
<second> schildt </second>
<last> sebesta </last>
</name>
<age> 30 </age>
<salary> 45000 </salary>
<designation> manager </designation>
<dept> cse </dept>


M.J.C.E.T                                                                       04-09-8127L
P a g e | 68


<address>
<flatno>12345</flatno>
<street>banjara hills</street>
<city>hyderabad</city>
</address>
<contact-info>
<landline>04023355888</landline>
<mobile>9200112233</mobile>
<mobile>9051122334</mobile>
</contact-info>
<email-id>hello_world@gmail.com</email-id>
</employee>

<employee id="110" gender="male" organization="mjcet">
<name>
<first> grady </first>
<second> rumbaugh </second>
<last> jacobson </last>
</name>
<age> 35 </age>
<salary> 35000 </salary>
<designation> associate manager </designation>
<dept> cse </dept>
<address>
<flatno>54321</flatno>
<street>banjara hills</street>
<city>hyderabad</city>
</address>
<contact-info>
<landline>04023355999</landline>
<mobile>9200114455</mobile>
<mobile>9051177334</mobile>
</contact-info>
<email-id>hello_world@yahoo.com</email-id>
</employee>
</emp-db>




M.J.C.E.T                                                04-09-8127L
P a g e | 69




M.J.C.E.T   04-09-8127L
P a g e | 70


    7. XML document using CSS

Style.css

messages {color:green;}
note {background-color:lightgrey;}
to {font-style:italic; display:block;}
from {font-variant:small-caps; display:block;}
heading {text-decoration:underline; display:block;}
body {font-weight:bold; display:block;}

Message XML

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="style.css"?>

<messagses>
<note>
<to> Robert Sebesta </to>
<form> Herbert schildt </form>
<heading> Reminder</heading>
<body> Conference Meeting of authors on 5pm tomorrow</body>
</note>
</messagses>




M.J.C.E.T                                                     04-09-8127L
P a g e | 71


    8. XML document for employees using XSL

EMP XSL

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:template match="/emp-db">
<html>
<head>
<title>XSLT styel sheet</title>
</head>
<body topmargin="100" leftmargin="100" background="b12.jpg">
<h2 align="center">Employee Details</h2>
<table border="5" align="center" cellspacing="8" cellpadding="16">
<tr style="background-color:#BDCFAF;">
<th>Name</th>
<th>age</th>
<th>Salary</th>
<th>Department</th>
</tr>
<xsl:for-each select="employee">
<tr>
<td><xsl:value-of select="name" /></td>
<td><xsl:value-of select="age" /></td>
<td><xsl:value-of select="salary" /></td>
<td><xsl:value-of select="dept" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

EMP XML

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="emp.xsl"?>
<emp-db>
<employee>
<name>ivary-jacobson</name>
<age>45</age>
<salary>500</salary>
<dept>it</dept>
</employee>




M.J.C.E.T                                                                        04-09-8127L
P a g e | 72


<employee>
<name>james-rumbaugh</name>
<age>48</age>
<salary>5000</salary>
<dept>cse</dept>
</employee>

<employee>
<name>grady-booch</name>
<age>46</age>
<salary>4500</salary>
<dept>ece</dept>
</employee>
</emp-db>




M.J.C.E.T                     04-09-8127L
P a g e | 73


    9. XSL to retrieve the employee information whose salary is greater than 500

EMP XSL

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:template match="/emp-db">
<html>
<head>
<title>XSLT styel sheet</title>
</head>
<body topmargin="100" leftmargin="100" background="b13.jpg">
<h2 align="center">Employee Details</h2>
<table border="5" align="center" cellspacing="8" cellpadding="16">
<tr style="background-color:#BDCFAF;">
<th>Name</th>
<th>age</th>
<th>Salary</th>
<th>Department</th>
</tr>
<xsl:for-each select="employee">
<tr>
<xsl:if test="salary &gt; 500">
<td><xsl:value-of select="name" /></td>
<td><xsl:value-of select="age" /></td>
<td><xsl:value-of select="salary" /></td>
<td><xsl:value-of select="dept" /></td>
</xsl:if>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

EMP XML

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="emp.xsl"?>
<emp-db>
<employee>
<name>ivary-jacobson</name>
<age>45</age>
<salary>500</salary>
<dept>it</dept>
</employee>


M.J.C.E.T                                                                          04-09-8127L
P a g e | 74



<employee>
<name>james-rumbaugh</name>
<age>48</age>
<salary>5000</salary>
<dept>cse</dept>
</employee>

<employee>
<name>grady-booch</name>
<age>46</age>
<salary>4500</salary>
<dept>ece</dept>
</employee>
</emp-db>




M.J.C.E.T                     04-09-8127L

More Related Content

Similar to [Km] [wp] [3] [assignment]

Similar to [Km] [wp] [3] [assignment] (20)

Xml part2
Xml part2Xml part2
Xml part2
 
Xml part5
Xml part5Xml part5
Xml part5
 
Practicals it
Practicals itPracticals it
Practicals it
 
xml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdfxml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdf
 
It8074 soa-unit i
It8074 soa-unit iIt8074 soa-unit i
It8074 soa-unit i
 
Xml
XmlXml
Xml
 
Tables and forms with HTML, CSS
Tables and forms with HTML, CSS  Tables and forms with HTML, CSS
Tables and forms with HTML, CSS
 
Xml overview
Xml overviewXml overview
Xml overview
 
Relational data as_xml
Relational data as_xmlRelational data as_xml
Relational data as_xml
 
It8074 soa-unit i
It8074 soa-unit iIt8074 soa-unit i
It8074 soa-unit i
 
it8074-soa-uniti-.pdf
it8074-soa-uniti-.pdfit8074-soa-uniti-.pdf
it8074-soa-uniti-.pdf
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
 
Converting dt ds to xml schemas
Converting dt ds to xml schemasConverting dt ds to xml schemas
Converting dt ds to xml schemas
 
Html and css
Html and cssHtml and css
Html and css
 
Converting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdfConverting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdf
 
Tables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptxTables and their padding in HTML etc.pptx
Tables and their padding in HTML etc.pptx
 
Webtechnology lab
Webtechnology labWebtechnology lab
Webtechnology lab
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source Code
 
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
 

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

[Km] [wp] [3] [assignment]

  • 1. P a g e | 56 XML 1. XML DTD and XML document for bookstore details using internal DTD <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE bookstore[ <!ELEMENT bookstore (book+)> <!ELEMENT book (title, author+, price, year, description, userreviews*)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ELEMENT year (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT userreviews (#PCDATA)> <!ATTLIST book id CDATA #REQUIRED category CDATA #IMPLIED> <!ATTLIST title language CDATA "english"> <!ATTLIST price currency CDATA #FIXED "rupees"> <!ENTITY d1 "description on web designing"> <!ENTITY d2 "description on oosd"> <!ENTITY r1 SYSTEM "r1.txt"> <!ENTITY r2 SYSTEM "r2.txt"> ]> <bookstore> <book id="111" category="Computer Science"> <title language="greek"> Web Designing </title> <author> sebesta </author> <author> robert </author> <price currency="rupees"> 200 </price> <year> 2000 </year> <description> &d1; </description> <userreviews> &r1;</userreviews> </book> <book id="112" category="Computer Science"> <title language="english"> OOSD </title> <author> grady </author> <author> booch </author> <price currency="rupees"> 500 </price> <year> 2003 </year> <description> &d2; </description> <userreviews> &r2;</userreviews> </book> </bookstore> M.J.C.E.T 04-09-8127L
  • 2. P a g e | 57 M.J.C.E.T 04-09-8127L
  • 3. P a g e | 58 2. XML DTD and XML document for bookstore details using external DTD Bookstore DTD <!ELEMENT bookstore (book+)> <!ELEMENT book (title, author+, price, year, description, userreviews*)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ELEMENT year (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT userreviews (#PCDATA)> <!ATTLIST book id CDATA #REQUIRED category CDATA #IMPLIED> <!ATTLIST title language CDATA "english"> <!ATTLIST price currency CDATA #FIXED "rupees"> <!ENTITY d1 "description on web designing"> <!ENTITY d2 "description on oosd"> <!ENTITY r1 SYSTEM "r1.txt"> <!ENTITY r2 SYSTEM "r2.txt"> Bookstore XML <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE bookstore SYSTEM "2bookstore.dtd"> <bookstore> <book id="111" category="Computer Science"> <title language="greek"> Web Designing </title> <author> sebesta </author> <author> robert </author> <price currency="rupees"> 200 </price> <year> 2000 </year> <description> &d1; </description> <userreviews> &r1;</userreviews> </book> <book id="112" category="Computer Science"> <title language="english"> OOSD </title> <author> grady </author> <author> booch </author> <price currency="rupees"> 500 </price> <year> 2003 </year> <description> &d2; </description> <userreviews> &r2;</userreviews> </book> </bookstore> M.J.C.E.T 04-09-8127L
  • 4. P a g e | 59 M.J.C.E.T 04-09-8127L
  • 5. P a g e | 60 3. XML DTD and XML document for employee details using internal DTD <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE emp_db[ <!ELEMENT emp_db (employee+)> <!ELEMENT employee (name, salary, age, experience, designation, dept, address, contact_info, email_id)> <!ELEMENT name (first, middle?, last)> <!ELEMENT salary (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT experience (#PCDATA)> <!ELEMENT designation (#PCDATA)> <!ELEMENT dept (#PCDATA)> <!ELEMENT address (flatno, street, city)> <!ELEMENT contact_info (landline?, mobile+)> <!ELEMENT email_id (#PCDATA)> <!ELEMENT first (#PCDATA)> <!ELEMENT middle (#PCDATA)> <!ELEMENT last (#PCDATA)> <!ELEMENT flatno (#PCDATA)> <!ELEMENT street (#PCDATA)> <!ELEMENT city (#PCDATA)> <!ELEMENT landline (#PCDATA)> <!ELEMENT mobile (#PCDATA)> <!ATTLIST employee id CDATA #REQUIRED organization CDATA #FIXED "MJCET" gender (male|female) "male"> <!ENTITY ap "Assistant Professor"> <!ENTITY asp "Associated Professor"> ]> <emp_db> <employee id="101" gender="female"> <name> <first> Mrs. </first> <middle> Farheen </middle> <last> Iqbhal </last> </name> <age> 27 </age> <salary> 45000 </salary> <designation> &asp; </designation> <experience> 6 Years </experience> <dept> C.S.E </dept> <address> <flatno> 12345. </flatno> <street> silver street </street> <city> Hyderabad </city> </address> <contact_info> <landline> 040-66554433 </landline> M.J.C.E.T 04-09-8127L
  • 6. P a g e | 61 <moblie>+919876543210 </moblie> </contact_info> <email_id> Farheen_Iqbhal@gmail.com</email_id> </employee> <employee id="102" gender="female"> <name> <first> Mrs. </first> <middle> Ambreen </middle> <last> Rana </last> </name> <age> 28 </age> <salary> 35000 </salary> <designation> &ap; </designation> <experience> 4 Years </experience> <dept> C.S.E </dept> <address> <flatno> 54321. </flatno> <street> sun city</street> <city> Hyderabad </city> </address> <contact_info> <landline> 040-66552233 </landline> <moblie>+919854231067 </moblie> </contact_info> <email_id> Ambreen_rana@Yahoo.com</email_id> </employee> </emp_db> M.J.C.E.T 04-09-8127L
  • 7. P a g e | 62 4. XML DTD and XML document for employee details using external DTD EMP-DB DTD <!ELEMENT emp_db (employee+)> <!ELEMENT employee (name, salary, age, experience, designation, dept, address, contact_info, email_id)> <!ELEMENT name (first, middle?, last)> <!ELEMENT salary (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT experience (#PCDATA)> <!ELEMENT designation (#PCDATA)> <!ELEMENT dept (#PCDATA)> <!ELEMENT address (flatno, street, city)> <!ELEMENT contact_info (landline?, mobile+)> <!ELEMENT email_id (#PCDATA)> <!ELEMENT first (#PCDATA)> <!ELEMENT middle (#PCDATA)> <!ELEMENT last (#PCDATA)> <!ELEMENT flatno (#PCDATA)> <!ELEMENT street (#PCDATA)> <!ELEMENT city (#PCDATA)> <!ELEMENT landline (#PCDATA)> <!ELEMENT mobile (#PCDATA)> <!ATTLIST employee id CDATA #REQUIRED organization CDATA #FIXED "MJCET" gender CDATA "male"> <!ENTITY ap "Assistant Professor"> <!ENTITY asp "Associated Professor"> EMP-DB XML <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE emp_db SYSTEM "4empdb.dtd"> <emp_db> <employee id="101" gender="female"> <name> <first> Mrs. </first> <middle> Farheen </middle> <last> Iqbhal </last> </name> <age> 27 </age> <salary> 45000 </salary> <designation> &asp; </designation> <experience> 6 Years </experience> <dept> C.S.E </dept> <address> <flatno> 12345. </flatno> <street> silver street </street> <city> Hyderabad </city> M.J.C.E.T 04-09-8127L
  • 8. P a g e | 63 </address> <contact_info> <landline> 040-66554433 </landline> <moblie>+919876543210 </moblie> </contact_info> <email_id> Farheen_Iqbhal@gmail.com</email_id> </employee> <employee id="102" gender="female"> <name> <first> Mrs. </first><middle> Ambreen </middle><last> Rana </last> </name> <age> 28 </age> <salary> 35000 </salary> <designation> &ap; </designation> <experience> 4 Years </experience> <dept> C.S.E </dept> <address> <flatno> 54321. </flatno><street> sun city</street><city> Hyderabad </city> </address> <contact_info> <landline> 040-66552233 </landline><moblie>+919854231067 </moblie> </contact_info> <email_id> Ambreen_rana@Yahoo.com</email_id> </employee> </emp_db> M.J.C.E.T 04-09-8127L
  • 9. P a g e | 64 5. XML Schema and XML document for message details Message XSD <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.messages.org/note" elementFormDefault="qualified" xmlns="http://www.messages.org/note"> <xsd:element name="note"> <xsd:complexType> <xsd:sequence> <xsd: element name="to" type="xsd:string" maxOccurs="unbounded"/> <xsd: element name="from" type="xsd:string" /> <xsd: element name="heading" type="xsd:string" /> <xsd: element name="body" type="xsd:string" /> </xsd:sequence> <xsd: attribute name="id" type="xsd: integer" use="required" /> <xsd: attribute name="date" type="xsd: date" /> </xsd:complexType> </xsd:element> <xsd:element name="messages"> <xsd:complexType> <xsd:sequence> <xsd: element ref="note" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> Message XML <?xml version="1.0" encoding="utf-8"?> <messages xmlns="http://www.messages.org/note" xmlns:xsi="http://www.w3.org/2001/XMLSchema?-instance" xsi:schemaLocation="http://www.message.org/note message.xsd"> <note id="111" date="2011-09-14"> <to> Robert Sebesta </to> <to> Tanenbaum </to> <form> Herbert schildt </form> <heading> Reminder</heading> <body> Conference Meeting of authors on 5pm tomorrow</body> </note> <note id="112"> <to> Kernighan </to> M.J.C.E.T 04-09-8127L
  • 10. P a g e | 65 <form> Ritchie </form> <heading> Important News </heading> <body> Tomorrow's meeting is cancelled </body> </note> </messages> M.J.C.E.T 04-09-8127L
  • 11. P a g e | 66 6. XML Schema and XML document for employee details EMP XSD <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.employee.org/emp" elementFormDefault="qualified" xmlns="http://www.employee.org/emp"> <xsd:element name="name"> <xsd:complexType> <xsd:sequence> <xsd: element name="first" type="xsd:string"/> <xsd: element name="middle" type="xsd:string" minOccurs="0"/> <xsd: element name="last" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="address"> <xsd:complexType> <xsd:sequence> <xsd: element name="flatno" type="xsd:string"/> <xsd: element name="street" type="xsd:string"/> <xsd: element name="city" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="contact-info"> <xsd:complexType> <xsd:sequence> <xsd: element name="landline" type="xsd:integer" minOccurs="0"/> <xsd: element name="mobile" type="xsd:integer" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:simpleType name="agetype"> <xsd:restriction base="xsd:positiveInteger"> <xsd:minInclusive value="20"> <xsd:maxInclusive value="65"> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="gendertype"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="male"> M.J.C.E.T 04-09-8127L
  • 12. P a g e | 67 <xsd:enumeration value="female"> </xsd:restriction> </xsd:simpleType> <xsd:element name="employee"> <xsd:complexType> <xsd:sequence> <xsd: element ref="name"/> <xsd: element name="age" type="agetype"/> <xsd: element name="salary" type="xsd:integer"/> <xsd: element name="designation" type="xsd:string"/> <xsd: element name="dept" type="xsd:string"/> <xsd: element ref="address"/> <xsd: element ref="contact-info"/> <xsd: element name="email-id" type="xsd:string"/> </xsd:sequence> <xsd:attribute name="id" type="xsd:integer" use="required" /> <xsd:attribute name="gender" type="gendertype" default="male" /> <xsd:attribute name="organization" type="xsd:string" fixed="mjcet" /> </xsd:complexType> </xsd:element> <xsd:element name="emp-db"> <xsd:complexType> <xsd:sequence> <xsd: element ref="employee" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> EMP XML <?xml version="1.0" encoding="utf-8"?> <emp-db xmlns="http://www.employee.org/emp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.employee.org/emp emp.xsd"> <employee id="100" gender="male" organization="mjcet"> <name> <first> Robert </first> <second> schildt </second> <last> sebesta </last> </name> <age> 30 </age> <salary> 45000 </salary> <designation> manager </designation> <dept> cse </dept> M.J.C.E.T 04-09-8127L
  • 13. P a g e | 68 <address> <flatno>12345</flatno> <street>banjara hills</street> <city>hyderabad</city> </address> <contact-info> <landline>04023355888</landline> <mobile>9200112233</mobile> <mobile>9051122334</mobile> </contact-info> <email-id>hello_world@gmail.com</email-id> </employee> <employee id="110" gender="male" organization="mjcet"> <name> <first> grady </first> <second> rumbaugh </second> <last> jacobson </last> </name> <age> 35 </age> <salary> 35000 </salary> <designation> associate manager </designation> <dept> cse </dept> <address> <flatno>54321</flatno> <street>banjara hills</street> <city>hyderabad</city> </address> <contact-info> <landline>04023355999</landline> <mobile>9200114455</mobile> <mobile>9051177334</mobile> </contact-info> <email-id>hello_world@yahoo.com</email-id> </employee> </emp-db> M.J.C.E.T 04-09-8127L
  • 14. P a g e | 69 M.J.C.E.T 04-09-8127L
  • 15. P a g e | 70 7. XML document using CSS Style.css messages {color:green;} note {background-color:lightgrey;} to {font-style:italic; display:block;} from {font-variant:small-caps; display:block;} heading {text-decoration:underline; display:block;} body {font-weight:bold; display:block;} Message XML <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="style.css"?> <messagses> <note> <to> Robert Sebesta </to> <form> Herbert schildt </form> <heading> Reminder</heading> <body> Conference Meeting of authors on 5pm tomorrow</body> </note> </messagses> M.J.C.E.T 04-09-8127L
  • 16. P a g e | 71 8. XML document for employees using XSL EMP XSL <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="/emp-db"> <html> <head> <title>XSLT styel sheet</title> </head> <body topmargin="100" leftmargin="100" background="b12.jpg"> <h2 align="center">Employee Details</h2> <table border="5" align="center" cellspacing="8" cellpadding="16"> <tr style="background-color:#BDCFAF;"> <th>Name</th> <th>age</th> <th>Salary</th> <th>Department</th> </tr> <xsl:for-each select="employee"> <tr> <td><xsl:value-of select="name" /></td> <td><xsl:value-of select="age" /></td> <td><xsl:value-of select="salary" /></td> <td><xsl:value-of select="dept" /></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> EMP XML <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="emp.xsl"?> <emp-db> <employee> <name>ivary-jacobson</name> <age>45</age> <salary>500</salary> <dept>it</dept> </employee> M.J.C.E.T 04-09-8127L
  • 17. P a g e | 72 <employee> <name>james-rumbaugh</name> <age>48</age> <salary>5000</salary> <dept>cse</dept> </employee> <employee> <name>grady-booch</name> <age>46</age> <salary>4500</salary> <dept>ece</dept> </employee> </emp-db> M.J.C.E.T 04-09-8127L
  • 18. P a g e | 73 9. XSL to retrieve the employee information whose salary is greater than 500 EMP XSL <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="/emp-db"> <html> <head> <title>XSLT styel sheet</title> </head> <body topmargin="100" leftmargin="100" background="b13.jpg"> <h2 align="center">Employee Details</h2> <table border="5" align="center" cellspacing="8" cellpadding="16"> <tr style="background-color:#BDCFAF;"> <th>Name</th> <th>age</th> <th>Salary</th> <th>Department</th> </tr> <xsl:for-each select="employee"> <tr> <xsl:if test="salary &gt; 500"> <td><xsl:value-of select="name" /></td> <td><xsl:value-of select="age" /></td> <td><xsl:value-of select="salary" /></td> <td><xsl:value-of select="dept" /></td> </xsl:if> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> EMP XML <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="emp.xsl"?> <emp-db> <employee> <name>ivary-jacobson</name> <age>45</age> <salary>500</salary> <dept>it</dept> </employee> M.J.C.E.T 04-09-8127L
  • 19. P a g e | 74 <employee> <name>james-rumbaugh</name> <age>48</age> <salary>5000</salary> <dept>cse</dept> </employee> <employee> <name>grady-booch</name> <age>46</age> <salary>4500</salary> <dept>ece</dept> </employee> </emp-db> M.J.C.E.T 04-09-8127L