Changes

Jump to navigation Jump to search
85 bytes added ,  15:47, 27 February 2020
no edit summary
The {{Code|csv}} and {{Code|json}} parameters are supplied with a list of options. Option names and values are combined with <code>=</code>, several options are separated by <code>,</code>:
<pre classsyntaxhighlight lang="brush:xquery">
(: The output namespace declaration is optional, because it is statically declared in BaseX) :)
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
</record>
</csv>
</presyntaxhighlight>
If {{Code|fn:serialize}} is called, output-specific parameters can be supplied via nested options:
<pre classsyntaxhighlight lang="brush:xquery">
serialize(
<csv>
}
)
</presyntaxhighlight>
'''Result''':
<pre classsyntaxhighlight lang="brush:xml">
Name;City
John;Newton
Jack;Oldtown
</presyntaxhighlight>
=Character mappings=
'''Example query''':
<pre classsyntaxhighlight lang="brush:xquery">
declare option output:parameter-document "map.xml";
<x>&amp;#xA0;</x>
</presyntaxhighlight>
'''Example parameter-document''':
<pre classsyntaxhighlight lang="brush:xml">
<serialization-parameters
xmlns="http://www.w3.org/2010/xslt-xquery-serialization">
</use-character-maps>
</serialization-parameters>
</presyntaxhighlight>
=Changelog=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu