🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Comment calculer ceci avec xsl/xpath

#346
From: Peyo
Date: Wed, 28 Nov 2007 17:56
23 lines
1729 bytes
Nicolas M a �crit :

> j'ai un champ truc="un deux trois quatre" 

un attribut dont la valeur est �gale � "un deux trois quatre"

> la seule chose que mon esprit tordu a pondu, c'est quelque chose 
> d'approchant, mais qui ne compile pas sous JAXP :

Etant donn� que c'est du XPath 2.0, c'est bien possible ! Peu d'outil(s) 
supportant cette spec...

> string-length(replace(replace(normalize-space(@truc),'\\\s 
> ',''),'\S*',''))"

L'id�e est bonne, mais pourquoi ne pas aller voir du c�t� de tokenize() 
qui est l� pour �a ?

En XSLT 1.0, un template nomm� qui s'appelle r�cursivement en passant 
substring-after() dans le param�tre et qui retourne le nombre 
d'iterations lors du dernier appel devrait pouvoir le faire.

p.
Technical Details
Message-ID: <474dabbe$0$31481$426a74cc@news.free.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp15-1.free.fr!not-for-mail
References: <474d9b43$0$14888$426a74cc@news.free.fr>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114f60,903a3b7f8d7bea5a
X-Google-Attributes: gid114f60,public,usenet
X-Google-Language: FRENCH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp15-1.free.fr!not-for-mail
Date: Wed, 28 Nov 2007 18:56:14 +0100
From: Peyo <ou.c@est.ca>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
Newsgroups: fr.comp.text.xml
Subject: Re: Comment calculer ceci avec xsl/xpath
References: <474d9b43$0$14888$426a74cc@news.free.fr>
In-Reply-To: <474d9b43$0$14888$426a74cc@news.free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 23
Message-ID: <474dabbe$0$31481$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 28 Nov 2007 18:56:14 MET
NNTP-Posting-Host: 82.236.174.106
X-Trace: 1196272574 news-2.free.fr 31481 82.236.174.106:2148
X-Complaints-To: abuse@proxad.net