Article View: fr.comp.text.xml
Article #143Re: Xslt avec une seconde base xml
From: CrazyCat
Date: Mon, 04 Jan 2010 20:23
Date: Mon, 04 Jan 2010 20:23
25 lines
2164 bytes
2164 bytes
Le 04/01/2010 20:56, Alain Ketterlin a écrit :
> Si le fichier ne dépend vraiment pas du contexte, autant le mettre dans
> une variable globale (pour éviter le coût avec les processeurs qui
> n'optimiseraient pas).
Tout à fait, pour l'instant j'en suis à la version "j'essaye de faire
tourner" donc le code n'est pas du tout optimisé.
> existe... En plus tu donnes un chemin absolu. Je te conseille de relire
> la section portant sur document() dans la recommandation XSLT. Pour ton
> cas, je te suggère :
> - soit document("Cities.xml",/)
> - soit document("/home/user/Cities.xml")
Noté.
> Enfin, $CityId/@CityId recherche l'attribut CityId dans l'élément
> désigné par $CityId. Ce n'est pas non plus ce que tu cherches. Tu
> cherches dans le document de racine $CityId l'élément City dont
> l'attribut CityId a la même valeur que l'élément CityId de l'élément
> contextuel. En clair : $CityId/Cities/City[@CityId=current()/CityId]
> mais je te conseille de passer par une variable, puisque tout porte le
> même nom.
Ok, je teste ça dès demain matin et je dis quoi.
Technical Details
Message-ID:
<hhtink$klr$1@speranza.aioe.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!not-for-mailReferences:
<hht9da$692$1@speranza.aioe.org> <871vi54pa0.fsf@dpt-info.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Thread: 8a75585569,ea8c1daf85e4d2b6 X-Google-Attributes: gid8a75585569,public,usenet X-Google-NewGroupId: yes X-Google-Language: FRENCH,UTF8 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!not-for-mail From: CrazyCat <crazycat@c-p-f.org> Newsgroups: fr.comp.text.xml Subject: Re: Xslt avec une seconde base xml Date: Mon, 04 Jan 2010 21:23:17 +0100 Organization: Aioe.org NNTP Server Lines: 25 Message-ID: <hhtink$klr$1@speranza.aioe.org> References: <hht9da$692$1@speranza.aioe.org> <871vi54pa0.fsf@dpt-info.u-strasbg.fr> Reply-To: crazycat@c-p-f.org NNTP-Posting-Host: FP4atChjGrKl42WvpM7ffA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.1 Cancel-Lock: sha1:0M8QYx53NrsCC4/zG8xA8ubYqoU= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0