[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: translate to XML using XSL into an HTML table

Subject: Re: translate to XML using XSL into an HTML table
From: Steve <subsume@xxxxxxxxx>
Date: Fri, 3 Aug 2007 16:03:23 -0400
Re:  translate to XML using XSL into an HTML table
There's a solution to fill in //LAST and //PHONE with their
corresponding //FIRSTs but I'm hard pressed to produce it now, given
that your XML <listing /> doesn't encapsulate 1 member but several. If
you have control over the XML I'd wrap <member /> around each FIRST,
LAST, PHONE pair.

Perhaps someone else will chime in.

-S

On 8/3/07, oryann9 <oryann9@xxxxxxxxx> wrote:
> > <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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.