[Bug 1754] [FS] editorial: 7.2.1, 7.2.2, 7.2.10: normalizing calls to particular functions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1754


jmdyck@ibiblio.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Comment #2 from jmdyck@ibiblio.org  2006-10-05 23:08 -------
In 7.2.1 and 7.2.2, the new STA rules look up fs:last and fs:position in
statEnv.varType in order to get their type. But 3.1.2 tells us that "the type
of $fs:position and $fs:last is always xs:integer", so it seems you could make
the STA rules simpler:
    ---------
    statEnv |- (FN-URI,"last")() : xs:integer

    ---------
    statEnv |- (FN-URI,"position")() : xs:integer

Moreover, this is exactly the conclusion one would draw by simply looking up
fn:last or fn:position in statEnv.funcType. So given that section 7.2 is for
functions "for which the standard normalization or static typing rules are not
appropriate" and that "the static typing rules in this section always give more
precise type information than the generic rule based on the function's
signature", it would appear that fn:last and fn:position don't belong in 7.2.


In the new DEv rules in 7.2.1 and 7.2.2, the conclusions
    dynEnv |- (FN-URI,"last")() => Value
    dynEnv |- (FN-URI,"position")() => Value
use an undeclared form.

Perhaps what you mean is
    dynEnv |- function (FN-URI,"last") with types on values yields Value
    dynEnv |- function (FN-URI,"position") with types on values yields Value

Received on Thursday, 5 October 2006 23:08:38 UTC