xsl:copy-of

Subject: xsl:copy-of
From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx>
Date: Mon, 17 Apr 2000 10:29:01 -0700
 
<emptbl>
  <empinfo>
  	<empname>
  		<fname>John</fname>
  		<lname>Woo</lname>
  	</empname>
  	<otherdetails>
  		<date>19990817</date>
  		<dept>Sales</dept>
  		<grade>B</grade>
  	</otherdetails>
  </empinfo>
  <empinfo>
  	<empname>
  		<fname>Joe</fname>
  		<lname>Dauber</lname>
  	</empname>
  	<otherdetails>
  		<date>19990513</date>
  		<dept>IT</dept>
  		<grade>A</grade>
  	</otherdetails>
  </empinfo>
</emptbl>



<xsl:template match="/"> 
<xsl:copy-of select="emptbl/empinfo[empname/fname='John' and
empname/lname='Woo']"/>
</xsl:template>

works for me.

But if I declare 2 variables like 

<xsl:variable name="first" select="John"/>
<xsl:variable name="last" select="Woo"/> and trying to use these inside
xsl:copy-of nothing comes.Can I give the values directly like I did in
xsl:variable or should I have to give in some other way.These 2 lines are
before template declaration.So can xsl:variable select go to that particular
node to select the value or is that the problem?


Francis


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


Current Thread