[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] XPath for variable search anywhere

Subject: RE: [xsl] XPath for variable search anywhere
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 22 Jan 2004 14:55:48 +0200


> 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]"/>


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

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

Current Thread