Bonjour,

Je recherche comment afficher les valeurs de toutes les balises "Attribute" qui ont ont l'attribut Name = "Produktnamen", et dessous ceux avec l'attribut Name = "Produktnummer (Schlüssel)".

Ex:
<h2> Mes Produits ... </h2>
<p>MON PRODUIT /// Mon N° DE PRODUIT
</p>

Actuellement ça affiche la liste des Produktnamen (ça c'est ok), mais je n'arrive pas à afficher les N° de Produit "Produktnummer (Schlüssel)". Je ne sais pas du tout comment m'y prendre.

MON XML:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<root>
  <Object>
    <Attribute Name="Produktnummer (Schlüssel)">MON N° DE PRODUIT</Attribute>
    <Attribute Name="Produktnamen"> MON PRODUIT</Attribute>
    <Attribute Name="Produktkurzbezeichnung" />
    <Attribute Name="Beschreibung">Gerollte Selbstklemmplatten aus Glaswolle. </Attribute>
   <Attribute Name="Anwendungsbereiche">Hochleistungs-Wärme</Attribute>
</Object>
.......
MON 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
 
...
<xsl:template match="/">
  <html>
  <body>
    <h2>Mes Produits ("Produktnamen et "Produktnummer Schlüssel"):</h2>
 
		<xsl:for-each select="root/Object/Attribute[@Name='Produktnamen']">
			<p>
				<xsl:value-of select="."/> ///
				<xsl:apply-templates select="root/Object/Attribute[@Name='Produktnummer (Schlüssel)']"></xsl:apply-templates>
			</p>
		</xsl:for-each>
 
  </body>
  </html>
</xsl:template>	
 
<xsl:template match="root/Object/Attribute[@Name='Produktnummer (Schlüssel)']">
	<xsl:if test="@Name='Produktnummer (Schlüssel)'">
	<xsl:value-of select="."/> 
	</xsl:if>	
</xsl:template>
Le template du bas est une impro complête je ne sais pas comment m'y prendre.
Merci d'avance pour votre aide