< prev index next >
jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
*/
/*
* 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.
--- 1,7 ----
/*
! * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
*/
/*
* 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.
*** 504,514 ****
XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
EXTERNAL_GENERAL_ENTITIES,
EXTERNAL_PARAMETER_ENTITIES,
PARSER_SETTINGS,
XMLConstants.FEATURE_SECURE_PROCESSING,
! XMLConstants.USE_CATALOG
};
addRecognizedFeatures(recognizedFeatures);
// set state for default features
fFeatures.put(VALIDATION, Boolean.FALSE);
fFeatures.put(NAMESPACES, Boolean.TRUE);
--- 504,515 ----
XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
EXTERNAL_GENERAL_ENTITIES,
EXTERNAL_PARAMETER_ENTITIES,
PARSER_SETTINGS,
XMLConstants.FEATURE_SECURE_PROCESSING,
! XMLConstants.USE_CATALOG,
! JdkXmlUtils.RESET_SYMBOL_TABLE
};
addRecognizedFeatures(recognizedFeatures);
// set state for default features
fFeatures.put(VALIDATION, Boolean.FALSE);
fFeatures.put(NAMESPACES, Boolean.TRUE);
*** 530,539 ****
--- 531,541 ----
fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE);
fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE);
fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
+ fFeatures.put(JdkXmlUtils.RESET_SYMBOL_TABLE, JdkXmlUtils.RESET_SYMBOL_TABLE_DEFAULT);
// add default recognized properties
final String[] recognizedProperties =
{
SYMBOL_TABLE,
*** 1583,1597 ****
}
}
/**
! * Reset the symbol table if it wasn't provided during construction
! * and its not the first time when parse is called after initialization
*/
private void resetSymbolTable() {
! if (!fSymbolTableProvided) {
if (fSymbolTableJustInitialized) {
// Skip symbol table reallocation for the first parsing process
fSymbolTableJustInitialized = false;
} else {
fSymbolTable = new SymbolTable();
--- 1585,1600 ----
}
}
/**
! * Reset the symbol table if it wasn't provided during construction,
! * its not the first time when parse is called after initialization
! * and RESET_SYMBOL_TABLE feature is set to true
*/
private void resetSymbolTable() {
! if (fFeatures.get(JdkXmlUtils.RESET_SYMBOL_TABLE) && !fSymbolTableProvided) {
if (fSymbolTableJustInitialized) {
// Skip symbol table reallocation for the first parsing process
fSymbolTableJustInitialized = false;
} else {
fSymbolTable = new SymbolTable();
< prev index next >