Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.xml/share/classes/jdk/xml/internal/JdkConstants.java
40948 views
1
/*
2
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
package jdk.xml.internal;
27
28
/**
29
* This class holds constants shared across XML components. Historically, there
30
* had been a component boundary within which some constants were duplicated for
31
* each component, such as Xerces and Xalan.
32
*/
33
public final class JdkConstants {
34
35
//
36
// Constants
37
//
38
//Xerces security manager
39
public static final String SECURITY_MANAGER =
40
"http://apache.org/xml/properties/security-manager";
41
42
//
43
// Implementation limits: API properties
44
//
45
46
/**
47
* Oracle JAXP property prefix.
48
*
49
* @deprecated Use {@code jdk.xml.} instead. Refer to specifications in
50
* the module summary.
51
*/
52
@Deprecated (since="17")
53
public static final String ORACLE_JAXP_PROPERTY_PREFIX =
54
"http://www.oracle.com/xml/jaxp/properties/";
55
56
/**
57
* JDK entity expansion limit. Note that the existing system property
58
* "entityExpansionLimit" with no prefix is still observed.
59
*
60
* @deprecated Use {@link #SP_ENTITY_EXPANSION_LIMIT} instead.
61
*/
62
@Deprecated (since="17")
63
public static final String JDK_ENTITY_EXPANSION_LIMIT =
64
ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit";
65
66
/**
67
* JDK element attribute limit. Note that the existing system property
68
* "elementAttributeLimit" with no prefix is still observed.
69
*
70
* @deprecated Use {@link #SP_ELEMENT_ATTRIBUTE_LIMIT} instead.
71
*/
72
@Deprecated (since="17")
73
public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT =
74
ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit";
75
76
/**
77
* JDK maxOccur limit. Note that the existing system property
78
* "maxOccurLimit" with no prefix is still observed
79
*
80
* @deprecated Use {@link #SP_ENTITY_EXPANSION_LIMIT} instead.
81
*/
82
@Deprecated (since="17")
83
public static final String JDK_MAX_OCCUR_LIMIT =
84
ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit";
85
86
/**
87
* JDK total entity size limit.
88
*
89
* @deprecated Use {@link #SP_TOTAL_ENTITY_SIZE_LIMIT} instead.
90
*/
91
@Deprecated (since="17")
92
public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT =
93
ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit";
94
95
/**
96
* JDK maximum general entity size limit.
97
*
98
* @deprecated Use {@link #SP_GENERAL_ENTITY_SIZE_LIMIT} instead.
99
*/
100
@Deprecated (since="17")
101
public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT =
102
ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit";
103
104
/**
105
* JDK node count limit in entities that limits the total number of nodes
106
* in all of entity references.
107
*
108
* @deprecated Use {@link #SP_ENTITY_REPLACEMENT_LIMIT} instead.
109
*/
110
@Deprecated (since="17")
111
public static final String JDK_ENTITY_REPLACEMENT_LIMIT =
112
ORACLE_JAXP_PROPERTY_PREFIX + "entityReplacementLimit";
113
114
/**
115
* JDK maximum parameter entity size limit.
116
*
117
* @deprecated Use {@link #SP_PARAMETER_ENTITY_SIZE_LIMIT} instead.
118
*/
119
@Deprecated (since="17")
120
public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT =
121
ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit";
122
/**
123
* JDK maximum XML name limit.
124
*
125
* @deprecated Use {@link #SP_XML_NAME_LIMIT} instead.
126
*/
127
@Deprecated (since="17")
128
public static final String JDK_XML_NAME_LIMIT =
129
ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit";
130
131
/**
132
* JDK maxElementDepth limit.
133
*
134
* @deprecated Use {@link #SP_MAX_ELEMENT_DEPTH} instead.
135
*/
136
@Deprecated (since="17")
137
public static final String JDK_MAX_ELEMENT_DEPTH =
138
ORACLE_JAXP_PROPERTY_PREFIX + "maxElementDepth";
139
140
/**
141
* JDK property indicating whether the parser shall print out entity
142
* count information.
143
* Value: a string "yes" means print, "no" or any other string means not.
144
*
145
* @deprecated Use {@link #JDK_DEBUG_LIMIT} instead.
146
*/
147
@Deprecated (since="17")
148
public static final String JDK_ENTITY_COUNT_INFO =
149
ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo";
150
151
public static final String JDK_DEBUG_LIMIT = "jdk.xml.getEntityCountInfo";
152
153
//
154
// Implementation limits: corresponding System Properties of the above
155
// API properties.
156
//
157
// Note: as of JDK 17, properties and System properties now share the same
158
// name with a prefix "jdk.xml.".
159
//
160
/**
161
* JDK entity expansion limit; Note that the existing system property
162
* "entityExpansionLimit" with no prefix is still observed
163
*/
164
public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit";
165
166
/**
167
* JDK element attribute limit; Note that the existing system property
168
* "elementAttributeLimit" with no prefix is still observed
169
*/
170
public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit";
171
172
/**
173
* JDK maxOccur limit; Note that the existing system property
174
* "maxOccurLimit" with no prefix is still observed
175
*/
176
public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit";
177
178
/**
179
* JDK total entity size limit
180
*/
181
public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit";
182
183
/**
184
* JDK maximum general entity size limit
185
*/
186
public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
187
188
/**
189
* JDK node count limit in entities that limits the total number of nodes
190
* in all of entity references.
191
*/
192
public static final String SP_ENTITY_REPLACEMENT_LIMIT = "jdk.xml.entityReplacementLimit";
193
194
/**
195
* JDK maximum parameter entity size limit
196
*/
197
public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit";
198
/**
199
* JDK maximum XML name limit
200
*/
201
public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit";
202
203
/**
204
* JDK maxElementDepth limit
205
*/
206
public static final String SP_MAX_ELEMENT_DEPTH = "jdk.xml.maxElementDepth";
207
208
/**
209
* JDK TransformerFactory and Transformer attribute that specifies a class
210
* loader that will be used for extension functions class loading
211
* Value: a "null", the default value, means that the default EF class loading
212
* path will be used.
213
* Instance of ClassLoader: the specified instance of ClassLoader will be used
214
* for extension functions loading during translation process
215
*/
216
public static final String JDK_EXTENSION_CLASSLOADER = "jdk.xml.transform.extensionClassLoader";
217
// spec-compatible name with a prefix "jdk.xml"
218
public static final String JDK_EXT_CLASSLOADER = "jdk.xml.extensionClassLoader";
219
220
//legacy System Properties
221
public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit";
222
public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ;
223
public final static String MAX_OCCUR_LIMIT = "maxOccurLimit";
224
225
/**
226
* A string "yes" that can be used for properties such as getEntityCountInfo
227
*/
228
public static final String JDK_YES = "yes";
229
230
// Oracle Feature:
231
/**
232
* <p>Use Service Mechanism</p>
233
*
234
* <ul>
235
* <li>
236
* {@code true} instruct an object to use service mechanism to
237
* find a service implementation. This is the default behavior.
238
* </li>
239
* <li>
240
* {@code false} instruct an object to skip service mechanism and
241
* use the default implementation for that service.
242
* </li>
243
* </ul>
244
* @deprecated Use {@link jdk.xml.internal.JdkXmlUtils#OVERRIDE_PARSER} instead.
245
*/
246
@Deprecated (since="17")
247
public static final String ORACLE_FEATURE_SERVICE_MECHANISM =
248
"http://www.oracle.com/feature/use-service-mechanism";
249
250
//System Properties corresponding to ACCESS_EXTERNAL_* properties
251
public static final String SP_ACCESS_EXTERNAL_STYLESHEET = "javax.xml.accessExternalStylesheet";
252
public static final String SP_ACCESS_EXTERNAL_DTD = "javax.xml.accessExternalDTD";
253
public static final String SP_ACCESS_EXTERNAL_SCHEMA = "javax.xml.accessExternalSchema";
254
255
//all access keyword
256
public static final String ACCESS_EXTERNAL_ALL = "all";
257
258
/**
259
* Default value when FEATURE_SECURE_PROCESSING (FSP) is set to true
260
*/
261
public static final String EXTERNAL_ACCESS_DEFAULT_FSP = "";
262
263
/**
264
* FEATURE_SECURE_PROCESSING (FSP) is false by default
265
*/
266
public static final String EXTERNAL_ACCESS_DEFAULT = ACCESS_EXTERNAL_ALL;
267
268
public static final String XML_SECURITY_PROPERTY_MANAGER =
269
"jdk.xml.xmlSecurityPropertyManager";
270
271
/**
272
* Values for a feature
273
*/
274
public static final String FEATURE_TRUE = "true";
275
public static final String FEATURE_FALSE = "false";
276
277
/**
278
* For DOM Serializer.
279
*
280
* Indicates that the serializer should treat the output as a standalone document.
281
* The JDK specific standalone property controls whether a newline should be
282
* added after the XML header.
283
*
284
* @see similar property xsltcIsStandalone for XSLTC.
285
*/
286
public static final String S_IS_STANDALONE = "isStandalone";
287
288
/**
289
* Fully-qualified property name with the JDK Impl prefix.
290
*
291
* @deprecated Use {@link #SP_IS_STANDALONE} instead.
292
*/
293
@Deprecated (since="17")
294
public static final String FQ_IS_STANDALONE = ORACLE_JAXP_PROPERTY_PREFIX + S_IS_STANDALONE;
295
296
// Corresponding System property
297
public static final String SP_IS_STANDALONE = "jdk.xml.isStandalone";
298
299
/**
300
* For XSLTC.
301
*
302
* Instructs the processor to act as if OutputKeys.STANDALONE is specified
303
* but without writing it out in the declaration.
304
* This property may be used to mitigate the effect of Xalan patch 1495 that
305
* has caused incompatible behaviors.
306
*/
307
/**
308
* <p>Is Standalone</p>
309
*
310
* <ul>
311
* <li>
312
* <code>yes</code> to indicate the output is intended to be used as standalone
313
* </li>
314
* <li>
315
* <code>no</code> has no effect.
316
* </li>
317
* </ul>
318
*
319
* @deprecated Use {@link #SP_XSLTC_IS_STANDALONE} instead.
320
*/
321
@Deprecated (since="17")
322
public static final String ORACLE_IS_STANDALONE = "http://www.oracle.com/xml/is-standalone";
323
324
/**
325
* This property was added to align with those that used ORACLE_JAXP_PROPERTY_PREFIX
326
* as prefix.
327
* @deprecated Use {@link #SP_XSLTC_IS_STANDALONE} instead.
328
*/
329
@Deprecated (since="17")
330
public static final String JDK_IS_STANDALONE = ORACLE_JAXP_PROPERTY_PREFIX +
331
"xsltcIsStandalone";
332
333
// Corresponding System property
334
public static final String SP_XSLTC_IS_STANDALONE = "jdk.xml.xsltcIsStandalone";
335
336
/**
337
* Feature enableExtensionFunctions
338
*/
339
public static final String ORACLE_ENABLE_EXTENSION_FUNCTION =
340
ORACLE_JAXP_PROPERTY_PREFIX + "enableExtensionFunctions";
341
public static final String SP_ENABLE_EXTENSION_FUNCTION =
342
"javax.xml.enableExtensionFunctions";
343
// This is the correct name by the spec
344
public static final String SP_ENABLE_EXTENSION_FUNCTION_SPEC =
345
"jdk.xml.enableExtensionFunctions";
346
347
/**
348
* Reset SymbolTable feature System property name is identical to feature
349
* name
350
*/
351
public final static String RESET_SYMBOL_TABLE = "jdk.xml.resetSymbolTable";
352
/**
353
* Default value of RESET_SYMBOL_TABLE. This will read the System property
354
*/
355
public static final boolean RESET_SYMBOL_TABLE_DEFAULT
356
= SecuritySupport.getJAXPSystemProperty(Boolean.class, RESET_SYMBOL_TABLE, "false");
357
358
/**
359
* jdk.xml.overrideDefaultParser: enables the use of a 3rd party's parser
360
* implementation to override the system-default parser.
361
*/
362
public static final String OVERRIDE_PARSER = "jdk.xml.overrideDefaultParser";
363
public static final boolean OVERRIDE_PARSER_DEFAULT = SecuritySupport.getJAXPSystemProperty(
364
Boolean.class, OVERRIDE_PARSER, "false");
365
366
/**
367
* instructs the parser to return the data in a CData section in a single chunk
368
* when the property is zero or unspecified, or in multiple chunks when it is
369
* greater than zero. The parser shall split the data by linebreaks, and any
370
* chunks that are larger than the specified size to ones that are equal to
371
* or smaller than the size.
372
*/
373
public final static String CDATA_CHUNK_SIZE = "jdk.xml.cdataChunkSize";
374
public static final int CDATA_CHUNK_SIZE_DEFAULT
375
= SecuritySupport.getJAXPSystemProperty(Integer.class, CDATA_CHUNK_SIZE, "0");
376
377
}
378
379