OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: new to XML

[ Lists Home | Date Index | Thread Index ]
  • From: tpassin@home.com
  • To: rajib.k.bhattacharyya@in.pwcglobal.com, Jyotinarayanan <ncjyoti@hotmail.com>
  • Date: Mon, 21 Aug 2000 08:49:56 -0400

Thie example will only work if you run it with Internet Explorer 5.0+, and
then only if you have not  updated the xml component in it.  For any other
XSL processor, or for the new Microsoft parser, you have to use

<xsl:stylesheet xmlns:xsl='http://www.w3.org/XSL/Transform/1.0'>

in place of the corresponding line below.

<rajib.k.bhattacharyya@in.pwcglobal.com> replied to a request for help -

> 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)
>



  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS