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

[xsl] Store node into variable


Subject: [xsl] Store node into variable
From: "Yoann Moranville yoann.moranville@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Apr 2015 13:14:05 -0000

Hi,

Using xslt2, I am probably missing something stupid but can't figure out 
how to make the following working...

<xsl:variable name="date">
<xsl:copy-of select="$element/date"/>
</xsl:variable>
<xsl:variable name="date2" select="$element/date"/>
<xsl:message select="concat('date: ', name($date))"/>
<xsl:message select="concat('date2: ', name($date2))"/>


The output is:
---
date:
date2: date
---


I would need the $date to be the same node as $date2 (I want to use a 
"xsl:choose" in the $date variable).

Thanks,
Yoann


Current Thread