[XSL]

[email protected]
Newsgroups gmane.text.xml.french.tech
Message-ID <[email protected]>

Bonjour,

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

Code :

<?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 :

<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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.