This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


> 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@idoox.com    </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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]