mirror of https://github.com/apache/poi.git
do not fail if xslt transformer does not support accessExternalStylesheet attribute
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cba63eda75
commit
9b60986f68
|
@ -221,7 +221,7 @@ public final class XMLHelper {
|
||||||
TransformerFactory factory = TransformerFactory.newInstance();
|
TransformerFactory factory = TransformerFactory.newInstance();
|
||||||
trySet(factory::setFeature, FEATURE_SECURE_PROCESSING, true);
|
trySet(factory::setFeature, FEATURE_SECURE_PROCESSING, true);
|
||||||
quietSet(factory::setAttribute, ACCESS_EXTERNAL_DTD, "");
|
quietSet(factory::setAttribute, ACCESS_EXTERNAL_DTD, "");
|
||||||
trySet(factory::setAttribute, ACCESS_EXTERNAL_STYLESHEET, "");
|
quietSet(factory::setAttribute, ACCESS_EXTERNAL_STYLESHEET, "");
|
||||||
quietSet(factory::setAttribute, ACCESS_EXTERNAL_SCHEMA, "");
|
quietSet(factory::setAttribute, ACCESS_EXTERNAL_SCHEMA, "");
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
@ -239,9 +239,9 @@ public final class XMLHelper {
|
||||||
public static SchemaFactory getSchemaFactory() {
|
public static SchemaFactory getSchemaFactory() {
|
||||||
SchemaFactory factory = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
|
SchemaFactory factory = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
|
||||||
trySet(factory::setFeature, FEATURE_SECURE_PROCESSING, true);
|
trySet(factory::setFeature, FEATURE_SECURE_PROCESSING, true);
|
||||||
trySet(factory::setProperty, ACCESS_EXTERNAL_DTD, "");
|
quietSet(factory::setProperty, ACCESS_EXTERNAL_DTD, "");
|
||||||
trySet(factory::setProperty, ACCESS_EXTERNAL_STYLESHEET, "");
|
quietSet(factory::setProperty, ACCESS_EXTERNAL_STYLESHEET, "");
|
||||||
trySet(factory::setProperty, ACCESS_EXTERNAL_SCHEMA, "");
|
quietSet(factory::setProperty, ACCESS_EXTERNAL_SCHEMA, "");
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue