Re: [xslt] math:max and node-sets



"William M. Brack" wrote:
> My apologies for missing your NaN test, but I assume you agree with my
> other points.
> 
> Regards,
> 
> Bill


Well, I agree - almost :)
I actually did not know that the context is important for the
element-available function, sorry.

But I'm still not so shure about what you said here:

>Your description of the problem, as well as your
>variable name, shows that you believe foo:getMaxVal is giving
>math:max a nodeset as its argument.  This is, unfortunately, *not*
>correct.  The variable resNodeSet, even though it "selects" a
>node-set, is by definition a Result Tree Fragment.

The XSLT spec http://www.w3.org/TR/xslt#variables (that is, XSLT 1.0)
says that "if the variable-binding element has a select attribute, then
the value of the attribute must be an expression and the value of the
variable is the object that results from evaluating the expression."
Well, evaluating the expression exsl:node-set($resNodes) results in a
node-set (according to the EXSLT spec). Otherwise
math:max($resNodeSet/*) would  even be and invalid expression, because
(according to the XSLT spec) "it is not permitted to use the /, //, and
[] operators on result tree fragments". Or do I get something wrong
here?

By the way, it is not my aim to criticize your work. Maybe my words
sound harsher than intended (like the "another xsltproc misconduct"
phrase). This is due to my limitations in English. I am not a native
speaker and sometimes simply don't know how to express things better.
Sorry.

Markus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]