This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Repeated Recursion on different parts of a tree
- From: "James Fuller" <james dot fuller at o-idev dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 30 Sep 2002 17:47:30 +0100
- Subject: RE: [xsl] Repeated Recursion on different parts of a tree
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Ok thanks James.
>
> I am aware of the call-template tag.
>
> However the issue I have was with the fact that
> if I was to call the template by name, how would I deal
> with the fact that I want to use the first <bitfield> node,
> and then the next and then the next etc.. with each pass of
> recursion?
>
> Below it is done by the select attribute, which
> <call-template> does not have?
>
> Thanks for the book reference. I have just ordered
> Michael Kays XSLT Programmers reference, but I may add that
> to my shopping list to.
>
>
> Thanks
>
>
> PD
just to add to M Kay prev post
you would use the following syntax to call a template
for example
<xsl:call-template name="sometemplatefunction">
<xsl:with-param name="my_nodes_i_want_to_apply_more_stuff_too"
select="/mynodes" />
</xsl:call-template>
see that the <xsl:with-param/> has a 'select statement
then the accompanying named template must declare a xsl:param to use it
within the context of the template
as so;
<xsl:template name="sometemplatefunction">
<xsl:param name="my_nodes_i_want_to_apply_more_stuff_too" select="/.." />
no do more stuff .....
</xsl:template>
gl, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list