Bonjour,

Léger soucis...
Je ne trouve pas l'erreur de mon code...

Je voudrai dynamiquement ca :
1.Titre
1.1STitre
1.1.1SSTitre

voici mon code XSL :

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<xsl:template match="Paragraphe">
<xsl:variable name="titre">
<xsl:number count="Titre" level="any"/>
</xsl:variable>
<xsl:variable name="stitre">
<xsl:number count="STitre" level="multiple"/>
</xsl:variable>
<xsl:variable name="sstitre">
<xsl:number count="SSTitre" level="any"/>
</xsl:variable>
<fo:block font-family="Monotype Corsiva" padding-top="0.5cm" padding-bottom="0,5cm" margin-left="2cm" text-decoration="underline" color="#ffb700">
<xsl:value-of select="$titre + 1"/>.<xsl:value-of select="Titre"/>
</fo:block>
<fo:block font-family="Monotype Corsiva" padding-top="0.5cm" padding-bottom="0,5cm" margin-left="3cm" text-decoration="underline" color="#ffb700">
<xsl:apply-templates select="STitre"/>
</fo:block>
 
</xsl:template>
 
<xsl:template match="STitre">
<xsl:variable name="titre">
<xsl:number count="Titre" level="any"/>
</xsl:variable>
<xsl:variable name="stitre">
<xsl:number count="STitre" level="multiple"/>
</xsl:variable>
<xsl:value-of select="$titre"/>.<xsl:value-of select="$stitre"/> <xsl:text/> <xsl:value-of select="."/>
<fo:block font-family="Monotype Corsiva" padding-top="0.5cm" padding-bottom="0,5cm" margin-left="4cm" text-decoration="underline" color="#ffb700">
<xsl:apply-templates select="SSTitre"/>
</fo:block>
</xsl:template>
 
<xsl:template match="SSTitre">
<xsl:variable name="titre">
<xsl:number count="Titre" level="any"/>
</xsl:variable>
<xsl:variable name="stitre">
<xsl:number count="STitre" level="any"/>
</xsl:variable>
<xsl:variable name="sstitre">
<xsl:number count="SSTitre" level="multiple"/>
</xsl:variable>
<xsl:value-of select="$titre"/>.<xsl:value-of select="$stitre"/>.<xsl:value-of select="$sstitre"/> <xsl:text/> <xsl:value-of select="."/>
</xsl:template>
mon XML au cas ou :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
<Paragraphe>
<Titre>blabla</Titre>
<STitre>Présentation de l'entreprise</STitre>
<STitre>Présentation du service Informatique</STitre>
<SSTitre>bla1</SSTitre>
<SSTitre>bla2</SSTitre	
</Paragraphe>
Voila merci d'avance !