Changes

Jump to navigation Jump to search
191 bytes removed ,  09:28, 29 July 2020
no edit summary
This page is part of the [[XQuery|XQuery Portal]].
Serialization parameters define how XQuery items and XML nodes will be ''serialized'' (i.e., returned to the client or an API, usually in textual form). The official parameters are defined in the [https://www.w3.org/TR/xslt-xquery-serialization-31 W3C XQuery Serialization 3.1] document. In BaseX, they can be specified by:
* including them included in the [[XQuery_3.0#Serialization|prolog of the XQuery expression]];* specifying them specified in the XQuery functions [[File_Module#({{Function|File|file:write}}, {{Function|Database|filedb:write()]] or export}}, [https://www.w3.org/TR/xpath-functions-31/#func-serialize fn:serialize()]. The serialization parameters are specified as);** children of an {{Codespecified in [[REST#Parameters|&lt;output:serialization-REST query parameters/&gt]];}} element, or as** map, which contains all key/value pairs: <code>map { "method": "xml", "cdata-section-elements": "div", ... }</code>;* using the {{Code|-s}} flag of the BaseX specified in [[Command-Line OptionsRESTXQ#BaseX StandaloneOutput|command-lineRESTXQ output annotations]] clients;* setting set via the {{Option|SERIALIZER}} option before running a query;* setting set via the {{Option|EXPORTER}} option before exporting a database; or* setting them as supplied with the {{Code|-s}} flag of the BaseX [[RESTCommand-Line Options#ParametersBaseX Standalone|RESTcommand-line]] query parametersclients.
The namespace for serialization parameters is statically bound to the {{Code|output}} prefix. This means that it need not (but may) be declared in the query prolog:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu