logo       

Re: Uilisation de variables dans XPATH: msg#00080

Subject: Re: Uilisation de variables dans XPATH
On 20/12/2005 16:47,  Sylvain Wallez wrote :
> Joël Reungoat wrote:
>   
>> Bonjour,
>> Existe-il une manière de combiner dans un XPATH 2 variables (ou param), 
>> l'une de type node-set et l'autre de type string ?
>> Voici mon exemple : j'ai 2 variables (ou param) pouvant être définies 
>> comme suit
>>     <xsl:variable name="TheNode" select="/document"/><!-- Le node-set 
>> fixe de départ-->
>>     <xsl:variable name="ThePath" select="string('chapter[5]/title')"/> 
>> <!-- le chemin (variable) généré dynamiquement-->
>> Quand j'accède à <xsl:value-of select="$TheNode/chapter[5]/title"/> 
>> j'obtiens correctement ce que je veux.
>> Mais la syntaxe suivante est refusée : <xsl:value-of 
>> select="$TheNode/$ThePath"/>
>> Voyez-vous une astuce pour résoudre ce problème ?
>> Merci
>>   
>>     
>
> La fonction EXSLT dyn:evaluate [1] permet ça, mais elle n'est ni 
> standard, ni véloce.
>
> Sylvain
>
> [1] http://www.exslt.org/dyn/functions/evaluate/index.html
>
>   
Merci Sylvain, Matthieu
La solution de contournement par la fonction evaluate marche.
-- 
 Joel REUNGOAT
/
/




Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.drivers.b...    security.firewa...    mathematics.lps...    web.zope.plone....    x25/2005-12/msg...    culture.tv.sout...    pld.user.polish...    qplus.devel/200...    version-control...    openbsd.bugs/20...    distributions.g...    gnu.chess.bugs/...    redhat.release....    emacs.bugs/2002...    java.bio.genera...    ataraid/2005-01...    finance.moneyda...    hardware.microc...    netbsd.ports.xe...    bug-tracking.gn...    text.xml.saxon....    kde.linux/2002-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo