[xsl] Re: Position() in apply-templates

Subject: [xsl] Re: Position() in apply-templates
From: David Rudel <fwqhgads@xxxxxxxxx>
Date: Tue, 1 Apr 2014 23:47:47 +0200
On Tue, Apr 1, 2014 at 11:18 PM, David Rudel <fwqhgads@xxxxxxxxx> wrote:
> My question is "When the "number assigned to that node" (as referenced
> in Kay) is considered the context position? :
> A. In the predicate of the select attribute of the
> <xsl:apply-templates> instruction?
> B. In the select attribute of any <xsl:with-param> instructions inside
> the <xsl:apply-templates> instruction?
> C. In the body of the <xsl:template> called by the
> <xsl:apply-templates> instruction?

The author of the 2001 post actually says something stronger: "The
xsl:apply-templates itself doesn't change the context in which
something is evaluated." This is in conflict with what Michael Kay's
book says.

Given that someone else supported the 2001 post, I'm going to conclude
that the author was at least correct in referring to the specifics
being asked, and was just wrong about the part where he said that
<xsl:apply-templates> does not change the context. Thus the answers to
my three questions are:

A. No
B. No
C. Yes

I just did a quick test to verify C. above.



"A false conclusion, once arrived at and widely accepted is not
dislodged easily, and the less it is understood, the more tenaciously
it is held." - Cantor's Law of Preservation of Ignorance.

Current Thread