Re: [xsl] Testing a variable for node

Subject: Re: [xsl] Testing a variable for node
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 09 Oct 2009 14:55:51 +0200
rowan@xxxxxxxxxxxxxxxxxxxxx wrote:
How do I test a variable to see whether it contains a node, or something
else (usually, in the case I'm working on, an empty string)? Everything I
try causes an error if the variable contains a string. I have some code
that will only work on nodes, and before calling this code I need to test
and do something different if the variable doesn't contain a node.

Is that XSLT/XPath 1.0 or 2.0? With 2.0 there is the operator 'instance of': $v instance of node()


--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread