[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: node-set
Francis Norton wrote: > > Michael Kay wrote: > > > > > Simulating dynamic evaluation of XPath Expressions "by > > > calling selectNodes() within > > > a JScript extension" is not always possible. > > > > ... > > Microsoft's selectNodes() function is very inadequately documented, but I > > think you are almost certainly right. > > > And, at the risk of stating the obvious, selectNodes does return > nodesets, so you can't use if for any XPath expression which returns a > number, string or boolean. > > I hope that when an XPath query function does get included in the DOM > (is it in DOM 3?) they get this right, it's a frustrating limitation. This can be done with JScript + MSXML3 (as is currently implemented in the XPath Visualiser). One can catch the exception thrown by selectNodes() and check the error message text (unfortunately the same error number is used by MS for several different errors). Then, in case this is the text for "our" error message, in a special stylesheet change a parameter's "select" attribute to our XPath expression and apply the stylesheet. The only thing this stylesheet does is to copy the (scalar) value of the parameter to the output. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ 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
|