mrglavas 2005/05/02 14:44:18
Modified: java/src/org/apache/xerces/parsers AbstractSAXParser.java
DOMParser.java
Log:
Moving SAX support up to SAX 2.0.2.
Revision Changes Path
1.58 +12 -13
xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java
Index: AbstractSAXParser.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- AbstractSAXParser.java 1 Sep 2004 03:06:07 -0000 1.57
+++ AbstractSAXParser.java 2 May 2005 21:44:18 -0000 1.58
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@
import org.apache.xerces.xs.PSVIProvider;
import org.apache.xerces.util.EntityResolverWrapper;
import org.apache.xerces.util.EntityResolver2Wrapper;
-import org.apache.xerces.util.EntityResolver2Wrapper.EntityResolver2;
import org.apache.xerces.util.ErrorHandlerWrapper;
import org.apache.xerces.util.SAXMessageFormatter;
import org.apache.xerces.util.SymbolHash;
@@ -59,8 +58,11 @@
import org.xml.sax.SAXNotSupportedException;
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
+import org.xml.sax.ext.Attributes2;
import org.xml.sax.ext.DeclHandler;
+import org.xml.sax.ext.EntityResolver2;
import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.ext.Locator2;
import org.xml.sax.helpers.LocatorImpl;
/**
@@ -1576,8 +1578,7 @@
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the
parser.
//
- // TODO: Uncomment once SAX 2.0.2 is available. -- mrglavas
- /**if (suffixLength ==
Constants.USE_ENTITY_RESOLVER2_FEATURE.length() &&
+ if (suffixLength ==
Constants.USE_ENTITY_RESOLVER2_FEATURE.length() &&
featureId.endsWith(Constants.USE_ENTITY_RESOLVER2_FEATURE)) {
if (state != fUseEntityResolver2) {
fUseEntityResolver2 = state;
@@ -1585,7 +1586,7 @@
setEntityResolver(getEntityResolver());
}
return;
- }**/
+ }
//
// Read only features.
@@ -1757,11 +1758,10 @@
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the
parser.
//
- // TODO: Uncomment once SAX 2.0.2 is available. -- mrglavas
- /** if (suffixLength ==
Constants.USE_ENTITY_RESOLVER2_FEATURE.length() &&
+ if (suffixLength ==
Constants.USE_ENTITY_RESOLVER2_FEATURE.length() &&
featureId.endsWith(Constants.USE_ENTITY_RESOLVER2_FEATURE)) {
return fUseEntityResolver2;
- }**/
+ }
// http://xml.org/sax/features/use-attributes2
// reports whether Attributes objects passed to
startElement also implement
@@ -1774,8 +1774,7 @@
featureId.endsWith(Constants.USE_ATTRIBUTES2_FEATURE)) ||
(suffixLength == Constants.USE_LOCATOR2_FEATURE.length()
&&
featureId.endsWith(Constants.USE_LOCATOR2_FEATURE))) {
- // REVISIT: Return true once SAX 2.0.2 interfaces are
available. -- mrglavas
- return false;
+ return true;
}
@@ -2188,7 +2187,7 @@
//
protected class LocatorProxy
- implements Locator {
+ implements Locator2 {
//
// Data
@@ -2241,7 +2240,7 @@
} // class LocatorProxy
protected static final class AttributesProxy
- implements AttributeList, Attributes {
+ implements AttributeList, Attributes2 {
//
// Data
1.73 +7 -9
xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java
Index: DOMParser.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- DOMParser.java 8 Aug 2004 21:24:57 -0000 1.72
+++ DOMParser.java 2 May 2005 21:44:18 -0000 1.73
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 The Apache Software Foundation.
+ * Copyright 2000-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
import org.apache.xerces.impl.Constants;
import org.apache.xerces.util.EntityResolverWrapper;
import org.apache.xerces.util.EntityResolver2Wrapper;
-import org.apache.xerces.util.EntityResolver2Wrapper.EntityResolver2;
import org.apache.xerces.util.ErrorHandlerWrapper;
import org.apache.xerces.util.SymbolTable;
import org.apache.xerces.xni.XNIException;
@@ -40,6 +39,7 @@
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
import org.xml.sax.SAXParseException;
+import org.xml.sax.ext.EntityResolver2;
import org.xml.sax.helpers.LocatorImpl;
/**
@@ -396,15 +396,14 @@
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the parser.
//
- // TODO: Uncomment once SAX 2.0.2 is available. -- mrglavas
- /** if (featureId.equals(USE_ENTITY_RESOLVER2)) {
+ if (featureId.equals(USE_ENTITY_RESOLVER2)) {
if (state != fUseEntityResolver2) {
fUseEntityResolver2 = state;
// Refresh EntityResolver wrapper.
setEntityResolver(getEntityResolver());
}
return;
- }**/
+ }
//
// Default handling
@@ -447,10 +446,9 @@
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the parser.
//
- // TODO: Uncomment once SAX 2.0.2 is available. -- mrglavas
- /** if (featureId.equals(USE_ENTITY_RESOLVER2)) {
+ if (featureId.equals(USE_ENTITY_RESOLVER2)) {
return fUseEntityResolver2;
- }**/
+ }
//
// Default handling
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]