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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format