xsl-list
[Top] [All Lists]

RE: XPath for variable search anywhere

2004-01-22 05:55:48
Hi,

I have a variable in my XSL (call it myVar) and I wish to 
search the entire 
node hierarchy for nodes which share it's name.  You could 
say I want to 
combine the syntax

<xsl:copy-of select="//aNodeName">

with

<xsl:copy-of select="$myVar">

but the syntax I want

<xsl:copy-of select="//$myVar">

causes my processor (4suite) to generate an XsltException.  
Does anybody 
know the syntax I need to look at all levels of the hierarchy 
for nodes that 
have the name (or attribute) "myVar"?

  <xsl:copy-of select="*[name() = $myVar]"/>

Cheers,

Jarno - Hocico: Ruptura (Motherfucker 667 Remix by CombiCrist)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>