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

Re: testing for typeof

Subject: Re: testing for typeof
From: Rob Rohan <me@xxxxxxxxxxxx>
Date: 05 May 2003 21:10:51 -0700
xslt2 object type function
> I am playing around with xslt2.0, and I need a way to test the typeof
> something. I did a quick search on google, and I have greped my quick
> reference (1.0 though). Is there a way, or some totally obvious function
> to say something like
> 
> <xsl:if test="isNodeset(item)"...
> <xsl:if test="isString(item)"...
> <xsl:if test="isFloat(item)"...
> etc?

Ok, new question I found a way :)
http://www.exslt.org/exsl/functions/object-type/index.html

Which is built into Saxon7.4 (Saxon rocks) - but when I try to use it I
get:

No method matching objectType with 1 parameter found in class
net.sf.saxon.exslt.Sets

when passing

...xmlns:set="http://exslt.org/sets"...

<xsl:value-of select="set:object-type('test')" />


According to the site:

Function Syntax
string exsl:object-type(object)

The exsl:object-type function returns a string giving the type of the
object passed as the argument. The possible object types are: 'string',
'number', 'boolean', 'node-set', 'RTF' or 'external'. 

Confusion


-- 
Rob Rohan <me@xxxxxxxxxxxx>


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


Current Thread
  • testing for typeof
    • Rob Rohan - Mon, 5 May 2003 23:59:12 -0400 (EDT)
      • Rob Rohan - Tue, 6 May 2003 00:14:25 -0400 (EDT) <=
        • Rob Rohan - Tue, 6 May 2003 00:44:56 -0400 (EDT)
      • Michael Kay - Tue, 6 May 2003 02:42:42 -0400 (EDT)
      • <Possible follow-ups>
      • me - Tue, 6 May 2003 03:01:06 -0400 (EDT)

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.