}
// secure processing?
else if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if ((_isSecureMode) && (!value)) {
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_SECUREPROCESSING_FEATURE);
throw new TransformerConfigurationException(err.toString());
}
_isNotSecureProcessing = !value;
_xmlSecurityManager.setSecureProcessing(value);
// set external access restriction when FSP is explicitly set
if (value && XalanConstants.IS_JDK8_OR_ABOVE) {
_xmlSecurityPropertyMgr.setValue(Property.ACCESS_EXTERNAL_DTD,
State.FSP, XalanConstants.EXTERNAL_ACCESS_DEFAULT_FSP);
_xmlSecurityPropertyMgr.setValue(Property.ACCESS_EXTERNAL_STYLESHEET,
State.FSP, XalanConstants.EXTERNAL_ACCESS_DEFAULT_FSP);
_accessExternalDTD = _xmlSecurityPropertyMgr.getValue(
Property.ACCESS_EXTERNAL_DTD);
_accessExternalStylesheet = _xmlSecurityPropertyMgr.getValue(
Property.ACCESS_EXTERNAL_STYLESHEET);
}
if (value && _featureManager != null) {
_featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION,
FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE);
}
return;
}
else if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
//in secure mode, let _useServicesMechanism be determined by the constructor
if (!_isSecureMode)
_useServicesMechanism = value;
}
else {
if (_featureManager != null &&
_featureManager.setValue(name, State.APIPROPERTY, value)) {
return;
}
// unknown feature
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNSUPPORTED_FEATURE, name);
throw new TransformerConfigurationException(err.toString());
}
}