KickJava   Java API By Example, From Geeks To Geeks.

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


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

7 package javax.xml.transform;
8
9 /**
10  * Provides string constants that can be used to set
11  * output properties for a Transformer, or to retrieve
12  * output properties from a Transformer or Templates object.
13  * <p>All the fields in this class are read-only.</p>
14  *
15  * @see <a HREF="http://www.w3.org/TR/xslt#output">
16  * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
17  */

18 public class OutputKeys {
19
20     /**
21      * Default constructor is private on purpose. This class is
22      * only for static variable access, and should never be constructed.
23      */

24     private OutputKeys() { }
25
26     /**
27      * method = "xml" | "html" | "text" | <var>expanded name</var>.
28      *
29      * <p>The value of the method property identifies the overall method that
30      * should be used for outputting the result tree. Other non-namespaced
31      * values may be used, such as "xhtml", but, if accepted, the handling
32      * of such values is implementation defined. If any of the method values
33      * are not accepted and are not namespace qualified,
34      * then {@link javax.xml.transform.Transformer#setOutputProperty}
35      * or {@link javax.xml.transform.Transformer#setOutputProperties} will
36      * throw a {@link java.lang.IllegalArgumentException}.</p>
37      *
38      * @see <a HREF="http://www.w3.org/TR/xslt#output">
39      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
40      */

41     public static final String JavaDoc METHOD = "method";
42
43     /**
44      * version = <var>nmtoken</var>.
45      *
46      * <p><code>version</code> specifies the version of the output
47      * method.</p>
48      * <p>When the output method is "xml", the version value specifies the
49      * version of XML to be used for outputting the result tree. The default
50      * value for the xml output method is 1.0. When the output method is
51      * "html", the version value indicates the version of the HTML.
52      * The default value for the xml output method is 4.0, which specifies
53      * that the result should be output as HTML conforming to the HTML 4.0
54      * Recommendation [HTML]. If the output method is "text", the version
55      * property is ignored.</p>
56      * @see <a HREF="http://www.w3.org/TR/xslt#output">
57      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
58      */

59     public static final String JavaDoc VERSION = "version";
60
61     /**
62      * encoding = <var>string</var>.
63      *
64      * <p><code>encoding</code> specifies the preferred character
65      * encoding that the Transformer should use to encode sequences of
66      * characters as sequences of bytes. The value of the encoding property should be
67      * treated case-insensitively. The value must only contain characters in
68      * the range #x21 to #x7E (i.e., printable ASCII characters). The value
69      * should either be a <code>charset</code> registered with the Internet
70      * Assigned Numbers Authority <a HREF="#IANA">[IANA]</a>,
71      * <a HREF="#RFC2278">[RFC2278]</a> or start with <code>X-</code>.</p>
72      * @see <a HREF="http://www.w3.org/TR/xslt#output">
73      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
74      */

75     public static final String JavaDoc ENCODING = "encoding";
76
77     /**
78      * omit-xml-declaration = "yes" | "no".
79      *
80      * <p><code>omit-xml-declaration</code> specifies whether the XSLT
81      * processor should output an XML declaration; the value must be
82      * <code>yes</code> or <code>no</code>.</p>
83      * @see <a HREF="http://www.w3.org/TR/xslt#output">
84      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
85      */

86     public static final String JavaDoc OMIT_XML_DECLARATION = "omit-xml-declaration";
87
88     /**
89      * standalone = "yes" | "no".
90      *
91      * <p><code>standalone</code> specifies whether the Transformer
92      * should output a standalone document declaration; the value must be
93      * <code>yes</code> or <code>no</code>.</p>
94      * @see <a HREF="http://www.w3.org/TR/xslt#output">
95      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
96      */

97     public static final String JavaDoc STANDALONE = "standalone";
98
99     /**
100      * doctype-public = <var>string</var>.
101      * <p>See the documentation for the {@link #DOCTYPE_SYSTEM} property
102      * for a description of what the value of the key should be.</p>
103      *
104      * @see <a HREF="http://www.w3.org/TR/xslt#output">
105      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
106      */

107     public static final String JavaDoc DOCTYPE_PUBLIC = "doctype-public";
108
109     /**
110      * doctype-system = <var>string</var>.
111      * <p><code>doctype-system</code> specifies the system identifier
112      * to be used in the document type declaration.</p>
113      * <p>If the doctype-system property is specified, the xml output method
114      * should output a document type declaration immediately before the first
115      * element. The name following &lt;!DOCTYPE should be the name of the first
116      * element. If doctype-public property is also specified, then the xml
117      * output method should output PUBLIC followed by the public identifier
118      * and then the system identifier; otherwise, it should output SYSTEM
119      * followed by the system identifier. The internal subset should be empty.
120      * The value of the doctype-public property should be ignored unless the doctype-system
121      * property is specified.</p>
122      * <p>If the doctype-public or doctype-system properties are specified,
123      * then the html output method should output a document type declaration
124      * immediately before the first element. The name following &lt;!DOCTYPE
125      * should be HTML or html. If the doctype-public property is specified,
126      * then the output method should output PUBLIC followed by the specified
127      * public identifier; if the doctype-system property is also specified,
128      * it should also output the specified system identifier following the
129      * public identifier. If the doctype-system property is specified but
130      * the doctype-public property is not specified, then the output method
131      * should output SYSTEM followed by the specified system identifier.</p>
132      *
133      * <p><code>doctype-system</code> specifies the system identifier
134      * to be used in the document type declaration.</p>
135      * @see <a HREF="http://www.w3.org/TR/xslt#output">
136      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
137      */

138     public static final String JavaDoc DOCTYPE_SYSTEM = "doctype-system";
139
140     /**
141      * cdata-section-elements = <var>expanded names</var>.
142      *
143      * <p><code>cdata-section-elements</code> specifies a whitespace delimited
144      * list of the names of elements whose text node children should be output
145      * using CDATA sections. Note that these names must use the format
146      * described in the section Qualfied Name Representation in
147      * {@link javax.xml.transform}.</p>
148      *
149      * @see <a HREF="http://www.w3.org/TR/xslt#output">
150      * section 16 of the XSL Transformations (XSLT) W3C Recommendation.</a>
151      */

152     public static final String JavaDoc CDATA_SECTION_ELEMENTS =
153         "cdata-section-elements";
154
155     /**
156      * indent = "yes" | "no".
157      *
158      * <p><code>indent</code> specifies whether the Transformer may
159      * add additional whitespace when outputting the result tree; the value
160      * must be <code>yes</code> or <code>no</code>. </p>
161      * @see <a HREF="http://www.w3.org/TR/xslt#output">
162      * section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
163      */

164     public static final String JavaDoc INDENT = "indent";
165
166     /**
167      * media-type = <var>string</var>.
168      *
169      * <p><code>media-type</code> specifies the media type (MIME
170      * content type) of the data that results from outputting the result
171      * tree. The <code>charset</code> parameter should not be specified
172      * explicitly; instead, when the top-level media type is
173      * <code>text</code>, a <code>charset</code> parameter should be added
174      * according to the character encoding actually used by the output
175      * method. </p>
176      * @see <a HREF="http://www.w3.org/TR/xslt#output">s
177      * ection 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
178      */

179     public static final String JavaDoc MEDIA_TYPE = "media-type";
180 }
181
Popular Tags