6
|
1 |
/*
|
|
2 |
* reserved comment block
|
|
3 |
* DO NOT REMOVE OR ALTER!
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Copyright 2003-2004 The Apache Software Foundation.
|
|
7 |
*
|
|
8 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9 |
* you may not use this file except in compliance with the License.
|
|
10 |
* You may obtain a copy of the License at
|
|
11 |
*
|
|
12 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13 |
*
|
|
14 |
* Unless required by applicable law or agreed to in writing, software
|
|
15 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17 |
* See the License for the specific language governing permissions and
|
|
18 |
* limitations under the License.
|
|
19 |
*/
|
|
20 |
/*
|
|
21 |
* $Id: XSLOutputAttributes.java,v 1.2.4.1 2005/09/15 08:15:32 suresh_emailid Exp $
|
|
22 |
*/
|
|
23 |
package com.sun.org.apache.xml.internal.serializer;
|
|
24 |
|
|
25 |
import java.util.Vector;
|
|
26 |
|
|
27 |
/**
|
|
28 |
* This interface has methods associated with the XSLT xsl:output attribues
|
|
29 |
* specified in the stylesheet that effect the format of the document output.
|
|
30 |
*
|
|
31 |
* In an XSLT stylesheet these attributes appear for example as:
|
|
32 |
* <pre>
|
|
33 |
* <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
|
|
34 |
* </pre>
|
|
35 |
* The xsl:output attributes covered in this interface are:
|
|
36 |
* <pre>
|
|
37 |
* version
|
|
38 |
* encoding
|
|
39 |
* omit-xml-declarations
|
|
40 |
* standalone
|
|
41 |
* doctype-public
|
|
42 |
* doctype-system
|
|
43 |
* cdata-section-elements
|
|
44 |
* indent
|
|
45 |
* media-type
|
|
46 |
* </pre>
|
|
47 |
*
|
|
48 |
* The one attribute not covered in this interface is <code>method</code> as
|
|
49 |
* this value is implicitly chosen by the serializer that is created, for
|
|
50 |
* example ToXMLStream vs. ToHTMLStream or another one.
|
|
51 |
*
|
|
52 |
* This interface is only used internally within Xalan.
|
|
53 |
*
|
|
54 |
* @xsl.usage internal
|
|
55 |
*/
|
|
56 |
interface XSLOutputAttributes
|
|
57 |
{
|
|
58 |
/**
|
|
59 |
* Returns the previously set value of the value to be used as the public
|
|
60 |
* identifier in the document type declaration (DTD).
|
|
61 |
*
|
|
62 |
*@return the public identifier to be used in the DOCTYPE declaration in the
|
|
63 |
* output document.
|
|
64 |
*/
|
|
65 |
public String getDoctypePublic();
|
|
66 |
/**
|
|
67 |
* Returns the previously set value of the value to be used
|
|
68 |
* as the system identifier in the document type declaration (DTD).
|
|
69 |
* @return the system identifier to be used in the DOCTYPE declaration in
|
|
70 |
* the output document.
|
|
71 |
*
|
|
72 |
*/
|
|
73 |
public String getDoctypeSystem();
|
|
74 |
/**
|
|
75 |
* @return the character encoding to be used in the output document.
|
|
76 |
*/
|
|
77 |
public String getEncoding();
|
|
78 |
/**
|
|
79 |
* @return true if the output document should be indented to visually
|
|
80 |
* indicate its structure.
|
|
81 |
*/
|
|
82 |
public boolean getIndent();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* @return the number of spaces to indent for each indentation level.
|
|
86 |
*/
|
|
87 |
public int getIndentAmount();
|
|
88 |
/**
|
|
89 |
* @return the mediatype the media-type or MIME type associated with the
|
|
90 |
* output document.
|
|
91 |
*/
|
|
92 |
public String getMediaType();
|
|
93 |
/**
|
|
94 |
* @return true if the XML declaration is to be omitted from the output
|
|
95 |
* document.
|
|
96 |
*/
|
|
97 |
public boolean getOmitXMLDeclaration();
|
|
98 |
/**
|
|
99 |
* @return a value of "yes" if the <code>standalone</code> delaration is to
|
|
100 |
* be included in the output document.
|
|
101 |
*/
|
|
102 |
public String getStandalone();
|
|
103 |
/**
|
|
104 |
* @return the version of the output format.
|
|
105 |
*/
|
|
106 |
public String getVersion();
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
/**
|
|
114 |
* Sets the value coming from the xsl:output cdata-section-elements
|
|
115 |
* stylesheet property.
|
|
116 |
*
|
|
117 |
* This sets the elements whose text elements are to be output as CDATA
|
|
118 |
* sections.
|
|
119 |
* @param URI_and_localNames pairs of namespace URI and local names that
|
|
120 |
* identify elements whose text elements are to be output as CDATA sections.
|
|
121 |
* The namespace of the local element must be the given URI to match. The
|
|
122 |
* qName is not given because the prefix does not matter, only the namespace
|
|
123 |
* URI to which that prefix would map matters, so the prefix itself is not
|
|
124 |
* relevant in specifying which elements have their text to be output as
|
|
125 |
* CDATA sections.
|
|
126 |
*/
|
|
127 |
public void setCdataSectionElements(Vector URI_and_localNames);
|
|
128 |
|
|
129 |
/** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
|
|
130 |
* @param system the system identifier to be used in the DOCTYPE declaration
|
|
131 |
* in the output document.
|
|
132 |
* @param pub the public identifier to be used in the DOCTYPE declaration in
|
|
133 |
* the output document.
|
|
134 |
*/
|
|
135 |
public void setDoctype(String system, String pub);
|
|
136 |
|
|
137 |
/** Set the value coming from the xsl:output doctype-public stylesheet attribute.
|
|
138 |
* @param doctype the public identifier to be used in the DOCTYPE
|
|
139 |
* declaration in the output document.
|
|
140 |
*/
|
|
141 |
public void setDoctypePublic(String doctype);
|
|
142 |
/** Set the value coming from the xsl:output doctype-system stylesheet attribute.
|
|
143 |
* @param doctype the system identifier to be used in the DOCTYPE
|
|
144 |
* declaration in the output document.
|
|
145 |
*/
|
|
146 |
public void setDoctypeSystem(String doctype);
|
|
147 |
/**
|
|
148 |
* Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
|
|
149 |
* @param encoding the character encoding
|
|
150 |
*/
|
|
151 |
public void setEncoding(String encoding);
|
|
152 |
/**
|
|
153 |
* Sets the value coming from the xsl:output indent stylesheet
|
|
154 |
* attribute.
|
|
155 |
* @param indent true if the output document should be indented to visually
|
|
156 |
* indicate its structure.
|
|
157 |
*/
|
|
158 |
public void setIndent(boolean indent);
|
|
159 |
/**
|
|
160 |
* Sets the value coming from the xsl:output media-type stylesheet attribute.
|
|
161 |
* @param mediatype the media-type or MIME type associated with the output
|
|
162 |
* document.
|
|
163 |
*/
|
|
164 |
public void setMediaType(String mediatype);
|
|
165 |
/**
|
|
166 |
* Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
|
|
167 |
* @param b true if the XML declaration is to be omitted from the output
|
|
168 |
* document.
|
|
169 |
*/
|
|
170 |
public void setOmitXMLDeclaration(boolean b);
|
|
171 |
/**
|
|
172 |
* Sets the value coming from the xsl:output standalone stylesheet attribute.
|
|
173 |
* @param standalone a value of "yes" indicates that the
|
|
174 |
* <code>standalone</code> delaration is to be included in the output
|
|
175 |
* document.
|
|
176 |
*/
|
|
177 |
public void setStandalone(String standalone);
|
|
178 |
/**
|
|
179 |
* Sets the value coming from the xsl:output version attribute.
|
|
180 |
* @param version the version of the output format.
|
|
181 |
*/
|
|
182 |
public void setVersion(String version);
|
|
183 |
|
|
184 |
}
|