diff --git a/specifications/xslt-40/src/element-catalog.xml b/specifications/xslt-40/src/element-catalog.xml
index dbab33dc5..b7be3529b 100644
--- a/specifications/xslt-40/src/element-catalog.xml
+++ b/specifications/xslt-40/src/element-catalog.xml
@@ -1864,6 +1864,11 @@
doctype-system
, encoding
,
escape-solidus
escape-uri-attributes
, html-version
, indent
, item-separator
,
+ json-lines
json-node-output-method
,
media-type
, normalization-form
,
omit-xml-declaration
, standalone
, suppress-indentation
,
@@ -38521,6 +38522,12 @@ return ($m?price - $m?discount)
yes
.
The value of the json-lines
attribute determines whether the JSON
+ output method should output multiple JSON values in json-lines format (one
+ value per line). The default value is no
.
+
The value of the media-type
attribute provides the value of the
media-type
parameter to the serialization method. The default
diff --git a/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml b/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml
index 33a05d709..80429956c 100644
--- a/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml
+++ b/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml
@@ -655,6 +655,10 @@ is performed.
Host languages may also define alternative representations of the values of serialization parameters. For example, both XSLT
+ and XQuery allow the boolean values true
and false
to be written as 1
/0
+ or yes
/no
. The $options
map passed to the fn:serialize
function,
+ by contrast, requires an xs:boolean
value.
It is a
The following serialization parameters are defined:
@@ -668,15 +672,14 @@ is the responsibility of theallow-duplicate-names
yes
, no
, true
, false
, 1
or 0
.
+true
or false
.
This parameter indicates
whether a map item serialized as a JSON object using the JSON output method is
-allowed to contain duplicate member names. If the value no
, false
or 0
+allowed to contain duplicate member names. If the value false
is specified, a serialization error byte-order-mark
yes
, no
, true
, false
, 1
or 0
.
+byte-order-mark
true
or false
.
This parameter indicates
whether the serialized sequence of octets is to be preceded by
a Byte Order Mark (See Section 5.1 of
@@ -710,29 +713,25 @@ This parameter escape-solidus
yes
, no
, true
, false
, 1
or 0
.
+ true
or false
.
escape-uri-attributes
yes
, no
, true
, false
, 1
or 0
.
+true
or false
.
html-version
include-content-type
yes
, no
, true
, false
, 1
or 0
.
+include-content-type
true
or false
.
indent
yes
, no
, true
, false
, 1
or 0
.
+indent
true
or false
.
item-separator
json-lines
yes
, no
, true
, false
, 1
or 0
.
+json-lines
true
or false
.
NMTOKEN
.omit-xml-declaration
yes
, no
, true
, false
, 1
or 0
.
+omit-xml-declaration
true
or false
.
standalone
yes
, no
, true
, false
, 1
, 0
+standalone
true
or false
, or the value
or omit
.suppress-indentation
omit
.undeclare-prefixes
yes
, no
, true
, false
, 1
or 0
.
+true
or false
.
use-character-maps
indent
parameter is set to
-yes
, true
or 1
; but they
+true
; but they
could not instruct the method
, version
and indent
serialization parameters with the values
-xml
, 1.0
and yes
, respectively.
+xml
, 1.0
and true
, respectively.
If the indent
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
additional text nodes consisting of
whitespace characters
text nodes in the indent
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the
If the
-indent
parameter has the value no
, false
or 0
, the
+indent
parameter has the value false
, the
indent
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the
omit-xml-declaration
and standalone
ParametersThe XML output method
-omit-xml-declaration
parameter has the value no
, false
or 0
.
+omit-xml-declaration
parameter has the value false
.
The XML declaration standalone
parameter has
-one of the values yes
, true
, 1
, no
, false
or 0
,
-the XML declaration standalone
parameter.
-
+the value true
or false
,
+the XML declaration standalone
parameter set accordingly to yes
or no
.
If the standalone
parameter has
the value omit
, the XML declaration
A omit-xml-declaration
parameter has
-one of the values yes
, true
or 1
, and
true
, and
the standalone
parameter has a value other than
omit
; or
Otherwise, if the
omit-xml-declaration
parameter has
-one of the values yes
, true
or 1
,
+the true
,
the XML output method
undeclare-prefixes
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the output method is XML or XHTML, and the version
parameter value is greater than 1.0
,
the undeclare-prefixes
parameter has the value no
, false
or 0
and the output method is XML or
+undeclare-prefixes
parameter has the value false
and the output method is XML or
XHTML, then the undeclaration of prefixes Consider an element x:foo
with four in-scope namespaces
that associate prefixes with URIs as follows:
x
is associated with
@@ -2012,7 +2010,7 @@ that associate prefixes with URIs as follows:
</x:foo>
In undeclare-prefixes
parameter is
-one of yes
, true
or 1
,
+true
,
and the value of the version
parameter is 1.0
,
a
The byte order mark may be undesirable under certain circumstances,
for example, to concatenate resulting XML fragments without additional processing to remove the byte order mark.
Therefore this specification does not mandate the byte-order-mark
parameter to have
-one of the values yes
, true
or 1
+the value true
when the encoding is UTF-16,
even though the XML 1.0 and XML 1.1 specifications state that entities encoded in UTF-16
indent
and suppress-indentation
Parameters
If the indent
parameter has
-one of the values yes
, true
or 1
, the
+the value true
, the
escape-uri-attributes
Parameter
If the escape-uri-attributes
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the XHTML output method
This escaping is deliberately confined to non-ASCII characters,
@@ -2548,14 +2546,14 @@ example when URIs or URI fragments are interpreted locally by the HTML
user agent. Even in the case of non-ASCII characters, escaping can
sometimes cause problems. More precise control of escape-uri-attributes
to
-no
, and controlling the escaping of URIs by using methods defined in
+false
, and controlling the escaping of URIs by using methods defined in
include-content-type
Parameter
If the If the
If the head
element
include-content-type
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the XHTML output method
meta
element as the first child element of the
@@ -3064,7 +3062,7 @@ raise a indent
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
then the
HTML output method escape-uri-attributes
Parameterescape-uri-attributes
parameter
-has one of the values yes
, true
or 1
,
+has the value true
,
the HTML output method escape-uri-attributes
to
-no
, and controlling the escaping of URIs by using methods defined in
+false
, and controlling the escaping of URIs by using methods defined in
include-content-type
ParameterIf there is a head
element,
and the include-content-type
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the HTML output method
meta
element
as the first child element
@@ -3420,12 +3418,14 @@ is described in
If the value is one of yes
, true
or 1
,
- each item of the input value becomes a separate list entry.
+
If the value is true
,
+ each item of the input value becomes a separate list entry. If the input value
+ is an empty sequence, the serialized result is empty.
For all other values, the input value becomes a single list entry.
+If the value is false
, the input value becomes a single list entry. If
+ the input value is an empty sequence, the serialized result is the string null
.
allow-duplicate-names
parameter has
-one of the values yes
, true
or 1
.
+the value true
.
@@ -3472,7 +3472,7 @@ is serialized json-node-output-method
parameter.
The node is serialized with the serialization parameter omit-xml-declaration
set
- to yes
and with no other serialization parameters set.
+ to true
and with no other serialization parameters set.
@@ -3553,8 +3553,8 @@ range 1-31 or 127-159 by an escape in the form \uHHHH
where HHHH
is the hexadecimal representation of the codepoint value.
/
)
by the escape sequence \/
if the escape-solidus
parameter
- is set to true
, yes
, or 1
, but not if it is
- set to false
, no
, or 0
.true
, but not if it is
+ set to false
.
Escaping is also applied to any characters that cannot be represented in the selected encoding.
The resulting string is enclosed in double quotation marks.
json-node-output-method
serialization parameter. The
-omit-xml-declaration
parameter is set to yes
, and no other
+omit-xml-declaration
parameter is set to true
, and no other
serialization parameters are passed down to the serialization
method responsible for serializing the node.
@@ -3618,13 +3618,13 @@ definition of JSON in indent
and suppress-indentation
Parameters
+JSON Output Method: the indent
Parameter
The indent
parameter
controls whether the indent
parameter has
-one of the values yes
, true
or 1
,
+the value true
,
the
If json-lines
has one of the values yes
, true
or
-1
, indentation is allowed, but the output whitespace characters may not contain
+
If indent
and json-lines
are both true
,
+ additional whitespace is allowed, but it
escape-solidus
Parameter
The escape-solidus
parameter is
- applicable to the JSON output method. If the value is yes
, true
, or 1
,
+ applicable to the JSON output method. If the value is true
,
then the solidus character ("/"
) appearing in a string is escaped with a backslash
- (as "\/"
). If the value is no
, false
, or 0
,
+ (as "\/"
). If the value is false
,
then it is not escaped.
In previous versions of this specification, the solidus was always escaped. Although JSON does not require
@@ -3693,10 +3693,10 @@ determines whether the presence of multiple keys in a map item
with the same string value (e.g. the date 2014-10-01 and the string
"2014-10-01
") will or will not raise serialization error
yes
, true
or 1
,
+true
,
such duplicate keys will result in duplicate object-member names in
the JSON output and no error will be raised because of the duplicate names.
-If the value is no
, false
or 0
,
+If the value is false
,
such duplicate keys are an error
(
xml
, xhtml
, html
o
then the node is converted xml
or xhtml
then
the node is serialised with the additional serialization parameter omit-xml-declaration
-set to yes
.
+set to true
.