[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Assignment of note to variable without use of select

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

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...

So:

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

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.