Hi Adam, Have you tried using name() function like:
<xsl:apply-templates select="/*[name()=$parentNode]/*[name()=$childNode]"/> However, as far as I know name() function is there for "emergency" cases, rather than normal usage. If you know what the nodes might be, you might want to use several stylesheets and pick the right stylesheet dynamically. Cheers, -Alex --- Adam Flegman <[EMAIL PROTECTED]> wrote: > 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: [EMAIL PROTECTED] > Email #2: [EMAIL PROTECTED] > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
