src/java.xml/share/classes/org/w3c/dom/ls/LSSerializer.java
author joehw
Mon, 11 Dec 2017 19:56:44 -0800
changeset 48241 18d487a1f933
parent 47216 71c04702a3d5
permissions -rw-r--r--
8190823: Broken link in org/w3c/dom/ls/ Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    26
 * This file is available under and governed by the GNU General Public
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    27
 * License version 2 only, as published by the Free Software Foundation.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    28
 * However, the following notice accompanied the original version of this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    29
 * file and, per its terms, should not be removed:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    30
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    31
 * Copyright (c) 2004 World Wide Web Consortium,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    33
 * (Massachusetts Institute of Technology, European Research Consortium for
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    34
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    35
 * work is distributed under the W3C(r) Software License [1] in the hope that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    38
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    39
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    40
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
package org.w3c.dom.ls;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
import org.w3c.dom.DOMConfiguration;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    45
import org.w3c.dom.Node;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
import org.w3c.dom.DOMException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
 *  A <code>LSSerializer</code> provides an API for serializing (writing) a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    50
 * DOM document out into XML. The XML data is written to a string or an
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    51
 * output stream. Any changes or fixups made during the serialization affect
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    52
 * only the serialized data. The <code>Document</code> object and its
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    53
 * children are never altered by the serialization operation.
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    54
 * <p> During serialization of XML data, namespace fixup is done as defined in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    55
 * [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    56
 * , Appendix B. [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>DOM Level 2 Core</a>]
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    57
 *  allows empty strings as a real namespace URI. If the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    58
 * <code>namespaceURI</code> of a <code>Node</code> is empty string, the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    59
 * serialization will treat them as <code>null</code>, ignoring the prefix
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    60
 * if any.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    61
 * <p> <code>LSSerializer</code> accepts any node type for serialization. For
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    62
 * nodes of type <code>Document</code> or <code>Entity</code>, well-formed
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    63
 * XML will be created when possible (well-formedness is guaranteed if the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    64
 * document or entity comes from a parse operation and is unchanged since it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    65
 * was created). The serialized output for these node types is either as a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    66
 * XML document or an External XML Entity, respectively, and is acceptable
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    67
 * input for an XML parser. For all other types of nodes the serialized form
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    68
 * is implementation dependent.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    69
 * <p>Within a <code>Document</code>, <code>DocumentFragment</code>, or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
 * <code>Entity</code> being serialized, <code>Nodes</code> are processed as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
 * follows
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
 * <ul>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    73
 * <li> <code>Document</code> nodes are written, including the XML
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    74
 * declaration (unless the parameter "xml-declaration" is set to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    75
 * <code>false</code>) and a DTD subset, if one exists in the DOM. Writing a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
 * <code>Document</code> node serializes the entire document.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    77
 * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    78
 * <li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    79
 * <code>Entity</code> nodes, when written directly by
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
 * <code>LSSerializer.write</code>, outputs the entity expansion but no
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
 * namespace fixup is done. The resulting output will be valid as an
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    82
 * external entity.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    83
 * </li>
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    84
 * <li> If the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    85
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    86
 * is set to <code>true</code>, <code>EntityReference</code> nodes are
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    87
 * serialized as an entity reference of the form "
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    88
 * <code>&amp;entityName;</code>" in the output. Child nodes (the expansion)
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    89
 * of the entity reference are ignored. If the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    90
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    91
 * is set to <code>false</code>, only the children of the entity reference
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    92
 * are serialized. <code>EntityReference</code> nodes with no children (no
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    93
 * corresponding <code>Entity</code> node or the corresponding
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    94
 * <code>Entity</code> nodes have no children) are always serialized.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    95
 * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    96
 * <li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    97
 * <code>CDATAsections</code> containing content characters that cannot be
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    98
 * represented in the specified output encoding are handled according to the
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
    99
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-split-cdata-sections'>split-cdata-sections</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   100
 * parameter.  If the parameter is set to <code>true</code>,
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   101
 * <code>CDATAsections</code> are split, and the unrepresentable characters
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   102
 * are serialized as numeric character references in ordinary content. The
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   103
 * exact position and number of splits is not specified.  If the parameter
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   104
 * is set to <code>false</code>, unrepresentable characters in a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   105
 * <code>CDATAsection</code> are reported as
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   106
 * <code>"wf-invalid-character"</code> errors if the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   107
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-well-formed'>well-formed</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   108
 * is set to <code>true</code>. The error is not recoverable - there is no
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   109
 * mechanism for supplying alternative characters and continuing with the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   110
 * serialization.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   111
 * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   112
 * <li> <code>DocumentFragment</code> nodes are serialized by
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   113
 * serializing the children of the document fragment in the order they
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   114
 * appear in the document fragment.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   115
 * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   116
 * <li> All other node types (Element, Text,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   117
 * etc.) are serialized to their corresponding XML source form.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   118
 * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   119
 * </ul>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   120
 * <p ><b>Note:</b>  The serialization of a <code>Node</code> does not always
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   121
 * generate a well-formed XML document, i.e. a <code>LSParser</code> might
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   122
 * throw fatal errors when parsing the resulting serialization.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   123
 * <p> Within the character data of a document (outside of markup), any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   124
 * characters that cannot be represented directly are replaced with
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   125
 * character references. Occurrences of '&lt;' and '&amp;' are replaced by
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   126
 * the predefined entities &amp;lt; and &amp;amp;. The other predefined
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
 * entities (&amp;gt;, &amp;apos;, and &amp;quot;) might not be used, except
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   128
 * where needed (e.g. using &amp;gt; in cases such as ']]&gt;'). Any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   129
 * characters that cannot be represented directly in the output character
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   130
 * encoding are serialized as numeric character references (and since
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   131
 * character encoding standards commonly use hexadecimal representations of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
 * characters, using the hexadecimal representation when serializing
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
 * character references is encouraged).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
 * <p> To allow attribute values to contain both single and double quotes, the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
 * apostrophe or single-quote character (') may be represented as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   136
 * "&amp;apos;", and the double-quote character (")  as "&amp;quot;". New
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   137
 * line characters and other characters that cannot be represented directly
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   138
 * in attribute values in the output character encoding are serialized as a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   139
 * numeric character reference.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   140
 * <p> Within markup, but outside of attributes, any occurrence of a character
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   141
 * that cannot be represented in the output character encoding is reported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   142
 * as a <code>DOMError</code> fatal error. An example would be serializing
45850
20c710eeef15 8183583: LSSerializer docs have invalid character
joehw
parents: 25868
diff changeset
   143
 * the element &lt;LaCa&ntilde;ada/&gt; with <code>encoding="us-ascii"</code>.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   144
 * This will result with a generation of a <code>DOMError</code>
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   145
 * "wf-invalid-character-in-node-name" (as proposed in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   146
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-well-formed'>well-formed</a>").
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   147
 * <p> When requested by setting the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   148
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-normalize-characters'>normalize-characters</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   149
 * on <code>LSSerializer</code> to true, character normalization is
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   150
 * performed according to the definition of
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   151
 * <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   152
 * normalized</a> characters included in appendix E of
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   153
 * [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] on all
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   154
 * data to be serialized, both markup and character data. The character
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   155
 * normalization process affects only the data as it is being written; it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   156
 * does not alter the DOM's view of the document after serialization has
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   157
 * completed.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   158
 * <p> Implementations are required to support the encodings "UTF-8",
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   159
 * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   160
 * serializable in all encodings that are required to be supported by all
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
 * XML parsers. When the encoding is UTF-8, whether or not a byte order mark
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   162
 * is serialized, or if the output is big-endian or little-endian, is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
 * implementation dependent. When the encoding is UTF-16, whether or not the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   164
 * output is big-endian or little-endian is implementation dependent, but a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   165
 * Byte Order Mark must be generated for non-character outputs, such as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   166
 * <code>LSOutput.byteStream</code> or <code>LSOutput.systemId</code>. If
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   167
 * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   168
 * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   169
 * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   170
 * is not be generated. In all cases, the encoding declaration, if
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   171
 * generated, will correspond to the encoding used during the serialization
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   172
 * (e.g. <code>encoding="UTF-16"</code> will appear if UTF-16 was
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   173
 * requested).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   174
 * <p> Namespaces are fixed up during serialization, the serialization process
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   175
 * will verify that namespace declarations, namespace prefixes and the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   176
 * namespace URI associated with elements and attributes are consistent. If
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   177
 * inconsistencies are found, the serialized form of the document will be
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   178
 * altered to remove them. The method used for doing the namespace fixup
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   179
 * while serializing a document is the algorithm defined in Appendix B.1,
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   180
 * "Namespace normalization", of
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   181
 * [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   182
 * .
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   183
 * <p> While serializing a document, the parameter "discard-default-content"
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   184
 * controls whether or not non-specified data is serialized.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   185
 * <p> While serializing, errors and warnings are reported to the application
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   186
 * through the error handler (<code>LSSerializer.domConfig</code>'s
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   187
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   188
 * parameter). This specification does in no way try to define all possible
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   189
 * errors and warnings that can occur while serializing a DOM node, but some
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   190
 * common error and warning cases are defined. The types (
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   191
 * <code>DOMError.type</code>) of errors and warnings defined by this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   192
 * specification are:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   193
 * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   194
 * <dt><code>"no-output-specified" [fatal]</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   195
 * <dd> Raised when
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   196
 * writing to a <code>LSOutput</code> if no output is specified in the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   197
 * <code>LSOutput</code>. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   198
 * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   199
 * <code>"unbound-prefix-in-entity-reference" [fatal]</code> </dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   200
 * <dd> Raised if the
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   201
 * configuration parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   202
 * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-namespaces'>namespaces</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   203
 * is set to <code>true</code> and an entity whose replacement text
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   204
 * contains unbound namespace prefixes is referenced in a location where
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   205
 * there are no bindings for the namespace prefixes. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   206
 * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   207
 * <code>"unsupported-encoding" [fatal]</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   208
 * <dd> Raised if an unsupported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   209
 * encoding is encountered. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   210
 * </dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   211
 * <p> In addition to raising the defined errors and warnings, implementations
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
 * are expected to raise implementation specific errors and warnings for any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   213
 * other error and warning cases such as IO errors (file not found,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   214
 * permission denied,...) and so on.
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   215
 * <p>See also the
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   216
 * <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   217
Document Object Model (DOM) Level 3 Load and Save Specification</a>.
25262
1fe892ba017a 8047723: @since tag cleanup in jaxp
henryjen
parents: 12457
diff changeset
   218
 *
1fe892ba017a 8047723: @since tag cleanup in jaxp
henryjen
parents: 12457
diff changeset
   219
 * @since 1.5
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   220
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   221
public interface LSSerializer {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   222
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   223
     *  The <code>DOMConfiguration</code> object used by the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   224
     * <code>LSSerializer</code> when serializing a DOM node.
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   225
     * <br> In addition to the parameters recognized by the
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   226
     * <a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#DOMConfiguration'>DOMConfiguration</a>
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   227
     * interface defined in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   228
     * [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   229
     * , the <code>DOMConfiguration</code> objects for
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   230
     * <code>LSSerializer</code> adds, or modifies, the following
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   231
     * parameters:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   233
     * <dt><code>"canonical-form"</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
     * <dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   235
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   236
     * <dt><code>true</code></dt>
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   237
     * <dd>[<em>optional</em>] Writes the document according to the rules specified in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   238
     * [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>].
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   239
     * In addition to the behavior described in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   240
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-canonical-form'>canonical-form</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   241
     * [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   242
     * , setting this parameter to <code>true</code> will set the parameters
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   243
     * "format-pretty-print", "discard-default-content", and "xml-declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   244
     * ", to <code>false</code>. Setting one of those parameters to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   245
     * <code>true</code> will set this parameter to <code>false</code>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   246
     * Serializing an XML 1.1 document when "canonical-form" is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   247
     * <code>true</code> will generate a fatal error. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   248
     * <dt><code>false</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   249
     * <dd>[<em>required</em>] (<em>default</em>) Do not canonicalize the output. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   250
     * </dl></dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   251
     * <dt><code>"discard-default-content"</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   252
     * <dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   253
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   254
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   255
     * <code>true</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   256
     * <dd>[<em>required</em>] (<em>default</em>) Use the <code>Attr.specified</code> attribute to decide what attributes
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   257
     * should be discarded. Note that some implementations might use
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   258
     * whatever information available to the implementation (i.e. XML
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   259
     * schema, DTD, the <code>Attr.specified</code> attribute, and so on) to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   260
     * determine what attributes and content to discard if this parameter is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   261
     * set to <code>true</code>. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   262
     * <dt><code>false</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   263
     * <dd>[<em>required</em>]Keep all attributes and all content.</dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   264
     * </dl></dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   265
     * <dt><code>"format-pretty-print"</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   266
     * <dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   267
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   268
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   269
     * <code>true</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   270
     * <dd>[<em>optional</em>] Formatting the output by adding whitespace to produce a pretty-printed,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   271
     * indented, human-readable form. The exact form of the transformations
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   272
     * is not specified by this specification. Pretty-printing changes the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   273
     * content of the document and may affect the validity of the document,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   274
     * validating implementations should preserve validity. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   275
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   276
     * <code>false</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   277
     * <dd>[<em>required</em>] (<em>default</em>) Don't pretty-print the result. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   278
     * </dl></dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   279
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   280
     * <code>"ignore-unknown-character-denormalizations"</code> </dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   281
     * <dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   282
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   283
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   284
     * <code>true</code></dt>
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   285
     * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   286
     * [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   287
     * supported, a character is encountered for which the normalization
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   288
     * properties cannot be determined, then raise a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   289
     * <code>"unknown-character-denormalization"</code> warning (instead of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   290
     * raising an error, if this parameter is not set) and ignore any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   291
     * possible denormalizations caused by these characters. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   292
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   293
     * <code>false</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   294
     * <dd>[<em>optional</em>] Report a fatal error if a character is encountered for which the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   295
     * processor cannot determine the normalization properties. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   296
     * </dl></dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   297
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   298
     * <code>"normalize-characters"</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   299
     * <dd> This parameter is equivalent to
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   300
     * the one defined by <code>DOMConfiguration</code> in
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   301
     * [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   302
     * . Unlike in the Core, the default value for this parameter is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   303
     * <code>true</code>. While DOM implementations are not required to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   304
     * support <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   305
     * normalizing</a> the characters in the document according to appendix E of
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   306
     * [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], this
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   307
     * parameter must be activated by default if supported. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   308
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   309
     * <code>"xml-declaration"</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   310
     * <dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   311
     * <dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   312
     * <dt><code>true</code></dt>
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   313
     * <dd>[<em>required</em>] (<em>default</em>) If a <code>Document</code>,
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   314
     * <code>Element</code>, or <code>Entity</code>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   315
     *  node is serialized, the XML declaration, or text declaration, should
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   316
     * be included. The version (<code>Document.xmlVersion</code> if the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   317
     * document is a Level 3 document and the version is non-null, otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   318
     * use the value "1.0"), and the output encoding (see
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   319
     * <code>LSSerializer.write</code> for details on how to find the output
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   320
     * encoding) are specified in the serialized XML declaration. </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   321
     * <dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   322
     * <code>false</code></dt>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   323
     * <dd>[<em>required</em>] Do not serialize the XML and text declarations. Report a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   324
     * <code>"xml-declaration-needed"</code> warning if this will cause
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   325
     * problems (i.e. the serialized data is of an XML version other than
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   326
     * [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], or an
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   327
     * encoding would be needed to be able to re-parse the serialized data). </dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   328
     * </dl></dd>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   329
     * </dl>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   330
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   331
    public DOMConfiguration getDomConfig();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   332
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   333
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   334
     *  The end-of-line sequence of characters to be used in the XML being
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   335
     * written out. Any string is supported, but XML treats only a certain
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   336
     * set of characters sequence as end-of-line (See section 2.11,
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   337
     * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   338
     * if the serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   339
     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   340
     * serialized content is XML 1.1). Using other character sequences than
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   341
     * the recommended ones can result in a document that is either not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   342
     * serializable or not well-formed).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   343
     * <br> On retrieval, the default value of this attribute is the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   344
     * implementation specific default end-of-line sequence. DOM
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   345
     * implementations should choose the default to match the usual
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   346
     * convention for text files in the environment being used.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   347
     * Implementations must choose a default sequence that matches one of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   348
     * those allowed by XML 1.0 or XML 1.1, depending on the serialized
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   349
     * content. Setting this attribute to <code>null</code> will reset its
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   350
     * value to the default value.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   351
     * <br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   352
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   353
    public String getNewLine();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   354
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   355
     *  The end-of-line sequence of characters to be used in the XML being
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   356
     * written out. Any string is supported, but XML treats only a certain
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   357
     * set of characters sequence as end-of-line (See section 2.11,
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   358
     * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   359
     * if the serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   360
     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   361
     * serialized content is XML 1.1). Using other character sequences than
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   362
     * the recommended ones can result in a document that is either not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   363
     * serializable or not well-formed).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   364
     * <br> On retrieval, the default value of this attribute is the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   365
     * implementation specific default end-of-line sequence. DOM
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   366
     * implementations should choose the default to match the usual
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   367
     * convention for text files in the environment being used.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   368
     * Implementations must choose a default sequence that matches one of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   369
     * those allowed by XML 1.0 or XML 1.1, depending on the serialized
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   370
     * content. Setting this attribute to <code>null</code> will reset its
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   371
     * value to the default value.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   372
     * <br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   373
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   374
    public void setNewLine(String newLine);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   375
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   376
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   377
     *  When the application provides a filter, the serializer will call out
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   378
     * to the filter before serializing each Node. The filter implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   379
     * can choose to remove the node from the stream or to terminate the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   380
     * serialization early.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   381
     * <br> The filter is invoked after the operations requested by the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   382
     * <code>DOMConfiguration</code> parameters have been applied. For
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   383
     * example, CDATA sections won't be passed to the filter if
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   384
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-cdata-sections'>cdata-sections</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   385
     * is set to <code>false</code>.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   386
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   387
    public LSSerializerFilter getFilter();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   388
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   389
     *  When the application provides a filter, the serializer will call out
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   390
     * to the filter before serializing each Node. The filter implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   391
     * can choose to remove the node from the stream or to terminate the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   392
     * serialization early.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   393
     * <br> The filter is invoked after the operations requested by the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   394
     * <code>DOMConfiguration</code> parameters have been applied. For
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   395
     * example, CDATA sections won't be passed to the filter if
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   396
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-cdata-sections'>cdata-sections</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   397
     * is set to <code>false</code>.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   398
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   399
    public void setFilter(LSSerializerFilter filter);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   400
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   401
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   402
     *  Serialize the specified node as described above in the general
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   403
     * description of the <code>LSSerializer</code> interface. The output is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   404
     * written to the supplied <code>LSOutput</code>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   405
     * <br> When writing to a <code>LSOutput</code>, the encoding is found by
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   406
     * looking at the encoding information that is reachable through the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   407
     * <code>LSOutput</code> and the item to be written (or its owner
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   408
     * document) in this order:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   409
     * <ol>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   410
     * <li> <code>LSOutput.encoding</code>,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   411
     * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   412
     * <li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   413
     * <code>Document.inputEncoding</code>,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   414
     * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   415
     * <li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   416
     * <code>Document.xmlEncoding</code>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   417
     * </li>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   418
     * </ol>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   419
     * <br> If no encoding is reachable through the above properties, a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   420
     * default encoding of "UTF-8" will be used. If the specified encoding
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   421
     * is not supported an "unsupported-encoding" fatal error is raised.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   422
     * <br> If no output is specified in the <code>LSOutput</code>, a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   423
     * "no-output-specified" fatal error is raised.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   424
     * <br> The implementation is responsible of associating the appropriate
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   425
     * media type with the serialized data.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   426
     * <br> When writing to a HTTP URI, a HTTP PUT is performed. When writing
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   427
     * to other types of URIs, the mechanism for writing the data to the URI
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   428
     * is implementation dependent.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   429
     * @param nodeArg  The node to serialize.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   430
     * @param destination The destination for the serialized DOM.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   431
     * @return  Returns <code>true</code> if <code>node</code> was
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   432
     *   successfully serialized. Return <code>false</code> in case the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   433
     *   normal processing stopped but the implementation kept serializing
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   434
     *   the document; the result of the serialization being implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   435
     *   dependent then.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   436
     * @exception LSException
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   437
     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   438
     *   serialize the node. DOM applications should attach a
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   439
     *   <code>DOMErrorHandler</code> using the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   440
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   441
     * if they wish to get details on the error.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   442
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   443
    public boolean write(Node nodeArg,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   444
                         LSOutput destination)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   445
                         throws LSException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   446
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   447
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   448
     *  A convenience method that acts as if <code>LSSerializer.write</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   449
     * was called with a <code>LSOutput</code> with no encoding specified
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   450
     * and <code>LSOutput.systemId</code> set to the <code>uri</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   451
     * argument.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   452
     * @param nodeArg  The node to serialize.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   453
     * @param uri The URI to write to.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   454
     * @return  Returns <code>true</code> if <code>node</code> was
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   455
     *   successfully serialized. Return <code>false</code> in case the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   456
     *   normal processing stopped but the implementation kept serializing
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   457
     *   the document; the result of the serialization being implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   458
     *   dependent then.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   459
     * @exception LSException
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   460
     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   461
     *   serialize the node. DOM applications should attach a
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   462
     *   <code>DOMErrorHandler</code> using the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   463
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   464
     * if they wish to get details on the error.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   465
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   466
    public boolean writeToURI(Node nodeArg,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   467
                              String uri)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   468
                              throws LSException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   469
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   470
    /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   471
     *  Serialize the specified node as described above in the general
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   472
     * description of the <code>LSSerializer</code> interface. The output is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   473
     * written to a <code>DOMString</code> that is returned to the caller.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   474
     * The encoding used is the encoding of the <code>DOMString</code> type,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   475
     * i.e. UTF-16. Note that no Byte Order Mark is generated in a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   476
     * <code>DOMString</code> object.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   477
     * @param nodeArg  The node to serialize.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   478
     * @return  Returns the serialized data.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   479
     * @exception DOMException
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   480
     *    DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   481
     *   fit in a <code>DOMString</code>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   482
     * @exception LSException
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   483
     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   484
     *   serialize the node. DOM applications should attach a
48241
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   485
     *   <code>DOMErrorHandler</code> using the parameter
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   486
     * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
18d487a1f933 8190823: Broken link in org/w3c/dom/ls/
joehw
parents: 47216
diff changeset
   487
     * if they wish to get details on the error.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   488
     */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   489
    public String writeToString(Node nodeArg)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   490
                                throws DOMException, LSException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   491
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   492
}