This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:copy-of
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: xsl:copy-of
- From: "Selva, Francis" <Francis dot Selva at purchasepro dot com>
- Date: Mon, 17 Apr 2000 10:29:01 -0700
- Reply-To: xsl-list at mulberrytech dot com
<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