[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Scalar -> node-set conversion (was How to distinguish b/
Dimitre Novatchev wrote: >Anyway, it appears that there isn't a reliable way of finding whether >a parameter is a node-set or a scalar -- it's a pity, because something >as simple as a function (defined over a nodeset like count()) returning >NaN for a scalar would do the job. I'm sympathetic, but as I reviewed the possible ways to determine the difference, I also saw that it is highly unusual for it to matter. For example, it initially seems to matter whether the first argument to document() is a string or node-set, but if that node-set contains a single text node (which is what we're discussing), it turns out that it doesn't matter. The underlying question is whether XSLT is designed so that call-template can be used to act upon, or provide data about, a parameter of arbitrary type. If call-template must be used with some minimal pre-arrangement of the type of parameters it will pass, does that really impact a real-world use of XSLT? Sure, it's nice to be able to say "call my template with any arbitrary param, and I'll figure out its type and act accordingly" but that may be a luxury. I suggest that you send a request to the W3C Working Group on XPath for that expansion of the count() specs. It would be nice to have. .................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
|