The Text output method serializes the instance of the data model by outputting the string value of the document node created by the markup generation step of the phases of serialization without any escaping.
A newline character in the instance of the data model MAY be output using any character sequence that is conventionally used to represent a line ending in the chosen system environment.
Note:
The rule just stated applies to newline characters (#xA); it does not apply to occurrences in the data model instance of carriage return (CR), NEL, or LINE SEPARATOR characters; these should be output literally, regardless of the conventions for line endings in the system environment.
To illustrate, the following table shows the expected output for various character sequences in environments which conventionally use #xA (LF, as in Linux systems), #xD followed by #xA (CR+LF, Windows), #xD (CR only, older versions of Mac OS), #x85 (NEL, some IBM operating systems), or #x2028 (LINE SEPARATOR) to separate lines:
Input | #xA systems | #xD#xA systems | #xD systems | #x85 systems | #x2028 systems |
---|---|---|---|---|---|
character #xD | character #xD | character #xD | character #xD | character #xD | character #xD |
character #xA | character #xA | string #xD + #xA | character #xD | character #x85 | character #x2028 |
string #xD + #xA | string #xD + #xA | string #xD + #xD + #xA | string #xD + #xD | string #xD + #x85 | string #xD + #x2028 |
string #xD + #xD + #xA | string #xD + #xD + #xA | string #xD + #xD + #xD + #xA | string #xD + #xD + #xD | string #xD + #xD + #x85 | string #xD + #xD + #x2028 |
version
Parameter
The version
parameter is not applicable to the Text output method.
html-version
Parameter
The html-version
parameter is not applicable to the
Text output method.
encoding
Parameter
The encoding
parameter identifies the encoding that
the Text output method
MUST use to convert sequences of
characters to sequences of bytes.
Serializers
are REQUIRED to support values of UTF-8
and
UTF-16
.
A serialization error [err:SESU0007]
occurs if the serializer
does not support the encoding specified
by the encoding
parameter.
The serializer
MUST signal the error.
If the instance of the data model contains a
character that cannot be represented in the encoding that the
serializer is using for output, the serializer
MUST
signal a serialization error [err:SERE0008].
indent
and suppress-indentation
Parameters
The indent
and suppress-indentation
parameters are not applicable to the Text output method.
cdata-section-elements
Parameter
The cdata-section-elements
parameter is not applicable to the Text output method.
omit-xml-declaration
and standalone
Parameters
The omit-xml-declaration
and standalone
parameters are not applicable to the Text output method.
doctype-system
and doctype-public
Parameters
The doctype-system
and doctype-public
parameters are not applicable to the Text output method.
undeclare-prefixes
Parameter
The undeclare-prefixes
parameter is not applicable to the Text output method.
normalization-form
Parameter
The normalization-form
parameter is applicable to the
Text output method.
The values NFC
and none
MUST be supported by the serializer.
A serialization error [err:SESU0011] results if the value of the
normalization-form
parameter specifies a normalization form
that is not supported by the serializer; the
serializer MUST signal the
error.
media-type
Parameter
The media-type
parameter is applicable to the
Text output method.
See 3 Serialization Parameters for more
information.
use-character-maps
Parameter
The use-character-maps
parameter is applicable to the
Text output method.
See 11 Character Maps for more
information.
byte-order-mark
Parameter
The byte-order-mark
parameter is
applicable to the Text output method. See
3 Serialization Parameters for more information.
escape-uri-attributes
Parameter
The escape-uri-attributes
parameter is not applicable to the Text output method.
include-content-type
Parameter
The include-content-type
parameter is not applicable to the Text output method.
item-separator
Parameter
The effect of the item-separator
serialization parameter
is described in 2 Sequence Normalization.