Re: [xsl] Test for current node being an element or attribute?

Subject: Re: [xsl] Test for current node being an element or attribute?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 10 Dec 2002 10:39:36 -0800 (PST)
"Michael Kay" <michael.h.kay@xxxxxxxxxxxx> wrote in message
news:000601c2a060$f5b8d1b0$6401a8c0@xxxxxxxxxx
> > 
> > what about:
> > 
> > <xsl:if test="../@*[current()]">
> > 
> 
> Stop guessing, and read the spec.
> 
> current() returns a node-set. When used in a predicate, [current()]
> returns true if the node-set is non-empty. It is.


OK, here's one correct test if the current node is an attribute:

count(. | ../@*) = count(../@*) 


Can you, friends, guess how to test if the cirrent node is a namespace?
:o)




=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread