🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #243

XSLT XPath function: string translate (string, string, string)

#243
From: Une Bévue
Date: Mon, 30 Jan 2012 16:33
26 lines
2357 bytes
j'essaie de supprimer les accents dans une cha�ne :
<xsl:value-of select = "translate('�tre ou ne pas �tre ?',
'������������������������������ ?', 'AAAEEEEIIOOUUUCaaaeeeeiioouuuc--')"
/>
je souhaite obtenir :
'Etre-ou-ne-pas-etre--'

mais j'ai :
'AUtreounepasAtre'
m�me le ' ' (une espace) n'est pas "translat�" pourquoi ?

avant j'utilisait une fonction externe pour faire �a, mais avec ruby /
Nokogiri, je ne suis pas s�r que ce soit impl�ment�, en tk, je n'ai pas
trouv� la m�thode.

le but supprimer tous les accents et les symboles du genre '&@#?!;,:/=+'
pour les remplacer part un tiret '-'

peut-�tre existe t'il qqc de tout fait pour �a ?

mes fichiers sont en UTF-8

-- 
  � Tel n'a de chaleur pour ses amis, que pour les br�ler. � 
    (Proverbe arabe) 
Technical Details
Message-ID: <1kep1sr.1xxpnol1l1asfcN%unbewusst.sein@fai.invalid>
Path: arc1-ca.pugleaf.net!lh20ni241665pbb.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp15-1.free.fr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114f60,233e95a1a9934a45,start
X-Google-NewGroupId: yes
X-Google-Attributes: gid8a75585569,domainid0,public,usenet
X-Google-Language: FRENCH,ASCII
Received: by 10.68.73.229 with SMTP id o5mr11202745pbv.7.1327941203304;
        Mon, 30 Jan 2012 08:33:23 -0800 (PST)
Path: arc1-ca.pugleaf.net!lh20ni241665pbb.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp15-1.free.fr!not-for-mail
Newsgroups: fr.comp.text.xml
Subject: XSLT XPath function: string translate (string, string, string)
From: unbewusst.sein@fai.invalid (Une Bévue)
Date: Mon, 30 Jan 2012 17:33:22 +0100
Message-ID: <1kep1sr.1xxpnol1l1asfcN%unbewusst.sein@fai.invalid>
MIME-Version: 1.0
Organization: Oedipe Roi
X-Face: &pPJZaj=yETTJi[(==kP&`'Q;P^*m-|g$gyxFPnI&&}+;Ul=lZ_p6pQS!\#x]
        U4[^EN"1.E)El1acOX,9T\P2).0&^\5Fg';UzeOPF5\Su)"]oXFO9e=Z*Z4!+/</>A!Z
        GQ"IgmAM7Z%1AC9=w*Z&0:->1#.}/|4:GT1KOLp7CQkIm-ZdRm2RrCbD}|X<[VFA?]gI
        DX68liFMy#}lH<Vi'pewlEDG\>]RIKyk#]pSaJTB_RA7EY%Js^>{o)v#DZS&k#zv|Nsj
        O/aWDf\hl1+iN<IKtS%a?A:\yu;Q{.]fD%ObQgY?{2szAy_U
User-Agent: MacSOUP/F-2.8.3 (Mac OS X version 10.7.2 (x86))
Lines: 26
NNTP-Posting-Date: 30 Jan 2012 17:33:22 MET
NNTP-Posting-Host: 82.226.217.239
X-Trace: 1327941202 news-2.free.fr 26332 82.226.217.239:51015
X-Complaints-To: abuse@proxad.net
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit