Re: [xsl] loop without switching context

Subject: Re: [xsl] loop without switching context
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 23 Mar 2012 08:28:52 +0000
>I realized I could pass in the context node as a param, but it seems that is only giving me access to children and not ancestors of the context node.

Not so, unless you copied it. If you write

<xsl:with-param name="a" select="."/>

then the called template can do $a/ancestor::node().

Michael Kay
Saxonica

Current Thread