Documentation

Processing Limit Definitions
Trail: Java API for XML Processing (JAXP)
Lesson: Processing Limits

Processing Limit Definitions

The following list describes the JAXP XML Processing Limits supported in the JDK. These limits can be specified through the Factory APIs, System Properties, and/or the jaxp.properties file.

entityExpansionLimit

Name: http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit
Definition: Limit the number of entity expansions.
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 64,000. This is the current limit.
System property: jdk.xml.entityExpansionLimit. The entityExpansionLimit is also supported for backward compatibility. Using jdk.xml.entityExpansionLimit is recommended.

elementAttributeLimit

Name: http://www.oracle.com/xml/jaxp/properties/elementAttributeLimit
Definition: Limit the number of attributes an element can have.
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 10,000
System property: jdk.xml.elementAttributeLimit. The elementAttributeLimit is also supported for backward compatibility. Using jdk.xml.elementAttributeLimit is recommended.

maxOccurLimit

Name: http://www.oracle.com/xml/jaxp/properties/maxOccurLimit
Definition: Limit the number of content model nodes that may be created when building a grammar for a W3C XML Schema that contains maxOccurs attributes with values other than "unbounded".
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 5000
System property: jdk.xml.maxOccurLimit. The maxOccurLimit is also supported for backward compatibility. Using jdk.xml.maxOccurLimit is recommened.

totalEntitySizeLimit

Name: http://www.oracle.com/xml/jaxp/properties/totalEntitySizeLimit
Definition: Limit the total size of all entities that include general and parameter entities. The size is calculated as an aggregation of all entities.
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 5x10^7
System property: jdk.xml.totalEntitySizeLimit

maxGeneralEntitySizeLimit

Name: http://www.oracle.com/xml/jaxp/properties/maxGeneralEntitySizeLimit
Definition: Limit the maximum size of any general entities. It is recommended that users set the limit to the smallest possible number so that malformed xml files can be caught quickly.
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 0, no limit.
System property: jdk.xml.maxGeneralEntitySizeLimit

maxParameterEntitySizeLimit

Name: http://www.oracle.com/xml/jaxp/properties/maxParameterEntitySizeLimit
Definition: Limit the maximum size of any parameter entities, including the result of nesting multiple parameter entities. It is recommended that users set the limit to the smallest possible number so that malformed xml files can be caught quickly.
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 1,000,000.
System property: jdk.xml.maxParameterEntitySizeLimit

maxElementDepth

Name: http://java.sun.com/xml/jaxp/properties/maxElementDepth
Definition: Limit the maximum element depth
Value: A positive integer. 0 is treated as no limit. Negative numbers are treated as 0.
Default value: 0
System property: jdk.xml.maxElementDepth

{java.home}/lib/jaxp.properties

The system properties can be specified in the jaxp.properties file to define the behavior for all invocations of the JDK or JRE. The format is system-property-name=value. For example:

jdk.xml.maxGeneralEntitySizeLimit=1024

Previous page: Processing Limits
Next page: Scope and Order