File: properties.xml

package info (click to toggle)
libxerces2-java 2.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 12,596 kB
  • sloc: java: 127,777; xml: 13,728; sh: 39; makefile: 10
file content (322 lines) | stat: -rw-r--r-- 14,521 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?xml version='1.0' encoding='UTF-8'?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->
<!DOCTYPE properties SYSTEM 'dtd/settings.dtd'>
<properties>
 <desc name='Setting Properties'>
  <p>
   If you have created a DOM document builder or a SAX parser using
   the JAXP interfaces, the following instructions tell you how to
   set properties on document builders and SAX parsers created from
   the JAXP interfaces.
  </p>
  <p>
   The DocumentBuilderFactory interface contains a 
   <code>setAttribute(String,Object)</code> method which <em>may</em>
   provide a means to set properties on the underlying parser. When 
   using Xerces, you can set the value of a property with this method.
   For example:
  </p>
  <source>import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
  
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);

String id    = "http://apache.org/xml/properties/dom/document-class-name";
Object value = "org.apache.xerces.dom.DocumentImpl";
try {
    dbf.setAttribute(id, value);
} 
catch (IllegalArgumentException e) {
    System.err.println("could not set parser property");
}</source>
  <p>
   The SAXParser interface contains a
   <code>setProperty(String,Object)</code> method which can be used
   to set properties on the underlying implementation of <code>XMLReader</code>.
   You can also retrieve the underlying <code>XMLReader</code> from the
   SAXParser allowing you to set and query properties on it directly.
   For example:
  </p>
  <source>import javax.xml.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

SAXParser parser = /* created from SAXParserFactory */;
XMLReader reader = parser.getXMLReader();

