xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

XSL and HTML Table


Subject: XSL and HTML Table
From: "Gianluca Legittimo" <g_legittimo@xxxxxxxxxxx>
Date: Thu, 09 Sep 1999 04:19:45 PDT

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




Current Thread
Keywords
xsl
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor