Subject: [xsl] Re: Re: node-set From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Thu, 5 Jul 2001 04:52:52 -0700 (PDT) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Convert the sign of a num, Daniel Newman | Thread | [xsl] xsl:for-each, ram ragu |
RE: [xsl] Convert the sign of a num, Daniel Newman | Date | Re: [xsl] Re: RE: Re: XPath riddle, David Carlisle |
Month |