velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Anthony <>
Subject RE: DVSL XPATH : Help Neede !
Date Mon, 12 Aug 2002 08:50:18 GMT

> <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)



This email and any attachments are strictly confidential and are intended
solely for the addressee. If you are not the intended recipient you must
not disclose, forward, copy or take any action in reliance on this message
or its attachments. If you have received this email in error please notify
the sender as soon as possible and delete it from your computer systems.
Any views or opinions presented are solely those of the author and do not
necessarily reflect those of HPD Software Limited or its affiliates.

 At present the integrity of email across the internet cannot be guaranteed
and messages sent via this medium are potentially at risk.  All liability
is excluded to the extent permitted by law for any claims arising as a re-
sult of the use of this medium to transmit information by or to 
HPD Software Limited or its affiliates.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message