exist icon indicating copy to clipboard operation
exist copied to clipboard

[feature] type parameter in ft:field#3 should treat empty sequence as "return untyped value"

Open line-o opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

It can be handy for dynamic queries to be able to parameterise the type parameter of calls to ft:field. But there is no way to do that with the current implementation that requires the third parameter to be of type xs:string and no way to signal that the raw value should be returned instead.

Describe the solution you'd like

ft:field($node, "myfield", ())

Should return the same untyped field values as

ft:field($node, "myfield")

Describe alternatives you've considered

Introducing a keyword like raw might be an option. But then again this needs to be memoized by users and it does not simplify the implementation in any way. Of course, this limitation can be worked around by wrapping calls to ft:field.

line-o avatar Sep 05 '22 10:09 line-o