Discussion:
Nom
JC Dufour
2004-02-09 10:37:35 UTC
Permalink
Bonjour,



Comment peut-on récupérer le path (ou du moins le nom du nœud qui match avec
un template).



Exemple :

<ROOT>

<ELEMENT1/>

<ELEMENT2/>

<ELEMENT3/>

<ELEMENT4/>

<ELEMENT5/>

<ROOT>



<xsl:template match="*">

<xsl:value-of />

<xsl ?????? RECUPERER NON PAS LA VALEUR MAIS LE NOM DU NOEUD : ROOT, PUIS
ELEMENT1 etc…..>

</xsl:template>





Merci beaucoup pour votre aide
Robin Berjon
2004-02-09 10:54:30 UTC
Permalink
Comment peut-on récupérer le path (ou du moins le nom du n�ud qui match avec
un template).
<xsl ?????? RECUPERER NON PAS LA VALEUR MAIS LE NOM DU NOEUD : ROOT, PUIS
ELEMENT1 etc�..>
name() ou local-name(), selon ce que tu veux.
--
Robin Berjon
PENNEC Vincent
2004-02-09 13:09:06 UTC
Permalink
Bonjour,

Dans la même veine, quelqu'un aurait un "template" tout fait pour "convertir" un xml en un fichier html ?

Mon xml
<root>
<element>
</element>
</root>

Application du xsl
Html de sortie
<html>
<body>
Votre document d'origine était :<br>
&gt;root&lt;<br>
&nbsp;&gt;element&lt;<br>
&nbsp;&gt;/element&lt;<br>
&gt;/root&lt;<br>
</body>
</html>

En espèrant m'être fait comprendre
Merci
Post by JC Dufour
Comment peut-on récupérer le path (ou du moins le nom du n ud qui
match avec un template).
<xsl ?????? RECUPERER NON PAS LA VALEUR MAIS LE NOM DU
NOEUD : ROOT,
PUIS ELEMENT1 etc ..>
name() ou local-name(), selon ce que tu veux.
--
Robin Berjon
--
f***@ajlsm.com
2004-02-09 13:36:23 UTC
Permalink
Post by JC Dufour
Bonjour,
Dans la même veine, quelqu'un aurait un "template" tout fait pour "convertir" un xml en un fichier html ?
Mon xml
<root>
<element>
</element>
</root>
Application du xsl
Html de sortie
<html>
<body>
Votre document d'origine était :<br>
&gt;root&lt;<br>
&gt;/root&lt;<br>
</body>
</html>
J'ai une xml2html.xsl qui produit du code comme ceci :
<http://www.ajlsm.com//projets/strabon/wp7/xml2html.html>
Un ctrl+a sous IE devrait vous suffire à en avoir le code (test,
regarder l'xsl dans IE, elle s'appelle elle-même, Mozilla n'aime pas).
--
Frédéric Glorieux http://www.strabon.org
AJLSM, ingénieur documentaire Maison des Sciences de l'Homme
<***@ajlsm.com> 54 Boulevard Raspail 75006 PARIS
tel +33 (0)1 49 54 22 22 fax +33 (0)1 49 54 21 80
PENNEC Vincent
2004-02-09 14:35:02 UTC
Permalink
Merci,

Cela m'a l'air (plus que) parfait
Post by JC Dufour
Bonjour,
Dans la même veine, quelqu'un aurait un "template" tout fait pour
"convertir" un xml en un fichier html ?
Mon xml
<root>
<element>
</element>
</root>
Application du xsl
Html de sortie
<html>
<body>
Votre document d'origine était :<br>
&gt;root&lt;<br>
&gt;/root&lt;<br>
</body>
</html>
<http://www.ajlsm.com//projets/strabon/wp7/xml> 2html.html>
Un
ctrl+a sous IE devrait vous suffire à en
avoir le code (test,
regarder l'xsl dans IE, elle s'appelle elle-même, Mozilla n'aime pas).
--
Frédéric Glorieux
http://www.strabon.org
AJLSM, ingénieur documentaire
Maison des Sciences de l'Homme
75006 PARIS
tel +33 (0)1 49 54 22 22 fax +33 (0)1
49 54 21 80
Loading...