Re: [xsl] self axis vs .

Subject: Re: [xsl] self axis vs .
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Fri, 6 Jun 2008 23:16:17 +0530
On Fri, Jun 6, 2008 at 9:28 PM, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
> It also works to test whether the current node is actually an 'elem' when
> you process it or traverse from it.
> Since when it isn't, it is silently filtered out, this could be regarded as
> either a feature or a bug.

I consider self::elem to be a very useful facility just for this reason.

the following example illustrates this:

<xsl:for-each select="*">
  <xsl:if test="self::elem">
    <!-- do something -->

Here I am traversing element nodes of any name. If a node in the list
is 'elem', I want to do something ...

Mukul Gandhi

Current Thread