Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)

Subject: Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)
From: Miloslav Nic <nicmila@xxxxxxxxx>
Date: Tue, 20 Feb 2001 11:30:49 +0100
> I agree that for string manipulation, there's not much call for
> anything very sophisticated, and you can always call out to a named
> template if you need to.  However, for node-set manipulation that's
> not always an option - you can't get a named template to return a node
> set.

Actually you can:

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform";
version = "1.0" > 

<xsl:variable name="xxx">
  <xsl:call-template name="nodeset"/>
</xsl:variable>

<xsl:template name="nodeset">
  <aaa>1</aaa>
  <aaa>2</aaa>
  <aaa>3</aaa>
</xsl:template>

<xsl:template match="/">
  <xsl:value-of select="$xxx/aaa[2]"/>
</xsl:template>
</xsl:stylesheet> 



-- 
******************************************
<firstName> Miloslav </firstName>    
<surname>   Nic      </surname>     

<mail>    nicmila@xxxxxxxxx    </mail>   
<support> http://www.zvon.org  </support>
<zvonMailingList> 
    http://www.zvon.org/index.php?nav_id=4 
</zvonMailingList>

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


Current Thread