Bonjour,

Je converti un fichier xml en un fichier txt coome suit :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
 
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="text"/>
 
  <xsl:variable name="newLine" select="translate('&#xa;','','')"/>
 
 
  <xsl:template match="Regles">
    <xsl:value-of select="$newLine" />
    <xsl:apply-templates select="*" />
  </xsl:template>
  <xsl:template match="Regle">
    <!-- Recuperation des informations du fichier XML -->
    <xsl:variable name="chp1" select="./chp1" />
    <xsl:variable name="chp2" select="./chp2" />
    <xsl:variable name="chp3" select="./chp3"/>
    <!-- Generation du contenu -->
    <xsl:value-of select="$chp1" />
    <xsl:text>;</xsl:text>
    <xsl:value-of select="$chp2" />
    <xsl:text>;</xsl:text>
    <xsl:value-of select="$chp3" />
  </xsl:template>
</xsl:stylesheet>
je souhaite générer les données dans un fichier text selon le format suivant :

chp1;chp2;chp3

mais ça me génère

chp1;
chp2
;
chp3

Merci de m'aider à résoudre ce problème.