You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2002/01/21 21:17:09 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/parsers SAXParser.java StandardParserConfiguration.java
elena 02/01/21 12:17:08
Modified: java/src/org/apache/xerces/parsers SAXParser.java
StandardParserConfiguration.java
Log:
Predefined entities should be reported via startEntity in SAX by default.
In DOM predefined entities are expanded by XML processor.
Revision Changes Path
1.29 +14 -1 xml-xerces/java/src/org/apache/xerces/parsers/SAXParser.java
Index: SAXParser.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/SAXParser.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- SAXParser.java 17 Jan 2002 23:54:58 -0000 1.28
+++ SAXParser.java 21 Jan 2002 20:17:08 -0000 1.29
@@ -58,6 +58,7 @@
package org.apache.xerces.parsers;
import org.apache.xerces.xni.grammars.XMLGrammarPool;
+import org.apache.xerces.impl.Constants;
import org.apache.xerces.util.ObjectFactory;
import org.apache.xerces.util.SymbolTable;
import org.apache.xerces.xni.parser.XMLParserConfiguration;
@@ -70,12 +71,20 @@
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
*
- * @version $Id: SAXParser.java,v 1.28 2002/01/17 23:54:58 neilg Exp $
+ * @version $Id: SAXParser.java,v 1.29 2002/01/21 20:17:08 elena Exp $
*/
public class SAXParser
extends AbstractSAXParser {
//
+ // Constants
+ //
+
+ /** Feature identifier: notify built-in refereces. */
+ protected static final String NOTIFY_BUILTIN_REFS =
+ Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_BUILTIN_REFS_FEATURE;
+
+ //
// Constructors
//
@@ -87,6 +96,8 @@
"org.apache.xerces.xni.parser.XMLParserConfiguration",
"org.apache.xerces.parsers.StandardParserConfiguration"
));
+
+ fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);
} // <init>()
/**
@@ -101,6 +112,7 @@
*/
public SAXParser(SymbolTable symbolTable) {
super(new StandardParserConfiguration(symbolTable));
+ fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);
} // <init>(SymbolTable)
/**
@@ -109,6 +121,7 @@
*/
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
super(new StandardParserConfiguration(symbolTable, grammarPool));
+ fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);
} // <init>(SymbolTable,XMLGrammarPool)
} // class SAXParser
1.13 +2 -2 xml-xerces/java/src/org/apache/xerces/parsers/StandardParserConfiguration.java
Index: StandardParserConfiguration.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/StandardParserConfiguration.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- StandardParserConfiguration.java 17 Jan 2002 23:54:58 -0000 1.12
+++ StandardParserConfiguration.java 21 Jan 2002 20:17:08 -0000 1.13
@@ -122,7 +122,7 @@
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
*
- * @version $Id: StandardParserConfiguration.java,v 1.12 2002/01/17 23:54:58 neilg Exp $
+ * @version $Id: StandardParserConfiguration.java,v 1.13 2002/01/21 20:17:08 elena Exp $
*/
public class StandardParserConfiguration
extends BasicParserConfiguration
@@ -326,7 +326,7 @@
setFeature(ALLOW_JAVA_ENCODINGS, false);
setFeature(CONTINUE_AFTER_FATAL_ERROR, false);
setFeature(LOAD_EXTERNAL_DTD, true);
- setFeature(NOTIFY_BUILTIN_REFS, true);
+ setFeature(NOTIFY_BUILTIN_REFS, false);
setFeature(NOTIFY_CHAR_REFS, false);
// add default recognized properties
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org