KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > transform > sax > TransformerHandler


1 // $Id: TransformerHandler.java,v 1.2.26.1 2004/07/13 22:27:51 jsuttor Exp $
2
/*
3  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
4  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
5  */

6
7 /*
8  * @(#)TransformerHandler.java 1.13 04/07/13
9  */

10 package javax.xml.transform.sax;
11
12 import javax.xml.transform.Result JavaDoc;
13 import javax.xml.transform.Transformer JavaDoc;
14
15 import org.xml.sax.ContentHandler JavaDoc;
16 import org.xml.sax.DTDHandler JavaDoc;
17 import org.xml.sax.ext.LexicalHandler JavaDoc;
18
19 /**
20  * A TransformerHandler
21  * listens for SAX ContentHandler parse events and transforms
22  * them to a Result.
23  */

24 public interface TransformerHandler
25     extends ContentHandler JavaDoc, LexicalHandler JavaDoc, DTDHandler JavaDoc {
26
27     /**
28      * <p>Set the <code>Result</code> associated with this
29      * <code>TransformerHandler</code> to be used for the transformation.</p>
30      *
31      * @param result A <code>Result</code> instance, should not be
32      * <code>null<code>.
33      *
34      * @throws IllegalArgumentException if result is invalid for some reason.
35      */

36     public void setResult(Result JavaDoc result) throws IllegalArgumentException JavaDoc;
37
38     /**
39      * Set the base ID (URI or system ID) from where relative
40      * URLs will be resolved.
41      * @param systemID Base URI for the source tree.
42      */

43     public void setSystemId(String JavaDoc systemID);
44
45     /**
46      * Get the base ID (URI or system ID) from where relative
47      * URLs will be resolved.
48      * @return The systemID that was set with {@link #setSystemId}.
49      */

50     public String JavaDoc getSystemId();
51
52     /**
53      * <p>Get the <code>Transformer</code> associated with this handler, which
54      * is needed in order to set parameters and output properties.</p>
55      *
56      * @return <code>Transformer</code> associated with this
57      * <code>TransformerHandler</code>.
58      */

59     public Transformer JavaDoc getTransformer();
60 }
61
Popular Tags