Re: Keyword arguments and fn:serialize [was fn:slice]

> On 6 Dec 2020, at 18:41, Benito van der Zander <benito@benibela.de> wrote:
> 
> Hi,
> 
> this also started as a way to simplify calling the serialize function with its parameters.
> 
> Do we want a 23-arity serialize function?
> fn:serialize($arg as item()*, $allow-duplicate-names as ..., $byte-order-mark as ..., $cdata-section-elements as ..., $doctype-public as ..., $doctype-system as ..., $encoding as ..., $escape-uri-attributes as ..., $html-version as ..., $include-content-type as ..., $indent as ..., $item-separator as ..., $json-node-output-method as ..., $media-type as ..., $method as ..., $normalization-form as ..., $omit-xml-declaration as ..., $standalone as ..., $suppress-indentation as ..., $undeclare-prefixes as ..., $use-character-maps as ..., $version as ...)
> 

I share your concerns here. This is a good "sanity test" for any changes in this area. As it happens, fn:serialize() has particular complications because the second argument can be either a node or a map (we introduced the ability to supply options using an XML structure before maps were available) and that makes it especially challenging; but if a new call mechanism doesn't work for fn:serialize then I don't think it's worth having.

Michael Kay
Saxonica

Received on Monday, 7 December 2020 09:43:06 UTC