[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: How to distinguish b/n a scalar and a node-set havin
Dimitre Novatchev wrote: >> I am trying to determine whether the value of a parameter is a >> scalar [boolean/number/string] >> 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 unsolved case remains when $pValue contains exactly one >>text node. Depending on what node-set(string) does, you may be able to build something based on unions. If $pValue is a node-set, then ($pValue | $pValue) is a node-set with the same count, because it's a union of two references to the same node-set. Unfortunately, putting a "scalar" string in either a union or count() is an error. If node-set($pValue) for a scalar $pValue produces a different node-set on each invocation, then the union of two of them will yield a node-set with a count() of 2. If node-set($pValue) for $pValue being a node-set already simply passes through the same node-set, then the union of two of them will yield a node-set with a count() of 1. .................David Marston 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
|