velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stéphane MOR <stephane_lis...@yahoo.fr>
Subject Re: DVSL XPATH : Help Neede !
Date Mon, 12 Aug 2002 09:05:26 GMT
Charles Anthony wrote:

>[...]
>
>  
>
>><project>
>>  <plugin name="foo">
>>    <goal id="0" name="foo:bar">
>>      <prerequisite name="prereq:one"/>
>>      <prerequisite name="prereq:two"/>
>>    </goal>
>>  </plugin>
>>  <plugin name="prereq">
>>    
>>
>
>[...]
>
>  
>
>>For this I need to get the node "/plugin/goal" whose name equals
>>$prereq.attrib("name").
>>    
>>
>
>I think there's a confusion here with the root of your xpath expression..
>you are asking for the /plugin/goal node - whereas the root of the snippet
>is 'project'.
>
>try /project/plugin/goal[@name='$prereqName']
>or //plugin/goal[@name='$prereqName']
>
>(/project makes it explicit, //plugin means "find every plugin/goal under
>every node)
>
>All E&OE (it's over a year since I've used XPATH)
>
>Cheers,
>
>Charles.
>  
>
Thanx a lot !!!

It did just what I wanted, and that was a VERY quick answer (around 1 
minute if I trust mozilla mail ..) !
Are you a member of Geir-the-typing-monster's family ? :)

Cheers,
Stéphane


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message