[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: Miloslav Nic <nicmila@xxxxxxxx>
Date: Thu, 09 Sep 1999 15:34:00 +0200
xslt to html examples
Look at 
http://zvon.vscht.cz/HTMLonly/XSLTutorial/Books/Book1/index.html
example 76 for an idea.

You should take off
<xsl:template >
     <xsl:apply-templates/>
</xsl:template>
from your stylesheet


Gianluca Legittimo wrote:
> 
> 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

-- 
***************************************************************
Dr. Miloslav Nic                        e-mail: nicmila@xxxxxxxx
Department of Organic Chemistry         TEL: +420 2 2435 5012  
ICT Prague (VSCHT Praha)                     +420 2 2435 4118
    				        FAX: +420 2 2435 4288  
****************************************************************


 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.