Subject: Re: [xsl] Testing a variable for node From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Fri, 09 Oct 2009 14:55:51 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Testing a variable for node, rowan@xxxxxxxxxxxxxx | Thread | Re: [xsl] Testing a variable for no, David Carlisle |
[xsl] Testing a variable for node, rowan@xxxxxxxxxxxxxx | Date | [xsl] collection() issue with dtd r, Mario Madunic |
Month |