Article View: fr.comp.text.xml
Article #8255Re: Parser et r�ecrire � l'identique
From: Pascal CESCON
Date: Tue, 06 Nov 2001 12:53
Date: Tue, 06 Nov 2001 12:53
43 lines
2480 bytes
2480 bytes
<xsl:output method = "xml" encoding="ISO-8859-1"/>
<xsl:variable name="aremplacer" select="'����������������&'"/>
<xsl:variable name="remplacant" select="'eeeeaaaciinoouuu '"/>
<xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="translate(., $aremplacer, $remplacant)"/>
</xsl:template>
Ca marche du feu de dieu !!!
Merci Alain
"Alain Ketterlin" <alain@dpt-info.u-strasbg.fr> a �crit dans le message de
news: wypu6wyx8d.fsf@polya.u-strasbg.fr...
> "Pascal CESCON" <pascal.cescon@cityneo.com> writes:
>
> > Voici mon probl�me suivant....
> > Maintenant que je sais grace � vous appliquer un transalte � tous les
noeuds
> > texte d'un XML (voir message: appliquer translate � tout un document),
> > j'aimerai parser un fichier XML, r�ecrire en sortie sa structure �
> > l'identique en y appliquant les translates sur les noeud texte....
>
> <xsl:template match="node()">
> <xsl:copy>
> <xsl:apply-templates select="node()"/>
> </xsl:copy>
> </xsl:template>
>
> A placer apres le template sur text(), ou bien jouer avec les
> priorites pour eviter de suizzer le template sur text().
>
> > pas chiant le type ....
>
> Non non. Si mes souvenirs sont bons, je crois que c'est la bonne voie
> pour ton probleme.
>
> -- Alain.
Technical Details
Message-ID:
<9s8mg1$4ok$1@wanadoo.fr>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!not-for-mailReferences:
<9s8eqk$qgn$1@wanadoo.fr> <wypu6wyx8d.fsf@polya.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,552a7683a4a15e42 X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-11-06 04:53:22 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!not-for-mail From: "Pascal CESCON" <pascal.cescon@cityneo.com> Newsgroups: fr.comp.text.xml Subject: Re: Parser et r�ecrire � l'identique Date: Tue, 6 Nov 2001 13:53:21 +0100 Organization: Wanadoo, l'internet avec France Telecom Lines: 45 Message-ID: <9s8mg1$4ok$1@wanadoo.fr> References: <9s8eqk$qgn$1@wanadoo.fr> <wypu6wyx8d.fsf@polya.u-strasbg.fr> NNTP-Posting-Host: amarseille-101-1-1-5.abo.wanadoo.fr X-Trace: wanadoo.fr 1005051201 4884 193.252.177.5 (6 Nov 2001 12:53:21 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 6 Nov 2001 12:53:21 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000