Re: QT4CG-003-01: MK to find a way to specify fn:characters() more formally

Michael Kay <mike@saxonica.com> writes:
> I think there are two possibilities:
>
> (a) string-to-codepoints($input) ! codepoints-to-string(.)
>
> (b) if ($input) then (fn:substring($input, 1, 1), fn:characters(fn:substring($input, 2))) else ()
>
> I've chosen (a), on the basis that string-to-codepoints() and
> codepoints-to-string() are probably fundamental to the definition of a
> string as a sequence of code points, whereas fn:substring(), if we
> chose, could be expressed in terms of fn:characters() and
> fn:subsequence().

That seems reasonable to me.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Wednesday, 21 September 2022 06:47:09 UTC