This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

xsl:copy-of



 
<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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]