From: Jérôme HELLIER (jhellier@nikopol.fr)
Date: 10/01/2001 - 18:04
Bonjour à tous !!!
J'ai un petit probleme. Voila : je voudrais afficher une chaine de
caracteres d'un document XML (balise <Caracteristique>)
par l'intermediaire d'une feuille XSL. Si j'affiche cette chaine directement
dans un fichier HTML, ca ne pose pas de probleme.
Mais mon fichier XML (et XML+XSL) affiche dans mon navigateur des rectangles
blancs a la place de l'apostrophe et des puces.
Je ne vois pas quel encodage utiliser pour afficher ces caracteres.
Petite precision : mes donnees sont extraites d'une base de donnees
FileMaker Pro par un module Lasso.
Quelqu'un a-t-il une solution a mon probleme ?
Merci d'avance !!! Voici mes fichiers :
===========Fichier XML================
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="fiche_article.xsl"?>
<Pile>
<Categorie>accumulateur</Categorie>
<SousCategorie>NICD</SousCategorie>
<norme_CEI></norme_CEI>
<marque>Saft</marque>
<Tension>2,4</Tension>
<Capacite>60</Capacite>
<Diametre></Diametre>
<Longueur>8.9</Longueur>
<Largeur>40.06</Largeur>
<Hauteur>20.3</Hauteur>
<Poids></Poids>
<Quantite1>25</Quantite1>
<Quantite2>50</Quantite2>
<Quantite3>100</Quantite3>
<Prix1>61.83</Prix1>
<Prix2>54.56</Prix2>
<Prix3>47.28</Prix3>
<CodeProduit>ABN7404</CodeProduit>
<Application></Application>
<AvantageProduit></AvantageProduit>
<condition_utilisation></condition_utilisation>
<unite_vente></unite_vente>
<connectique>ci - 4ph</connectique>
<Caracteristique>• Les modules SAFT intègrent les éléments
NICD rechargeables et permettent l’information sur carte de la fonction
secours.
• Boîtier hermétique classification UL94V-1, convient pour
soudures à la vague.
</Caracteristique>
</Pile>
===========Fichier XSL================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" />
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>page article</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<STYLE>
.titre { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
font-weight: bold; color: #FFFF00}
.titre2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
font-weight: bold; color: #000066}
.ref { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
font-weight: bold; color: #000066}
.prix { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
font-weight: bold; text-transform: capitalize; color: #CC0000} td
font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight:
normal}
.copyright { font-family: Arial, Helvetica, sans-serif; font-size: 11px;
color: #000066}
.info { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
font-weight: bold; }
</STYLE>
</HEAD>
<BODY bgcolor="#FFFFFF" leftmargin="80" topmargin="20" marginwidth="80"
marginheight="20" text="#000000" link="#000066" vlink="#000066"
alink="#000066">
<xsl:apply-templates />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="Pile">
<span class="titre2">Les info concernant la pile...</span><BR /><BR />
<xsl:call-template name="InfoComp" />
</xsl:template>
<xsl:template name="InfoComp">
<span class="titre2">Informations complémentaires : </span><BR /><BR />
<span class="info">
<xsl:if test="Application != ''">
Applications : <xsl:apply-templates select="//Application" /><BR /><BR />
</xsl:if>
<xsl:if test="AvantageProduit != ''">
Avantages : <xsl:apply-templates select="//AvantageProduit" /><BR /><BR
/>
</xsl:if>
<xsl:if test="condition_utilisation != ''">
Conditions d'utilisation : <xsl:apply-templates
select="//condition_utilisation" /><BR /><BR />
</xsl:if>
<xsl:if test="unite_vente != ''">
Unité de vente : <xsl:apply-templates select="//unite_vente" /><BR /><BR
/>
</xsl:if>
<xsl:if test="connectique != ''">
Connectique : <xsl:apply-templates select="//connectique" /><BR /><BR />
</xsl:if>
<xsl:if test="Caracteristique != ''">
Caractéristiques : <xsl:apply-templates select="//Caracteristique" /><BR
/><BR />
</xsl:if>
</span>
</xsl:template>
</xsl:stylesheet>
_________________________
Jérôme HELLIER
Developpeur
NIKOPOL, l'esprit créatif
--
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
|