View Single Post
  #3 (permalink)  
Old March 12th, 2004, 08:54 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Try:
Code:
<xsl:template name="FOO">
   <xsl:param name="number"/>
   <xsl:copy-of select="/root/*[name() = concat('node', $number)]"/>
</xsl:template>
or
Code:
<xsl:template name="FOO">
   <xsl:param name="number"/>
   <xsl:copy-of select="//*[name() = concat('node', $number)]"/>
</xsl:template>
if you don't the exact position of the nodes to find. If yur source document has namespaces you will need to change name() to local-name() or alter the XPath to include the namespace.


Joe (MVP - xml)
Reply With Quote