Re: fn:foot, fn:truncate, fn:item-at

> slice($seq, -1)  to get the last item

> slice($seq, $N) to get the Nth item

> slice($seq, 1 to count($seq)-1) to get all but the last

-10  !

$seq[last()]

$seq[$n]

$seq[position() lt last()]

All of these are shorter than the proposed expressions containing slice() !
Why bother learn a new name and why pollute the function-name space?

This is just an example where we are going counter - Exupery and with close
to no justification.

We also have another good friend:
  subsequence()


Thanks,
Dimitre

On Wed, Dec 2, 2020 at 3:16 AM Michael Kay <mike@saxonica.com> wrote:

> The latest version allows
>
> slice($seq, -1)  to get the last item
>
> slice($seq, $N) to get the Nth item
>
> slice($seq, 1 to count($seq)-1) to get all but the last
>
> and I thought that was probably good enough to make the individual
> functions unnecessary.
>
> Would you agree?
>
> Michael Kay
> Saxonica
>
> On 2 Dec 2020, at 10:30, Christian Grün <cg@basex.org> wrote:
>
> Hi Michael,
>
> In your first public XQFO proposal [1], I have found seen three
> functions (fn:foot, fn:truncate, fn:item-at) that have not made it
> into the latest specification documents. Are you still working on it,
> or did you deliberately decide not to include them in the new draft?
>
> Thanks,
> Christian
>
> [1] https://www.saxonica.com/qt4specs/FO/Overview-diff.html
>
>
>

Received on Wednesday, 2 December 2020 15:30:22 UTC