KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > platform > xml > XMLTransformer


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.platform.xml;
23
24 import java.io.OutputStream JavaDoc;
25 import java.io.Writer JavaDoc;
26 import java.net.URL JavaDoc;
27 import javax.xml.transform.Result JavaDoc;
28 import javax.xml.transform.Source JavaDoc;
29 import org.w3c.dom.Document JavaDoc;
30 import org.w3c.dom.Node JavaDoc;
31 import org.xml.sax.ContentHandler JavaDoc;
32
33 public interface XMLTransformer {
34     public String JavaDoc getEncoding();
35
36     public void setEncoding(String JavaDoc encoding);
37
38     public boolean isFormattedOutput();
39
40     public void setFormattedOutput(boolean shouldFormat);
41
42     public boolean isFragment();
43
44     public void setFragment(boolean fragment);
45
46     public String JavaDoc getVersion();
47
48     public void setVersion(String JavaDoc version);
49
50     public void transform(Node JavaDoc sourceNode, OutputStream JavaDoc resultOutputStream) throws XMLPlatformException;
51
52     public void transform(Node JavaDoc sourceNode, ContentHandler JavaDoc resultContentHandler) throws XMLPlatformException;
53
54     public void transform(Node JavaDoc sourceNode, Result JavaDoc result) throws XMLPlatformException;
55
56     public void transform(Node JavaDoc sourceNode, Writer JavaDoc resultWriter) throws XMLPlatformException;
57
58     public void transform(Source JavaDoc source, Result JavaDoc result) throws XMLPlatformException;
59
60     public void transform(Document JavaDoc sourceDocument, Node JavaDoc resultParentNode, URL JavaDoc stylesheet) throws XMLPlatformException;
61 }
62
Popular Tags