exist icon indicating copy to clipboard operation
exist copied to clipboard

[feature] allow serialization options to be passed in as a map in `file:serialize`

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

While it is possible to override the default serialization settings by passing in options as a document fragment file:serialize will not respect an options map. It will just silently ignore it!

file:serialize(
     <root>
        <nested />
     </root>,
    "test.xml",
    <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization">
      <output:indent value="no"/>
    </output:serialization-parameters>
)

I would like to have the option to achieve the same result with

file:serialize(
     <root>
        <nested />
     </root>,
    "test.xml",
    map { "indent": false() }
)

line-o avatar Mar 09 '22 12:03 line-o