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

RE: Test for current node being an element or attribut

Subject: RE: Test for current node being an element or attribute?
From: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Tue, 10 Dec 2002 19:07:49 -0000
test current node
Maby generate-id()=generate-id(../namespace::*) ??


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Dimitre
Novatchev
Sent: terça-feira, 10 de Dezembro de 2002 18:40
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Test for current node being an element or attribute?



"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


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


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.