This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to distinguish b/n a scalar and a node-set having a single textnode?
- To: xsl-list at mulberrytech dot com
- Subject: Re: How to distinguish b/n a scalar and a node-set having a single textnode?
- From: Mike Brown <mike at skew dot org>
- Date: Mon, 23 Oct 2000 13:13:34 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
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