cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Flegman <adam_fleg...@yahoo.com>
Subject dynamic node selection
Date Wed, 23 Jul 2003 22:30:07 GMT
Hi Guys,

I have been trying to re-factor some existing xslt code and wonder if it is
possible to select nodes based on a string.

The string is built up by parameters so the value of the target node is
determined each time the xsl template is called. I am having trouble using the
string to select the target node. In the sample below I can calculate the name
of the target node I am after, but I am unsure how to convert the name into an
actual node.


<xsl:template name="createOptionList">
   <xsl:param name="parentNode" select="string()" />
   <xsl:param name="childNode" select="string()" />

   <xsl:variable 
        name="targetNode" 
        select="concat(name($listNode),'/',$listItem)" />


   <xsl:for-each select="$targetNode" >
       ... do the processing ....
   </xsl:for-each>

        
Any advice, greatly appreciated.


Adam.

=====
Adam Flegman - Senior Software Engineer

Mobile:     (0414) 375 735
Phone:     (07) 5547 8530
Facsimile: (07) 5547 8532
Email #1: adam_flegman@yahoo.com 
Email #2: planemad@optusnet.com.au

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Mime
View raw message