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

RE: to get form one xml file and other XSLT file (bell

Subject: RE: 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
form and xml file
> 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

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.