From: Eric van der Vlist (vdv@dyomedea.com)
Date: 03/01/2001 - 12:00
Veauleger François wrote:
>
> Chez moi ca ne fonctionne pas...
Comme symptome, ce n'est pas très précis :=) ...
Pouvez-vous essayer ceci:
----source----
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\Java\tests\Veauleger.xsl"?>
<formulaire>
<speculation>M0000481</speculation>
<descriptif_technique>
<langue>32</langue>
<autres_langues></autres_langues>
</descriptif_technique>
</formulaire>
----xslt----
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lan="http://xmlfr.org/ns/langues" exclude-result-prefixes="lan">
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>
<lan:langues>
<langue id="32">Français</langue>
<langue id="16">Indi</langue>
<langue id="8">Breton</langue>
</lan:langues>
<xsl:template match="langue" name="langues">
<xsl:param name="langues" select="concat(., ',')"/>
<xsl:if test="$langues">
<li>
<xsl:value-of
select="document('')/xsl:stylesheet/lan:langues/langue[@id=substring-before($langues,
',')]"/>
</li>
<xsl:call-template name="langues">
<xsl:with-param name="langues" select="substring-after($langues,
',')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/">
<html>
<head>
<title>Bon de speculation Medias Interactifs</title>
</head>
<body>
<table cellSpacing="0" cellPadding="1" border="0" width="680">
<tr height="33">
<td>
<font color="#7676C5">
<b>Langue:
</b>
</font>
<xsl:apply-templates
select="/formulaire/descriptif_technique/langue"/>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
----résultat----
<?xml version="1.0" encoding="ISO-8859-1"?>
<html>
<head>
<title>Bon de speculation Medias Interactifs</title>
</head>
<body>
<table cellSpacing="0" cellPadding="1" border="0" width="680">
<tr height="33">
<td>
<font color="#7676C5">
<b>Langue:
</b>
</font>
<li>Français</li>
</td>
</tr>
</table>
</body>
</html>
Cordialement,
Eric van der Vlist
> Veauleger Francois
> Kenobee
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://dyomedea.com
http://xmlfr.org http://4xt.org http://ducotede.com
------------------------------------------------------------------------
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:05 UTC
webmaster@xmlfr.org
|