[xsl] Assignment of note to variable without use of select

Subject: [xsl] Assignment of note to variable without use of select
From: "Roland Honsch" <roh@xxxxxxxxxxxx>
Date: Tue, 21 Oct 2003 09:00:34 -0400

I am trying to have a named template return a node (or would it be a result tree fragment) which is in turn assigned to a variable or parameter.

Using the named template (unless I am unaware of some alternative technique) seems to leave me with having the assign the value of the variable without select...


<xsl:variable name="my_element">
  <xsl:call-template name="element.get">
    <xsl:with-param name="this" select="$this"/>

Unfortunately, I cannot seem to find any way to actually have the element.get template to return a reference to a node.

Just for a bit of background:
I am trying to use this method because the node directly specified by $this may have attributes which cause the element not to be processed, or it may actually have attributes noting that the actual data is contained in another xml file (in which case the node returned would be in that other document).

Why not just simple have the code directly inside the xsl:variable tags?  Because requests for elements occur from a couple of different places, and it would be ideal to have the code appear only once and be both easily updatable and stylesheet-wide accessible.

Is there a way to do this?  I think there are probably ways in XSLT 2.0--but that is not what I am working with.

Thanks in advance!
Roland Hönsch
Account Manager
ThinData Inc. - www.thindata.com <http://www.thindata.com> 
Tel: (416) 361 - 3522 ext. 244
Fax: (416) 361 - 1265

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

Current Thread