cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <colle...@umn.edu>
Subject Re: dynamic node selection
Date Wed, 23 Jul 2003 23:07:02 GMT
Adam Flegman wrote:

>For example if parameters parentNode = "foo" and childNode = "bar", then
>$targetNode would evaluate to the string "foo/bar". I would want the 'for-each'
>statement to select all the "bar" nodes under the "foo" parent node.
>
>I think the only step I am missing is how to write a xpath node selection query
>that can take a string parameter as its argument.
>  
>

Well, if you have your xpath in $targetnode, wouldn't it simply be:

<xsl:apply-templates select="$targetnode"/>    ?

or

<xsl:for-each select="$targetnode">
    <xsl:apply-templates/>
</xsl:for-each>

To go along with your code.   I haven't done XSLT in a while, so I'm a 
little rusty.

Tony


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message