Bonjour,

j'ai un fichier xml de résultats de recherche. Il est de ce type :

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
 
<?xml version='1.0' encoding="ISO-8859-1" ?>
<TEST>
<SERVICE num="1" name="ke">
 
	<NBANS value="10" start="1" end="10"/>
        <R num="0">
         <TITLE>sdfdf</TITLE>
	 <URL>www.google.fr</URL>
	 <RESUME>blab bla bla</RESUME>
	</R>
        <R num="1">
         <TITLE>sdfdf</TITLE>
	 <URL>www.google.fr</URL>
	 <RESUME>blab bla bla</RESUME>
	</R>
</SERVICE>
 
<SERVICE>
     <HELLO>ssffsfhrhh
     </HELLO>
 
</SERVICE>
</TEST>
je fais la fusion avec du xsl en php avec domxml.
voici le 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
<xsl:template match="/">
    <xsl:apply-templates/>
</xsl:template>
 
<xsl:template match="Test">
    <xsl:apply-templates select="SERVICE[1]" />
</xsl:template>
 
 
<xsl:template match="SERVICE">
  	<div>  	
    <xsl:apply-templates select="NBANS" />
    <br /><br />
    <xsl:apply-templates select="R" />
    </div>
</xsl:template>
 
<xsl:template match="NBANS">
    <div class="resultat">
    <xsl:text> Il y a </xsl:text>
    <xsl:value-of select="@value" />
    <xsl:text> résultat(s) correspondant(s) </xsl:text><br /><br />
    <xsl:text> Documents </xsl:text>
    <xsl:value-of select="@start" />
    <xsl:text> à </xsl:text>
    <xsl:value-of select="@end" />
    <xsl:text> sur </xsl:text>
    <xsl:value-of select="@end" />
    </div>
</xsl:template>
 
<xsl:template match="R">
    <div class="moteur_resultat">
    <a href="{URL}"><xsl:value-of select="@num +1" /><xsl:text disable-output-escaping="yes">&amp;nbsp;-&amp;nbsp;</xsl:text><xsl:value-of select="TITLE" /></a><br />
    <xsl:value-of select="RESUME" />
    <br /><br />
    </div>
    <br />
</xsl:template>
j'aimerais faire un affichage multipage avec le xsl, mais je n'ai pas trouvé de ressources sur ce sujet (et je débuter en xsl) . Comment dois-je m'y prendre ?

merci d'avance