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

Re: How to distinguish b/n a scalar and a node-set having a

Subject: Re: How to distinguish b/n a scalar and a node-set having a single textnode?
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 23 Oct 2000 13:13:34 -0600 (MDT)
Re: How to distinguish b/n a scalar and a node-set having a
Dimitre Novatchev wrote:
> I am trying to determine whether the value of a parameter is a scalar
> or a node-set, and to do so without using extension functions (I
> consider node-set() to be "standard", as it will be in XSLT 1.1).
> 
> The only problemetic case is:
> How to determine whether what seems to be a node-set having a single
> text node is actually a node set or whether it is a scalar (the value
> of the text node).

A parameter is going to be one of the 4 object types in XPath: boolean,
number, string, node-set, or the object type introduced in XSLT: result
tree fragment. There is no concept of 'scalar'.

I don't think there is a way to test for the type of object. The few
operations that are permissible on any type of object do not provide
helpful info. 

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


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


Current Thread

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.