[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: self axis vs .

Subject: Re: self axis vs .
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Fri, 6 Jun 2008 23:16:17 +0530
Re:  self axis vs .
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 -->
  </xsl:if>
</xsl:for-each>

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


-- 
Regards,
Mukul Gandhi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.