Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2012, 07:48 PM
Registered User
 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default difference between with and without self in test condition

Hi,
We have the below xslt code in our proj which did not work today.

<xsl:if test="*[not(base:tit or tit)]">

But on modifying to below
<xsl:if test="*[not(self::base:tit or tit)]"> it worked

what is the difference between the two?

can you please help me in understanding this code?
 
Old June 19th, 2012, 03:17 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

self::X means is the current context node an X element, and X on its own is equivalent to child::X meaning the child nodes of the current context node.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?





Similar Threads
Thread Thread Starter Forum Replies Last Post
transition between Test, Bug, Test drodriguez BOOK: Professional Scrum with Team Foundation Server 2010 1 November 11th, 2011 05:35 AM
Usage of '*' in test condition of <xsl:when> vikkiefd XSLT 5 March 12th, 2008 10:31 PM
Problem with variable in test condition bartnowa XSLT 3 December 20th, 2007 07:31 AM
Having issues with a test condition... rbooth XSLT 3 November 11th, 2007 04:53 AM
Condition mateenmohd SQL Server 2000 6 May 6th, 2004 03:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.