Hi Adam,

I don't think select="$parentNode/ will work.  You
cannot use variables in place of element names.

Alex

--- Adam Flegman <[EMAIL PROTECTED]> wrote:
> > 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.
> 
> Hi Alex,
> 
> In some cases I actually had the node corresponding
> to the parent and tried
> using the name() function to match the $childNode
> portion but it still didn't
> work.
> 
> select="$parentNode/*[name()=$childNode]"
> 
> ($parentNode is an actual node, $childNode was the
> name of the desired target
> node below the parent).
> 
> 
> I was hoping to use this approach to help
> cleanup/refactor some verbose xslt
> code I have inheirited. Its not really a critical
> problem as the existing code
> is functionally correct, I was just trying to tidy
> it up a bit.
> 
> 
> 
> Ad.
> 
> 
> =====
> 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]

Reply via email to