String id    = "http://apache.org/xml/properties/input-buffer-size";
Object value = new Integer(2048);
try {
    reader.setProperty(id, value);
} 
catch (SAXException e) {
    System.err.println("could not set parser property");
}</source>
 </desc>
 <pcategory name='General Properties'>
  <property name='http://xml.org/sax/properties/xml-string'
            id='xml-string'>
   <desc>
    Get the string of characters associated with the current event. 
    If the parser recognizes and supports this property but is not
    currently parsing text, it should return null.  
   </desc>
   <type>java.lang.String</type>
   <access general='read-only'/>
   <note>
    This property is currently not supported because the contents of
    the XML string returned by this property is not well defined.  
   </note>
  </property>
  <property name='http://apache.org/xml/properties/schema/external-schemaLocation'
            id='schema.external-schemaLocation'>
   <desc>
    The XML Schema Recommendation explicitly states that the inclusion
    of schemaLocation/noNamespaceSchemaLocation attributes is only a 
    hint; it does not mandate that these attributes must be used to 
    locate schemas. Similar situation happens to &lt;import&gt; element in
    schema documents. This property allows the user to specify a list of
    schemas to use. If the targetNamespace of a schema (specified 
    using this property) matches the targetNamespace of a schema 
    occurring in the instance document in schemaLocation attribute, or
    if the targetNamespace matches the namespace attribute of &lt;import&gt;
    element, the schema specified by the user using this property will
    be used (i.e., the schemaLocation attribute in the instance document
    or on the &lt;import&gt; element will be effectively ignored).
   </desc>
   <type>java.lang.String</type>
   <access general='read-write'/>
   <note>
    The syntax is the same as for schemaLocation attributes in 
    instance documents: e.g, "http://www.example.com file_name.xsd". 
    The user can specify more than one XML Schema in the list.   
   </note>
  </property>
  <property name='http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation'
            id='schema.external-noNamespaceSchemaLocation'>
   <desc>
    This property allows the user to specify an XML Schema with no 
    namespace.
   </desc>
   <type>java.lang.String</type>
   <access general='read-write'/>
   <note>
    The syntax is a same as for the noNamespaceSchemaLocation attribute 
    that may occur in an instance document: e.g."file_name.xsd". The 
    user may specify only one XML Schema. For more information see the
    documentation for the 
    http://apache.org/xml/properties/schema/external-schemaLocation 
    property.
   </note>
  </property>
  <property name='http://apache.org/xml/properties/validation/schema/root-element-declaration'
            id='validation.schema.root-element-declaration'>
   <desc>
    A QName or XSElementDeclaration object representing the top-level element declaration 
    used when validating the root element of a document or document fragment (also
    known as the validation root). If the value of this property is non-null the 
    validation root will be validated against the specified element declaration regardless
    of the actual name of the root element in the instance document. If the value is a 
    QName and a element declaration cannot be found an error will be reported.
   </desc>
   <type>javax.xml.namespace.QName or org.apache.xerces.xs.XSElementDeclaration</type>
   <access general='read-write'/>
   <since value='&ParserName; 2.10.0'/>
   <note>
    If the 'root-type-definition' property has been set this property takes precedence
    if its value is non-null.
   </note>
   <note>
    If the value specified is an XSElementDeclaration it must be an object obtained from
    Xerces and must also be an object which is known to the schema validator, for example
    one which would be returned from an XMLGrammarPool. If these constraints are not met
    a ClassCastException may be thrown or processing of substitution groups, xsi:type
    and wildcards may fail to locate otherwise available schema components.
   </note>
   <see idref='validation.schema.root-type-definition'/>
  </property>
  <property name='http://apache.org/xml/properties/validation/schema/root-type-definition'
            id='validation.schema.root-type-definition'>
   <desc>
    A QName or XSTypeDefinition object representing the top-level type definition 
    used when validating the root element of a document or document fragment (also
    known as the validation root). If the value of this property is non-null and the
    'root-element-declaration' property is not set the validation root will not be validated 
    against any element declaration. If the value is a QName and a type definition cannot 
    be found an error will be reported.
   </desc>
   <type>javax.xml.namespace.QName or org.apache.xerces.xs.XSTypeDefinition</type>
   <access general='read-write'/>
   <since value='&ParserName; 2.8.0'/>
   <note>
    If the 'root-element-declaration' property has been set this property is ignored.
   </note>
   <note>
    Prior to &ParserName; 2.10.0 setting the value of this property to an XSTypeDefinition
    was not supported.
   </note>
   <note>
    If the value specified is an XSTypeDefinition it must be an object obtained from
    Xerces and must also be an object which is known to the schema validator, for example
    one which would be returned from an XMLGrammarPool. If these constraints are not met
    a ClassCastException may be thrown or processing of substitution groups, xsi:type
    and wildcards may fail to locate otherwise available schema components.
   </note>
   <see idref='validation.schema.root-element-declaration'/>
  </property>
  <property name='http://apache.org/xml/properties/input-buffer-size'
            id='input-buffer-size'>
   <desc>
    The size of the input buffer in the readers. This determines how many
    bytes to read for each chunk.
   </desc>
   <type>java.lang.Integer</type>
   <access general='read-write'/>
   <since value='&ParserName; 2.1.0'/>
   <note>
    Some tests indicate that a bigger buffer size can improve the parsing
    performance for relatively large files. The default buffer size
    in Xerces is 2K. This would give a good performance for small documents
    (less than 10K). For documents larger than 10K, specifying the buffer
    size to 4K or 8K will significantly improve the performance. But it's not
    recommended to set it to a value larger than 16K. For really tiny
    documents (1K, for example), you can also set it to a value less than 2K,
    to get the best performance.
   </note>
   <note>
    There are some conditions where the size of the parser's internal buffers 
    may be increased beyond the size specified for the input buffer. This would 
    happen in places where the text in the document cannot be split, for
    instance if the document contains a name which is longer than the input
    buffer.
   </note>
  </property>
  <property name='http://apache.org/xml/properties/locale'
            id='locale'>
   <desc>
    The locale to use for reporting errors and warnings. When the 
    value of this property is null the platform default returned 
    from java.util.Locale.getDefault() will be used.
   </desc>
   <type>java.util.Locale</type>
   <access general='read-write'/>
   <since value='&ParserName; 2.10.0'/>
   <note>
    If no messages are available for the specified locale the
    platform default will be used. If the platform default is
    not English and no messages are available for this locale
    then messages will be reported in English.
   </note>
  </property>
  <property name='http://apache.org/xml/properties/security-manager'
            id='security-manager'>
   <desc>
    It is possible to create XML documents whose processing could
    result in the use of all system resources.  This property enables
    Xerces to detect such documents, and abort their processing.
   </desc>
   <type>org.apache.xerces.util.SecurityManager</type>
   <access general='read-write'/>
   <since value='&ParserName; 2.3.0'/>
   <note>
    The <code>org.apache.xerces.util.SecurityManager</code> class
    contains a number of methods that allow applications to tailor Xerces's 
    tolerance of document constructs that could result in the heavy
    consumption of system resources (see the javadoc of this class for
    details).  Default values that should be appropriate for many
    environments are provided when the class is instantiated.  <strong>Xerces will not
    behave in a strictly spec-compliant way when this property is set</strong>.
    By default, this property is not set; Xerces's behaviour is therefore strictly 
    spec-compliant by default.
   </note>
  </property>
 </pcategory>
 <pcategory name='DOM Properties'>
  <property name='http://apache.org/xml/properties/dom/current-element-node'
            id='dom.current-element-node'>
   <desc>The current DOM element node while parsing.</desc>
   <type>org.w3c.dom.Element</type>
   <access general='read-only'/>
   <note>
    This property is useful for determining the location with a DOM
    document when an error occurs.
   </note>
  </property>
  <property name='http://apache.org/xml/properties/dom/document-class-name'
            id='dom.document-class-name'>
   <desc>
    The fully qualified name of the class implementing 
    the <code>org.w3c.dom.Document</code> interface. The
    implementation used must have a zero argument constructor.  
   </desc>
   <type>java.lang.String</type>
   <default value='"org.apache.xerces.dom.DocumentImpl"'/>
   <access general='read-write'/>
   <note>
    When the document class name is set to a value other than the 
    name of the default document factory, the deferred node expansion 
    feature does not work.   
   </note>
  </property>
 </pcategory>
 <pcategory name='SAX Properties'>
  <property name='http://xml.org/sax/properties/declaration-handler'
            id='declaration-handler'>
   <desc>Set the handler for DTD declarations.</desc>
   <type>org.xml.sax.ext.DeclHandler</type>
   <access general='read-write'/>
  </property>
  <property name='http://xml.org/sax/properties/lexical-handler'
            id='lexical-handler'>
   <desc>Set the handler for lexical parsing events.</desc>
   <type>org.xml.sax.ext.LexicalHandler</type>
   <access general='read-write'/>
  </property>
  <property name='http://xml.org/sax/properties/dom-node'
            id='dom-node'>
   <desc>
    The DOM node currently being visited, if SAX is being used as
    a DOM iterator. If the parser recognizes and supports this 
    property but is not currently visiting a DOM node, it should 
    return null.  
   </desc>
   <type>org.w3c.dom.Node</type>
   <access parsing='read-only' not-parsing='read-write'/>
   <note>
    This property is only for SAX parser implementations used as
    DOM tree walkers. Currently, Xerces does not have this
    functionality.
   </note>
  </property>
  <property name='http://xml.org/sax/properties/document-xml-version'
            id='document-xml-version'>
   <desc>
    A literal string describing the actual XML version 
    of the document, such as "1.0" or "1.1".
   </desc>
   <type>java.lang.String</type>
   <access general='read-only'/>
   <since value='&ParserName; 2.7.0'/>
   <note>
    This property may only be examined during a parse after the
    startDocument callback has been completed.
   </note>
  </property>
 </pcategory>
</properties>