Re: [xsl] Testing a variable for node

Subject: Re: [xsl] Testing a variable for node
From: "rowan@xxxxxxxxxxxxxxxxxxxxx" <rowan@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Oct 2009 09:09:56 -0400
>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.

Martin.Honnen@xxxxxx wrote:
>Is that XSLT/XPath 1.0 or 2.0?
>With 2.0 there is the operator 'instance of':
>   $v instance of node()

I'm using 2.0 and this does exactly what I need. Great advice as usual!

Thanks - Rowan


--------------------------------------------------------------------
mail2web.com - Microsoft. Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange

Current Thread