|
[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
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








