45359
|
1 |
/*
|
|
2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Provides DOM specific transformation classes.
|
|
28 |
* <p>
|
|
29 |
* The {@link javax.xml.transform.dom.DOMSource} class allows the
|
|
30 |
* client of the implementation of this API to specify a DOM
|
|
31 |
* {@link org.w3c.dom.Node} as the source of the input tree. The model of
|
|
32 |
* how the Transformer deals with the DOM tree in terms of mismatches with the
|
|
33 |
* <A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
|
|
34 |
* other data models is beyond the scope of this document. Any of the nodes
|
|
35 |
* derived from {@link org.w3c.dom.Node} are legal input.
|
|
36 |
* <p>
|
|
37 |
* The {@link javax.xml.transform.dom.DOMResult} class allows
|
|
38 |
* a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will
|
|
39 |
* be appended. If an output node is not specified, the transformer will use
|
|
40 |
* {@link javax.xml.parsers.DocumentBuilder#newDocument} to create an
|
|
41 |
* output {@link org.w3c.dom.Document} node. If a node is specified, it
|
|
42 |
* should be one of the following: {@link org.w3c.dom.Document},
|
|
43 |
* {@link org.w3c.dom.Element}, or
|
|
44 |
* {@link org.w3c.dom.DocumentFragment}. Specification of any other node
|
|
45 |
* type is implementation dependent and undefined by this API. If the result is a
|
|
46 |
* {@link org.w3c.dom.Document}, the output of the transformation must have
|
|
47 |
* a single element root to set as the document element.
|
|
48 |
* <p>
|
|
49 |
* The {@link javax.xml.transform.dom.DOMLocator} node may be passed
|
|
50 |
* to {@link javax.xml.transform.TransformerException} objects, and
|
|
51 |
* retrieved by trying to cast the result of the
|
|
52 |
* {@link javax.xml.transform.TransformerException#getLocator()} method.
|
|
53 |
* The implementation has no responsibility to use a DOMLocator instead of a
|
|
54 |
* {@link javax.xml.transform.SourceLocator} (though line numbers and the
|
|
55 |
* like do not make much sense for a DOM), so the result of getLocator must always
|
|
56 |
* be tested with an instanceof.
|
|
57 |
*
|
|
58 |
* @since 1.5
|
|
59 |
*/
|
|
60 |
|
|
61 |
package javax.xml.transform.dom;
|