Lines Matching refs:node

34  * <p>If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation,
50 * <p><code>node</code>,
62 * <p>Use a DOM node to create a new output target.</p>
64 * <p>In practice, the node should be
65 * a {@link org.w3c.dom.Document} node,
66 * a {@link org.w3c.dom.DocumentFragment} node, or
67 * a {@link org.w3c.dom.Element} node.
68 * In other words, a node that accepts children.</p>
74 * @param node The DOM node that will contain the result tree.
76 public DOMResult(Node node) {
77 setNode(node);
83 * <p>Use a DOM node to create a new output target with the specified System ID.<p>
85 * <p>In practice, the node should be
86 * a {@link org.w3c.dom.Document} node,
87 * a {@link org.w3c.dom.DocumentFragment} node, or
88 * a {@link org.w3c.dom.Element} node.
89 * In other words, a node that accepts children.</p>
93 * @param node The DOM node that will contain the result tree.
94 * @param systemId The system identifier which may be used in association with this node.
96 public DOMResult(Node node, String systemId) {
97 setNode(node);
103 * <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.</p>
105 * <p>In practice, <code>node</code> and <code>nextSibling</code> should be
106 * a {@link org.w3c.dom.Document} node,
107 * a {@link org.w3c.dom.DocumentFragment} node, or
108 * a {@link org.w3c.dom.Element} node.
109 * In other words, a node that accepts children.</p>
111 * <p>Use <code>nextSibling</code> to specify the child node
113 * If <code>nextSibling</code> is not a sibling of <code>node</code>,
115 * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
118 * then the behavior is the same as calling {@link #DOMResult(Node node)},
119 * i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
123 * @param node The DOM node that will contain the result tree.
124 * @param nextSibling The child node where the result nodes should be inserted before.
126 * @throws IllegalArgumentException If <code>nextSibling</code> is not a sibling of <code>node</code> or
127 * <code>node</code> is <code>null</code> and <code>nextSibling</code>
132 public DOMResult(Node node, Node nextSibling) {
136 // cannot be a sibling of a null node
137 if (node == null) {
138 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
141 // nextSibling contained by node?
142 if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
143 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
147 setNode(node);
153 * <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and
156 * <p>In practice, <code>node</code> and <code>nextSibling</code> should be
157 * a {@link org.w3c.dom.Document} node,
158 * a {@link org.w3c.dom.DocumentFragment} node, or a
159 * {@link org.w3c.dom.Element} node.
160 * In other words, a node that accepts children.</p>
162 * <p>Use <code>nextSibling</code> to specify the child node
164 * If <code>nextSibling</code> is not a sibling of <code>node</code>,
166 * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
169 * then the behavior is the same as calling {@link #DOMResult(Node node, String systemId)},
170 * i.e. append the result nodes as the last child of the specified node and use the specified System ID.</p>
172 * @param node The DOM node that will contain the result tree.
173 * @param nextSibling The child node where the result nodes should be inserted before.
174 * @param systemId The system identifier which may be used in association with this node.
177 * sibling of <code>node</code> or
178 * <code>node</code> is <code>null</code> and <code>nextSibling</code>
183 public DOMResult(Node node, Node nextSibling, String systemId) {
187 // cannot be a sibling of a null node
188 if (node == null) {
189 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
192 // nextSibling contained by node?
193 if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
194 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
198 setNode(node);
204 * <p>Set the node that will contain the result DOM tree.<p>
206 * <p>In practice, the node should be
207 * a {@link org.w3c.dom.Document} node,
208 * a {@link org.w3c.dom.DocumentFragment} node, or
209 * a {@link org.w3c.dom.Element} node.
210 * In other words, a node that accepts children.</p>
214 * <code>node</code> is not a parent of <code>nextSibling</code>.
215 * An <code>IllegalStateException</code> is thrown if <code>node</code> is <code>null</code> and
218 * @param node The node to which the transformation will be appended.
222 * <code>nextSibling</code> is not a child of <code>node</code> or
223 * <code>node</code> is <code>null</code> and
226 public void setNode(Node node) {
229 // cannot be a sibling of a null node
230 if (node == null) {
231 throw new IllegalStateException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
234 // nextSibling contained by node?
235 if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
236 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
240 this.node = node;
244 * <p>Get the node that will contain the result DOM tree.</p>
246 * <p>If no node was set via
247 * {@link #DOMResult(Node node)},
248 * {@link #DOMResult(Node node, String systeId)},
249 * {@link #DOMResult(Node node, Node nextSibling)},
250 * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
251 * {@link #setNode(Node node)},
252 * then the node will be set by the transformation, and may be obtained from this method once the transformation is complete.
255 * @return The node to which the transformation will be appended.
258 return node;
262 * <p>Set the child node before which the result nodes will be inserted.</p>
264 * <p>Use <code>nextSibling</code> to specify the child node
266 * If <code>nextSibling</code> is not a descendant of <code>node</code>,
268 * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
271 * then the behavior is the same as calling {@link #DOMResult(Node node)},
272 * i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
274 * @param nextSibling The child node before which the result nodes will be inserted.
277 * descendant of <code>node</code>.
278 * @throws IllegalStateException If <code>node</code> is <code>null</code>
287 // cannot be a sibling of a null node
288 if (node == null) {
289 throw new IllegalStateException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
292 // nextSibling contained by node?
293 if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
294 throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
302 * <p>Get the child node before which the result nodes will be inserted.</p>
304 * <p>If no node was set via
305 * {@link #DOMResult(Node node, Node nextSibling)},
306 * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
310 * @return The child node before which the result nodes will be inserted.
319 * <p>Set the systemId that may be used in association with the node.</p>
331 * {@link #DOMResult(Node node, String systemId)},
332 * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
347 * <p>The node to which the transformation will be appended.</p>
349 private Node node = null;
352 * <p>The child node before which the result nodes will be inserted.</p>
359 * <p>The System ID that may be used in association with the node.</p>