[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: testing for typeof
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 6 May 2003 07:42:28 +0100
Look for the "instance of" operator:

<xsl:if test="$item instance of node()*">
<xsl:if test="$item instance of xs:string">
etc

The syntax has changed slightly in the latest working draft (published
yesterday): Saxon 7.5 implements the new syntax.

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Rob Rohan
> Sent: 06 May 2003 04:56
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  testing for typeof
> 
> 
> 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?
> 
> 2.0 (or at least The Saxon XSLT Processor from Michael Kay 
> v7.4) :) has a strongly typed overtones, and it seems like 
> these would be standard functions -
> 
> can some one point me in the right direction please
> 
> thanks
> 
> -- 
> Rob Rohan <me@xxxxxxxxxxxx>
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member