1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
| Doc ref XSL : http://www.zvon.org/
+ -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.w3.org/2005/11/schema-for-xslt20.xsd">
<xsl:output method="text" indent="yes"></xsl:output>
<xsl:template name="declaration">
<xsl:param name="iteration"/>
<xsl:param name="nombre"/>
<xsl:param name="type"/>
<xsl:param name="prefixe"/>
<xsl:if test="$iteration < $nombre">
<xsl:value-of select="'private $type concat($prefixe,iteration);'"/>
<xsl:call-template name="declaration">
<xsl:with-param name="iteration" select="$iteration + 1"/>
<xsl:with-param name="nombre" select="$nombre"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/">
package fr.edf.mpv2.serveurcalcul.koala.transverse.traitement.conversion;
import java.util.List;
import org.apache.log4j.Logger;
class <xsl:value-of select="trait/@id"/> {
<!--
| traitement des parametres
+ -->
<xsl:call-template name="declaration">
<xsl:with-param name="iteration">1</xsl:with-param >
<xsl:with-param name="nombre"> <xsl:value-of select="trait/entrees_sorties/param/@nombre"/> </xsl:with-param >
<xsl:with-param name="type"> <xsl:value-of select="trait/entrees_sorties/param/@type"/> </xsl:with-param >
<xsl:with-param name="prefixe"> <xsl:value-of select="trait/entrees_sorties/param/@prefixe"/> </xsl:with-param >
</xsl:call-template>
</xsl:template>
</xsl:stylesheet> |
Partager