[
Lists Home |
Date Index |
Thread Index
]
- From: rajib.k.bhattacharyya@in.pwcglobal.com
- To: Jyotinarayanan <ncjyoti@hotmail.com>
- Date: Mon, 21 Aug 2000 16:20:34 +0530
Try out this xsl ... save it as a file and add a reference of the same in ur
xml file
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<H2>BOOKSTORE SYSTEM</H2>
<table border="2" bgcolor="yellow">
<tr>
<th>TITLE</th>
<th>AUTHOR</th>
<th>YEAR</th>
<th>ISBN</th>
<th>PRICE</th>
<th>REVIEW</th>
</tr>
<xsl:for-each select="BOOKSTORE/BOOK">
<tr>
<td><xsl:value-of select="TITLE"/></td>
<td><xsl:value-of select="AUTHOR"/></td>
<td><xsl:value-of select="YEAR"/></td>
<td><xsl:value-of select="ISBN"/></td>
<td><xsl:value-of select="PRICE"/></td>
<td><xsl:value-of select="REVIEW"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
----------------------
Add this line in the xml doc
<?xml-stylesheet type="text/xsl" href="bookstore..xsl"?>
( where bookstore.xsl is the name of the file u have just saved)
Regards
Rajib
Jyotinarayanan <ncjyoti@hotmail.com> on 21/08/2000 03:05:37 PM
Please respond to Jyotinarayanan <ncjyoti@hotmail.com>
To: XML Help <xml-dev@lists.xml.org>
cc:
Subject: new to XML
Hi All,
I'm a beginner with XML technology. I've got a small peice of code below. How do
incorporate it with HTML code and view it in a web browser?
Thanx in advance,
Jo.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE BOOKSTORE SYSTEM "bookshop.dtd">
<BOOKSTORE>
<!--J&R Booksellers Database-->
<BOOK GENRE="Fiction" IN_STOCK="Yes">
<TITLE>The Round Door</TITLE>
<AUTHOR>Tom Evans</AUTHOR>
<YEAR_PUBLISHED>1996</YEAR_PUBLISHED>
<ISBN>0-9546-0274-3</ISBN>
<PRICE>$23.00</PRICE>
<REVIEW>An Intriguing Tale Of A Round Door In A Wall</REVIEW>
</BOOK>
<BOOK GENRE="Non-Fiction" IN_STOCK="Yes">
<TITLE>Creating Real Xml Applications</TITLE>
<AUTHOR>Bill Eaton</AUTHOR>
<YEAR_PUBLISHED>1998</YEAR_PUBLISHED>
<ISBN>7-4562-0167-8</ISBN>
<PRICE>$35.00</PRICE>
<REVIEW>A Look At How To Build Real Xml Applications</REVIEW>
</BOOK>
<BOOK GENRE="Fiction" IN_STOCK="No">
<TITLE>Over The Hills Of Yukon</TITLE>
<AUTHOR>Bert Colewell</AUTHOR>
<YEAR_PUBLISHED>1993</YEAR_PUBLISHED>
<ISBN>5-6524-3054-1</ISBN>
<PRICE>$22.00</PRICE>
<REVIEW>A Warm Story About A Man And A Moose In Yukon</REVIEW>
</BOOK>
<BOOK GENRE="Fiction" IN_STOCK="Yes">
<TITLE>The Lion's Gold</TITLE>
<AUTHOR>Daphne Griswald</AUTHOR>
<YEAR_PUBLISHED>1989</YEAR_PUBLISHED>
<ISBN>6-7896-2498-2</ISBN>
<PRICE>$15.00</PRICE>
<REVIEW>One Of The Most Compelling Books Since "The Tiger's
Silver".</REVIEW>
</BOOK>
</BOOKSTORE>
Hi All,
I'm a beginner with XML technology. I've got a
small peice of code below. How do incorporate it with HTML code and view it in a
web browser?
Thanx in advance,
Jo.
<?xml version="1.0"
encoding="UTF-8"?> <!DOCTYPE BOOKSTORE SYSTEM
"bookshop.dtd"> <BOOKSTORE> <!--J&R
Booksellers Database--> <BOOK GENRE="Fiction"
IN_STOCK="Yes"> <TITLE>The Round
Door</TITLE> <AUTHOR>Tom
Evans</AUTHOR>
<YEAR_PUBLISHED>1996</YEAR_PUBLISHED>
<ISBN>0-9546-0274-3</ISBN>
<PRICE>$23.00</PRICE>
<REVIEW>An Intriguing Tale Of A Round Door In A
Wall</REVIEW> </BOOK> <BOOK
GENRE="Non-Fiction" IN_STOCK="Yes">
<TITLE>Creating Real Xml
Applications</TITLE> <AUTHOR>Bill
Eaton</AUTHOR>
<YEAR_PUBLISHED>1998</YEAR_PUBLISHED>
<ISBN>7-4562-0167-8</ISBN>
<PRICE>$35.00</PRICE>
<REVIEW>A Look At How To Build Real Xml
Applications</REVIEW> </BOOK>
<BOOK GENRE="Fiction" IN_STOCK="No">
<TITLE>Over The Hills Of
Yukon</TITLE> <AUTHOR>Bert
Colewell</AUTHOR>
<YEAR_PUBLISHED>1993</YEAR_PUBLISHED>
<ISBN>5-6524-3054-1</ISBN>
<PRICE>$22.00</PRICE>
<REVIEW>A Warm Story About A Man And A Moose In
Yukon</REVIEW> </BOOK> <BOOK
GENRE="Fiction" IN_STOCK="Yes">
<TITLE>The Lion's Gold</TITLE>
<AUTHOR>Daphne Griswald</AUTHOR>
<YEAR_PUBLISHED>1989</YEAR_PUBLISHED>
<ISBN>6-7896-2498-2</ISBN>
<PRICE>$15.00</PRICE>
<REVIEW>One Of The Most Compelling Books Since "The Tiger's
Silver".</REVIEW>
</BOOK> </BOOKSTORE>
|
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
|