🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Comment calculer ceci avec xsl/xpath

#349
From: Nicolas M
Date: Thu, 29 Nov 2007 13:08
32 lines
2013 bytes
Nicolas M a �crit :
> Nicolas M a �crit :
> 
> Par contre maitnenant j'ai un autre probl�me, je voudrais pouvoir 
> utiliser chaque �l�ment de
> tokenize(replace(normalize-space(@labelSignature),'\\\s',''),'\s+')
> dans une boucle

Bon en fait il suffisait d'utiliser un foreach, et la valeur du token 
c'est "."

Par contre maintenant j'ai un autre probl�me, je cherche la valeur d'un 
attribut d'un �l�ment qui a un attribut de la valeur de mon token, or 
SAXON ne veut pas que je fasse de select car je suis sur une valeur 
atomic et non un noeud :


<xsl:for-each select="tokenize(my_string)">						<xsl:variable 
name="label" select="."/>						<xsl:variable name="id" 
select="//mynode[@label=$label]/@id"/>
	<xsl:value-of select="$id"/>
</xsl:for-each>


"Cannot select a node here: the context item is an atomic value"


Des id�es ?

Merci d'avance,

Nicolas
Technical Details
Message-ID: <474eb9b3$0$13172$426a34cc@news.free.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed2-b.proxad.net!nnrp3-2.free.fr!not-for-mail
References: <474d9b43$0$14888$426a74cc@news.free.fr> <474dabbe$0$31481$426a74cc@news.free.fr> <474e721c$0$14499$426a74cc@news.free.fr> <474e7382$0$10874$426a34cc@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!cleanfeed2-b.proxad.net!nnrp3-2.free.fr!not-for-mail
Date: Thu, 29 Nov 2007 14:08:02 +0100
From: Nicolas M <n.mo_AT_free.fr@nospam.invalid>
User-Agent: Thunderbird 2.0.0.6 (X11/20071022)
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> <474dabbe$0$31481$426a74cc@news.free.fr> <474e721c$0$14499$426a74cc@news.free.fr> <474e7382$0$10874$426a34cc@news.free.fr>
In-Reply-To: <474e7382$0$10874$426a34cc@news.free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 32
Message-ID: <474eb9b3$0$13172$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 29 Nov 2007 14:08:03 MET
NNTP-Posting-Host: 193.49.107.116
X-Trace: 1196341683 news-4.free.fr 13172 193.49.107.116:42234
X-Complaints-To: abuse@proxad.net