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

RE: HTML Table

Subject: RE: HTML Table
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 3 Sep 2003 11:42:55 +0300
show xml in html
Hi,

> I'm trying to create a table from an xml file.
> 
> The xml is similar to:

Why can't you show us what the XML source is really like, instead of something similar to?
 
> <A1>
>   <subA1 />
>   <subA2 />
>   <subA3 />
> </A1>
> <B1>
> </B1>
> <C1>
>   <subC1 />
>   <subC2 />
> </C1>
> 
> The table I'm trying to create is:
> 
> <TABLE>
>   <TR>
>     <TD><xsl:value-of select="@A1"/></TD>

Are you trying to generate a result tree, that has elements in XSLT namespace in it?

> I have tried :
> 
>         <table border="1" cellspacing="0">
>           <!--table header cells -->
>           <tr>
>             <tr>Load</tr>
>             <xsl:for-each select="root/data">
>               <th>
>                 <xsl:value-of select="@Ref"/>

Well, this doesn't look like anything remotely similar to the XML source you have above. Could you show a simplified XML source, the desired output, and the stylesheet you have so far?

>               			<input type="button" 
> onClick="alert(@sub)"></input>
> 	      </xsl:otherwise>
>           </xsl:choose>
>           </tr>
>           </xsl:for-each>
>       </table>
>     
> I am also tring to pass the value of @sub to a script function.

You want AVTs for that, see <http://www.w3.org/TR/xslt#attribute-value-templates>.

Cheers,

Jarno 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.