0% found this document useful (0 votes)
15 views3 pages

Web 6 69

The document outlines a practical exercise to create an XML file with both internal and external DTD, displaying the data using CSS and XSL. It includes an XML structure for a book with elements for name, author, and price, as well as an XSL stylesheet for formatting the output in HTML. The example provided contains errors in formatting and syntax that need correction for proper execution.

Uploaded by

alankar.stx
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)
15 views3 pages

Web 6 69

The document outlines a practical exercise to create an XML file with both internal and external DTD, displaying the data using CSS and XSL. It includes an XML structure for a book with elements for name, author, and price, as well as an XSL stylesheet for formatting the output in HTML. The example provided contains errors in formatting and syntax that need correction for proper execution.

Uploaded by

alankar.stx
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/ 3

PRACTICAL NO.

06
Aim: Write a HTML program to create a XML file with Internal/
External DTD and display it using CSS and XSL/
1. CSS:
INPUT:
<?xml version="1.0"encoding="UTF-8"standalone="yes"?>
<!DOCTYPE book[
<!ELEMENT book(bname,author,price)>
<!ELEMENTbname(#PCDATA)>
<!ELEMENT author(#PCDATA)>
<!ELEMENT price(#PCDATA)>
]>
<book>
<bname>Sanjeevani Babar</bname>
<author>TutorialsPoint</author>
<price>(011)123.4567</price>
</book>
OUTPUT:

2. XSL:
INPUT:
<?xml version="1.0"encoding="UTF-8"?>
-<xsl:stylesheetversion="1.0">
-<xsl:template match="/">
-<html>
-<body>
ROLL NO.:69
<h2>BOOKS DETAILS </h2>
-<table border="1">
-<trbgcolor="ffff000">
<th>BOOK ID</th>
<th>BOOK NAME</th>
<th>AUTHOR</th>
<th<PUBLISHER</th>
<th>PRICE</th>
</tr>
-<xsl:for-each select="class/book">
-<tr>
-<td>
<xsl:value-of select="@bid"/>
</td>
-<td>
<xsl:value-of select="bname"/>
</td>
-<td>
<xsl:value-of select="author"/>
</td>
-</td>
<xsl:value-of select="publisher"/>
</td>
-<td>
<xsl:value-of select="price"/>
</td>

ROLL NO.:69
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
OUTPUT:

ROLL NO.:69

You might also like