salut,
je dispose d'un document xml qui se presente ainsi
<TABLE NOM ="PILOTE" >
<CHAMPS INTITULE ="NOM"/>
<CHAMPS INTITULE ="PRENOM"/>
<CHAMPS INTITULE ="VILLE"/>
<CHAMPS INTITULE ="AGE"/>
....
</TABLE>
<TABLE NOM ="VOL" >
....
ce que je souhaiterais serai un doc html qui m'affiche cela
donc j'ai fait une feuille xslPILOTE
NOM
PRENOM
VILLE
AGE
VOL
...
et quand je lance mon code
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
45
46
47
48 <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40" result-ns=""> <xsl:template match="/"> <HTML> <HEAD> <TITLE>Tables</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <xsl:apply-templates/> </BODY> </HTML> </xsl:template > <xsl:template match="TABLE"> <h1> <xsl:apply-templates select="@NOM" /> </h1> <xsl:template match="CHAMPS"> <h4> <xsl:apply-templates select="@NOM" /> </h4> </xsl:template > </xsl:template > </xsl:stylesheet>
j'obtiens cette structure HTML :
au lieu d'avoir<HTML><HEAD><TITLE>Tables</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">
<h1>PILOTE</h1><xsl:template match="CHAMPS"/><h4>PILOTE</h4>
<h1>VOL</h1><xsl:template match="CHAMPS"/><h4>VOL</h4>
</BODY></HTML>
comment ça se fait ??,<HTML><HEAD><TITLE>Tables</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">
<h1>PILOTE</h1>
<h4>NOM</h4>
<h4>PRENOM</h4>
<h4>VILLE</h4>
<h4>AGE</h4>
....
</BODY></HTML>
Merci
Partager