RE: [xsl] to get form one xml file and other XSLT file (bellow the code) one talee with 2 columns. SOS

Subject: RE: [xsl] to get form one xml file and other XSLT file (bellow the code) one talee with 2 columns. SOS
From: cknell@xxxxxxxxxx
Date: Wed, 05 Mar 2003 17:23:23 -0500
> From:     "Dionisio Ruiz de Zarate" <dionisio@xxxxxxxxxxxxx>
> Witn the bellow XML and XSLT fiel i want to get this:
> <table>
>  <tr><td>res: 102 - res: 22</td><td>res: 56 - res: 31 - res: 
>  36</td></tr>
> <!-- more elements here -->
> </table>


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes"/>

<xsl:template match="/">
  <table>
    <tr><xsl:apply-templates /></tr>
  </table>
</xsl:template>

<xsl:template match="/registros/votacion">
  <td style="border-width:1px;border-style:solid;"><xsl:apply-templates /></td>
</xsl:template>

<xsl:template match="registros/votacion[position() mod 2 = 1]/registro/resultado">
  res: <xsl:value-of select="." /><xsl:if test="count(../following-sibling::node()) != 1"> - </xsl:if>
</xsl:template>

<xsl:template match="registros/votacion[position() mod 2 = 0]/registro/resultado">
  res: <xsl:value-of select="." /><xsl:if test="count(../following-sibling::node()) != 1"> - </xsl:if>
</xsl:template>

</xsl:stylesheet>
-- 
Charles Knell
cknell@xxxxxxxxxx - email

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


Current Thread