KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > transform > Result


1 // $Id: Result.java,v 1.2 2003/10/22 03:53:16 jsuttor Exp $
2

3 /*
4  * @(#)Result.java 1.13 04/07/26
5  *
6  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
7  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
8  */

9
10 package javax.xml.transform;
11
12 /**
13  * <p>An object that implements this interface contains the information
14  * needed to build a transformation result tree.</p>
15  *
16  * @author <a HREF="Jeff.Suttor@Sun.com">Jeff Suttor</a>
17  */

18 public interface Result {
19
20     /**
21      * The name of the processing instruction that is sent if the
22      * result tree disables output escaping.
23      *
24      * <p>Normally, result tree serialization escapes & and < (and
25      * possibly other characters) when outputting text nodes.
26      * This ensures that the output is well-formed XML. However,
27      * it is sometimes convenient to be able to produce output that is
28      * almost, but not quite well-formed XML; for example,
29      * the output may include ill-formed sections that will
30      * be transformed into well-formed XML by a subsequent non-XML aware
31      * process. If a processing instruction is sent with this name,
32      * serialization should be output without any escaping. </p>
33      *
34      * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
35      * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
36      *
37      * @see <a HREF="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
38      */

39     public static final String JavaDoc PI_DISABLE_OUTPUT_ESCAPING =
40         "javax.xml.transform.disable-output-escaping";
41
42     /**
43      * The name of the processing instruction that is sent
44      * if the result tree enables output escaping at some point after having
45      * received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
46      *
47      * @see <a HREF="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
48      */

49     public static final String JavaDoc PI_ENABLE_OUTPUT_ESCAPING =
50         "javax.xml.transform.enable-output-escaping";
51
52     /**
53      * Set the system identifier for this Result.
54      *
55      * <p>If the Result is not to be written to a file, the system identifier is optional.
56      * The application may still want to provide one, however, for use in error messages
57      * and warnings, or to resolve relative output identifiers.</p>
58      *
59      * @param systemId The system identifier as a URI string.
60      */

61     public void setSystemId(String JavaDoc systemId);
62
63     /**
64      * Get the system identifier that was set with setSystemId.
65      *
66      * @return The system identifier that was set with setSystemId,
67      * or null if setSystemId was not called.
68      */

69     public String JavaDoc getSystemId();
70 }
71
Popular Tags