[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] translate to XML using XSL into an HTML table


Subject: Re: [xsl] translate to XML using XSL into an HTML table
From: oryann9 <oryann9@xxxxxxxxx>
Date: Fri, 3 Aug 2007 12:51:27 -0700 (PDT)

> <xsl:for-each select="//LISTING"> should match both
> listings (...I believe).
> Can you post some idea of your output HTML?
> I'm guessing <tr><td>first</td><td>last</td></tr>

My Phone Book
------------------
FIRST|LAST|PHONE
------------------
Derek|
Steve|
Corey|
Tiko |
Kurt |
Jane |
------------------

is from

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
    <head>
         <title> My Phone Book</title>
    </head>
     <h2> My Phone Book </h2>
    <body bgcolor="YELLOW">
        <table border="3">
           <tr bgcolor="lightblue">
               <th>FirstName</th>
               <th>LastName</th>
               <th>Phone</th>
           </tr>
            <xsl:for-each select="//FIRST"> 
            <tr>
                <td><xsl:value-of select="."/></td>
            </tr>
            </xsl:for-each>  
        </table>
    </body>
</html>
</xsl:template>
</xsl:stylesheet>


       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/


Current Thread