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

Web Last Lab Work

The document contains XML code for a catalog of CDs, including details such as title, artist, country, company, price, and year. It also includes XSL code to transform the XML into an HTML table for display in a web browser, specifically Internet Explorer. The XSL template defines the structure and styling of the output, including a header and a table with columns for title and artist.

Uploaded by

arunsangwal4123
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)
5 views3 pages

Web Last Lab Work

The document contains XML code for a catalog of CDs, including details such as title, artist, country, company, price, and year. It also includes XSL code to transform the XML into an HTML table for display in a web browser, specifically Internet Explorer. The XSL template defines the structure and styling of the output, including a header and a table with columns for title and artist.

Uploaded by

arunsangwal4123
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

7.

Create style sheet in CSS/XSL and display the document in Internet Explorer
.
XML Code:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
< tle>Empire Burlesque</ tle>
<ar st>Bob Dylan</ar st>
<country>USA</country>

<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
< tle>Hide your heart</ tle>
<ar st>Bonnie Tyler</ar st>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>

<year>1988</year>
</cd>
<cd>
< tle>Greatest Hits</ tle>
<ar st>Dolly Parton</ar st>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
<cd>
< tle>S ll got the blues</ tle>

<ar st>Gary Moore</ar st>


<country>UK</country>
<company>Virgin records</company>
<price>10.20</price>
<year>1990</year>
</cd>
<cd>
< tle>Eros</ tle>
<ar st>Eros Ramazzo </ar st>
<country>EU</country>
<company>BMG</company>
<price>9.90</price>
<year>1997</year>
</cd>
<cd>
< tle>One night only</ tle>
<ar st>Bee Gees</ar st>
<country>UK</country>
<company>Polydor</company>
<price>10.90</price>
<year>1998</year>
</cd>
<cd>
< tle>Sylvias Mother</ tle>
<ar st>Dr.Hook</ar st>
<country>UK</country>
<company>CBS</company>
<price>8.10</price>
<year>1973</year>

</cd>

</catalog>

XSL Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:template match="/">
<html>
<body>
<h2>My CD Collec on</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th style="text-align:le ">Title</th>
<th style="text-align:le ">Ar st</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select=" tle"/></td>
<td><xsl:value-of select="ar st"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

You might also like