Subject: Re: XSL and HTML Table From: Miloslav Nic <nicmila@xxxxxxxx> Date: Thu, 09 Sep 1999 15:34:00 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XSL and HTML Table, Gianluca Legittimo | Thread | RE: XSL and HTML Table, Ben Robb |
XSL and HTML Table, Gianluca Legittimo | Date | Re: Crazy idea, Oren Ben-Kiki |
Month |