All pastes #287376 Raw Edit

XSLT

public xml v1 · immutable
#287376 ·published 2006-12-21 13:02 UTC
rendered paste body
<?xml version='1.0' encoding='ISO-8859-1'?><net.technisys.tfc.webapp.ui.table.TablePage>  <titles>    <title value="Cuenta" width="20"/>    <title value="Saldo Disponible" width="30"/>    <title value="Fondos a Conformar" width="40"/>    <title value="Límite de Crédito" width="25"/>  </titles>  <rows>    <row >      <column value="Cta. Cte. $ - 167199-100/6"/>      <column value="1,947,752.60"/>      <column value="0.00"/>      <column value="0.00"/>    </row>    <row>      <column value="Ctro Costo - Cta. Cte. $ - 319884-900/6"/>      <column value="0.00"/>      <column value="0.00"/>      <column value="0.00"/>    </row>    <row>      <column value="Cta. Cte. $ - 167199-100/6"/>      <column value="1,947,752.60"/>      <column value="0.00"/>      <column value="0.00"/>    </row>    <row>      <column value="Ctro Costo - Cta. Cte. $ - 319884-900/6"/>      <column value="0.00"/>      <column value="0.00"/>      <column value="0.00"/>    </row>  </rows></net.technisys.tfc.webapp.ui.table.TablePage><?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0"	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"	xmlns:fo="http://www.w3.org/1999/XSL/Format">	<xsl:output method="text" />		<xsl:variable name="espacio" select="'                                                                                                    '"/>					<xsl:template match="/">		<xsl:apply-templates select="net.technisys.tfc.webapp.ui.table.TablePage" />		<xsl:apply-templates select="rows" />	</xsl:template>	<xsl:template match="net.technisys.tfc.webapp.ui.table.TablePage">		<xsl:apply-templates select="titles" />		<xsl:apply-templates select="rows" />	</xsl:template>		<xsl:template match="titles">		<xsl:for-each select="title"><xsl:value-of select="substring(concat(@value, $espacio),1,@width)" /></xsl:for-each>		<xsl:value-of select="'&#10;'" />	</xsl:template>		<xsl:template match="rows">		<xsl:apply-templates select="row"></xsl:apply-templates>			</xsl:template>		<xsl:template match="row">				<xsl:for-each select="column">			<xsl:variable name="i" select="position()" />			<xsl:value-of select="substring(concat(@value, $espacio),1,/net.technisys.tfc.webapp.ui.table.TablePage/titles[$i]/title)" />		</xsl:for-each>		<xsl:value-of select="'&#10;'" />	</xsl:template></xsl:stylesheet>