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

Re: distinguish whether variable holds string or node

Subject: Re: distinguish whether variable holds string or node set
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sun, 13 Jun 2010 11:51:51 +0200
Re:  distinguish whether variable holds string or node
TW wrote:

Is there a way to determine whether a variable holds a string or a
node set? Something like:

<xsl:template name="my-template">
  <xsl:param name="arg"/>
    <xsl:when test="pseudo test: type($arg)='node-set'">Do something</xsl:when>
    <xsl:otherwise>Do something else</xsl:otherwise>

I'm looking for an XSLT 1.0 solution as I want it to work in browsers.

ESLT has object-type
Firefox supports that since Firefox 3.0 I think, I am not sure about other browsers, as libxslt supports that function and I think Safari and Google chrome use libxslt chances are they support it.
I don't think MSXML used by IE supports it.


	Martin Honnen

Current Thread


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.
First Name
Last Name
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.