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

RE: XSL and HTML Table

Subject: RE: XSL and HTML Table
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Thu, 9 Sep 1999 13:16:50 +0100
ben robb
1) Difficult without seeing the XML structure, but at a guess it is in your
<xsl:for-each> loop. I would take the <TABLE> tag and put  it before the
<xsl:for-each> call. I am assuming that you have two "DOCUMENT/PFRAME/BLOCK"
tags in your XML - so you would get two <TABLE> tags in this case.

2) I *think* you will solve the second problem with the solution to the
first.

Rgs,

Ben Robb
cScape

> -----Original Message-----
> From: Gianluca Legittimo [mailto:g_legittimo@xxxxxxxxxxx]
> Sent: 09 September 1999 12:20
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: XSL and HTML Table
> 
> 
> Hi everybody,
> 
> 1. I need to know why when I create a Table with the 
> following XSL    file 
> it results in two tables and not the only one I want.
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl='http://www.w3.org/TR/WD-xsl'>
>   <xsl:template >
>     <xsl:apply-templates/>
>   </xsl:template>
> <xsl:template match='/'>
> <HTML>
> <BODY STYLE="background-color=#EEEFFF">
> <xsl:for-each select="DOCUMENT/PFRAME/BLOCK">
> <TABLE WIDTH="100%" border="1" >
>   <TR>
>     <TD WIDTH="2%"></TD>
>     <TD WIDTH="97%">
>     <hr/>
>       <P ALIGN="CENTER">
>       <FONT SIZE="4">
>         <xsl:value-of select="Title"/>
>       </FONT>
>       </P>
>       <hr/>
>     </TD>
>     <TD></TD>
>   </TR>
> </TABLE>
> ...
> 
> 2. how can I refer to two tags with the same name but 
> different attributes 
> to result in a table with the two tags in two different cells 
> of the same 
> row. I tried:
> 
> <TABLE border="1"  WIDTH="100%">
>   <TR>
> 
>     <TD border="1" WIDTH="35%" VALIGN="TOP">
>       <P ALIGN="CENTER">
>       <FONT SIZE="2">
>         <xsl:value-of select="AUTHORS"/>
> 
>          <xsl:choose>
>           <xsl:when test='*[@pos="zero"]'>
>             <xsl:apply-templates select="text()"/>
>           </xsl:when>
>          </xsl:choose>
> 
>       </FONT>
>       </P>
>     </TD>
> 
>     <TD></TD>
>     <TD border="1" WIDTH="35%" VALIGN="TOP">
>       <P ALIGN="CENTER">
>       <FONT SIZE="2">
>         <xsl:value-of select="AUTHORS"/>
> 
>          <xsl:choose>
>             <xsl:when test='*[@pos="uno"]'>
>               <xsl:apply-templates select="text()"/>
>             </xsl:when>
>          </xsl:choose>
> 
>       </FONT>
>       </P>
> 
>     </TD>
> 
>   </TR>
> </TABLE>
> 
> but it doesn't work ! The result is one table with one tag in 
> two cells of 
> the same row and the other tag in another table in two cells 
> of the same 
> row.
> 
> thanks everybody.
> 
> Gianluca
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.