KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > serializer > XSLOutputAttributes


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: XSLOutputAttributes.java,v 1.2 2004/02/17 04:18:18 minchau Exp $
18  */

19 package com.sun.org.apache.xml.internal.serializer;
20
21 import java.util.Vector JavaDoc;
22
23 /**
24  * This interface has methods associated with the XSLT xsl:output attribues
25  * specified in the stylesheet that effect the format of the document output.
26  *
27  * In an XSLT stylesheet these attributes appear for example as:
28  * <pre>
29  * <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
30  * </pre>
31  * The xsl:output attributes covered in this interface are:
32  * <pre>
33  * version
34  * encoding
35  * omit-xml-declarations
36  * standalone
37  * doctype-public
38  * doctype-system
39  * cdata-section-elements
40  * indent
41  * media-type
42  * </pre>
43  *
44  * The one attribute not covered in this interface is <code>method</code> as
45  * this value is implicitly chosen by the serializer that is created, for
46  * example ToXMLStream vs. ToHTMLStream or another one.
47  */

48 public interface XSLOutputAttributes
49 {
50     /**
51      * Returns the previously set value of the value to be used as the public
52      * identifier in the document type declaration (DTD).
53      *
54      *@return the public identifier to be used in the DOCTYPE declaration in the
55      * output document.
56      */

57     public String JavaDoc getDoctypePublic();
58     /**
59      * Returns the previously set value of the value to be used
60      * as the system identifier in the document type declaration (DTD).
61      * @return the system identifier to be used in the DOCTYPE declaration in
62      * the output document.
63      *
64      */

65     public String JavaDoc getDoctypeSystem();
66     /**
67      * @return the character encoding to be used in the output document.
68      */

69     public String JavaDoc getEncoding();
70     /**
71      * @return true if the output document should be indented to visually
72      * indicate its structure.
73      */

74     public boolean getIndent();
75     
76     /**
77      * @return the number of spaces to indent for each indentation level.
78      */

79     public int getIndentAmount();
80     /**
81      * @return the mediatype the media-type or MIME type associated with the
82      * output document.
83      */

84     public String JavaDoc getMediaType();
85     /**
86      * @return true if the XML declaration is to be omitted from the output
87      * document.
88      */

89     public boolean getOmitXMLDeclaration();
90     /**
91       * @return a value of "yes" if the <code>standalone</code> delaration is to
92       * be included in the output document.
93       */

94     public String JavaDoc getStandalone();
95     /**
96      * @return the version of the output format.
97      */

98     public String JavaDoc getVersion();
99
100
101
102
103
104
105     /**
106      * Sets the value coming from the xsl:output cdata-section-elements
107      * stylesheet property.
108      *
109      * This sets the elements whose text elements are to be output as CDATA
110      * sections.
111      * @param URI_and_localNames pairs of namespace URI and local names that
112      * identify elements whose text elements are to be output as CDATA sections.
113      * The namespace of the local element must be the given URI to match. The
114      * qName is not given because the prefix does not matter, only the namespace
115      * URI to which that prefix would map matters, so the prefix itself is not
116      * relevant in specifying which elements have their text to be output as
117      * CDATA sections.
118      */

119     public void setCdataSectionElements(Vector JavaDoc URI_and_localNames);
120
121     /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
122      * @param system the system identifier to be used in the DOCTYPE declaration
123      * in the output document.
124      * @param pub the public identifier to be used in the DOCTYPE declaration in
125      * the output document.
126      */

127     public void setDoctype(String JavaDoc system, String JavaDoc pub);
128
129     /** Set the value coming from the xsl:output doctype-public stylesheet attribute.
130       * @param doctype the public identifier to be used in the DOCTYPE
131       * declaration in the output document.
132       */

133     public void setDoctypePublic(String JavaDoc doctype);
134     /** Set the value coming from the xsl:output doctype-system stylesheet attribute.
135       * @param doctype the system identifier to be used in the DOCTYPE
136       * declaration in the output document.
137       */

138     public void setDoctypeSystem(String JavaDoc doctype);
139     /**
140      * Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
141      * @param encoding the character encoding
142      */

143     public void setEncoding(String JavaDoc encoding);
144     /**
145      * Sets the value coming from the xsl:output indent stylesheet
146      * attribute.
147      * @param indent true if the output document should be indented to visually
148      * indicate its structure.
149      */

150     public void setIndent(boolean indent);
151     /**
152      * Sets the value coming from the xsl:output media-type stylesheet attribute.
153      * @param mediatype the media-type or MIME type associated with the output
154      * document.
155      */

156     public void setMediaType(String JavaDoc mediatype);
157     /**
158      * Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
159      * @param b true if the XML declaration is to be omitted from the output
160      * document.
161      */

162     public void setOmitXMLDeclaration(boolean b);
163     /**
164      * Sets the value coming from the xsl:output standalone stylesheet attribute.
165      * @param standalone a value of "yes" indicates that the
166      * <code>standalone</code> delaration is to be included in the output
167      * document.
168      */

169     public void setStandalone(String JavaDoc standalone);
170     /**
171      * Sets the value coming from the xsl:output version attribute.
172      * @param version the version of the output format.
173      */

174     public void setVersion(String JavaDoc version);
175
176 }
177
Popular Tags