jdk.xml.enableExtensionFunctions Java System Property accepts a boolean value (true or false)jdk.xml.enableExtensionFunctions Explaineddetermines whether XSLT and XPath extension functions are allowed
When the jdk.xml.enableExtensionFunctions property is true, XPath extension functions are allowed. When jdk.xml.enableExtensionFunctions is false XPath extension functions are disallowed.
Here are some other XML java system properties:
java.xml.config.filejavax.xml.accessExternalDTDjdk.xml.elementAttributeLimitjdk.xml.entityExpansionLimitjdk.xml.maxXMLNameLimitjaxp.propertiesThe jdk.xml.enableExtensionFunctions can be specified in the jaxp.properties file, typically located in jvm's conf/jaxp.properties of your JVM. You can
also create your own jaxp.properties file which can be set via the java.xml.config.file java system property.
Java has supported the jdk.xml.enableExtensionFunctions system property since version 7u60.
jdk.xml.enableExtensionFunctions on StartupYou can set the jdk.xml.enableExtensionFunctions java system property during startup of the java runtime using the -D command line argument:
java -Djdk.xml.enableExtensionFunctions=false MyAppMain
You may also be able to specify jdk.xml.enableExtensionFunctions via the JAVA_TOOL_OPTIONS environment variable:
JAVA_TOOL_OPTIONS=-Djdk.xml.enableExtensionFunctions=false
jdk.xml.enableExtensionFunctions at RuntimeYou can set jdk.xml.enableExtensionFunctions at runtime with the following Java code:
System.setProperty("jdk.xml.enableExtensionFunctions", "false");
WARNING: Depending on the property and JVM version using
setPropertymay or may not work if the JDK Java class that uses this variable has already been loaded. The value of the jdk.xml.enableExtensionFunctions system property may be cached within an internal private static variable of the implementing class.
To read the value of jdk.xml.enableExtensionFunctions at runtime, you can use this Java code:
String propertyValue = System.getProperty("jdk.xml.enableExtensionFunctions");
if (propertyValue != null) {
System.out.println("jdk.xml.enableExtensionFunctions = " + propertyValue);
} else {
System.out.println("jdk.xml.enableExtensionFunctions was null");
}