sandygao 2004/07/23 15:55:21
Modified: java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
Log:
Fixing Jira bug [XERCESJ-994].
When the values for features/properties don't change between parses,
we don't bother getting those values again in "reset".
The parser has a list of external schema locations, which is cleared in "reset".
We need to re-parse the external schema location properties in "reset" to
rebuild such list, regardless of whether the values of the properties changed.
Also removing an unused variable, whose resetting algorithm looks suspecious
too.
Revision Changes Path
1.157 +7 -8
xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Index: XMLSchemaValidator.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- XMLSchemaValidator.java 23 Jul 2004 22:49:52 -0000 1.156
+++ XMLSchemaValidator.java 23 Jul 2004 22:55:21 -0000 1.157
@@ -407,16 +407,11 @@
//JAXP Schema Source property
protected Object fJaxpSchemaSource = null;
- //ResourceIdentifier for use in calling EntityResolver
- final XMLResourceIdentifierImpl fResourceIdentifier = new
XMLResourceIdentifierImpl();
-
/** Schema Grammar Description passed, to give a chance to application to
supply the Grammar */
protected final XSDDescription fXSDDescription = new XSDDescription();
protected final Hashtable fLocationPairs = new Hashtable();
-
-
// handlers
/** Document handler. */
@@ -1260,11 +1255,16 @@
if (!parser_settings){
// parser settings have not been changed
fValidationManager.addValidationState(fValidationState);
+ // Re-parse external schema location properties.
+ XMLSchemaLoader.processExternalHints(
+ fExternalSchemas,
+ fExternalNoNamespaceSchema,
+ fLocationPairs,
+ fXSIErrorReporter.fErrorReporter);
return;
}
-
// get symbol table. if it's a new one, add symbols to it.
SymbolTable symbolTable = (SymbolTable)
componentManager.getProperty(SYMBOL_TABLE);
if (symbolTable != fSymbolTable) {
@@ -1358,7 +1358,6 @@
fJaxpSchemaSource = null;
}
- fResourceIdentifier.clear();
// clear grammars, and put the one for schema namespace there
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]