mrglavas 2004/07/23 08:50:15
Modified: java/src/org/apache/xerces/parsers
XML11NonValidatingConfiguration.java
XML11DTDConfiguration.java
Log:
Allow the SAXParser to recognize these configurations as
supporting XML 1.1. Also some identation cleanup.
Revision Changes Path
1.2 +57 -57
xml-xerces/java/src/org/apache/xerces/parsers/XML11NonValidatingConfiguration.java
Index: XML11NonValidatingConfiguration.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/XML11NonValidatingConfiguration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XML11NonValidatingConfiguration.java 23 Jul 2004 15:36:57 -0000 1.1
+++ XML11NonValidatingConfiguration.java 23 Jul 2004 15:50:15 -0000 1.2
@@ -70,7 +70,7 @@
* @version $Id$
*/
public class XML11NonValidatingConfiguration extends ParserConfigurationSettings
- implements XMLPullParserConfiguration {
+ implements XMLPullParserConfiguration, XML11Configurable {
//
// Constants
@@ -80,23 +80,23 @@
// feature identifiers
- /** Feature identifier: validation. */
- protected static final String VALIDATION =
- Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
- /** Feature identifier: namespaces. */
- protected static final String NAMESPACES =
- Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
- /** Feature identifier: external general entities. */
- protected static final String EXTERNAL_GENERAL_ENTITIES =
- Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
- /** Feature identifier: external parameter entities. */
- protected static final String EXTERNAL_PARAMETER_ENTITIES =
- Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
-
+ /** Feature identifier: validation. */
+ protected static final String VALIDATION =
+ Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
+
+ /** Feature identifier: namespaces. */
+ protected static final String NAMESPACES =
+ Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
+
+ /** Feature identifier: external general entities. */
+ protected static final String EXTERNAL_GENERAL_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
+
+ /** Feature identifier: external parameter entities. */
+ protected static final String EXTERNAL_PARAMETER_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
+
+
/** Feature identifier: continue after fatal error. */
protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX +
Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
@@ -163,34 +163,34 @@
//
// Data
//
- protected SymbolTable fSymbolTable;
+ protected SymbolTable fSymbolTable;
protected XMLInputSource fInputSource;
protected ValidationManager fValidationManager;
- protected XMLVersionDetector fVersionDetector;
+ protected XMLVersionDetector fVersionDetector;
protected XMLLocator fLocator;
- protected Locale fLocale;
-
- /** XML 1.0 Components. */
- protected ArrayList fComponents;
+ protected Locale fLocale;
+
+ /** XML 1.0 Components. */
+ protected ArrayList fComponents;
+
+ /** XML 1.1. Components. */
+ protected ArrayList fXML11Components = null;
+
+ /** Common components: XMLEntityManager, XMLErrorReporter */
+ protected ArrayList fCommonComponents = null;
+
+ /** The document handler. */
+ protected XMLDocumentHandler fDocumentHandler;
+
+ /** The DTD handler. */
+ protected XMLDTDHandler fDTDHandler;
+
+ /** The DTD content model handler. */
+ protected XMLDTDContentModelHandler fDTDContentModelHandler;
+
+ /** Last component in the document pipeline */
+ protected XMLDocumentSource fLastComponent;
- /** XML 1.1. Components. */
- protected ArrayList fXML11Components = null;
-
- /** Common components: XMLEntityManager, XMLErrorReporter */
- protected ArrayList fCommonComponents = null;
-
- /** The document handler. */
- protected XMLDocumentHandler fDocumentHandler;
-
- /** The DTD handler. */
- protected XMLDTDHandler fDTDHandler;
-
- /** The DTD content model handler. */
- protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
- /** Last component in the document pipeline */
- protected XMLDocumentSource fLastComponent;
-
/**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
@@ -201,15 +201,15 @@
/** fConfigUpdated is set to true if there has been any change to the
configuration settings,
* i.e a feature or a property was changed.
*/
- protected boolean fConfigUpdated = false;
-
+ protected boolean fConfigUpdated = false;
+
//
// XML 1.0 components
//
-
+
/** The XML 1.0 Datatype validator factory. */
protected DTDDVFactory fDatatypeValidatorFactory;
-
+
/** The XML 1.0 Document scanner that does namespace binding. */
protected XMLNSDocumentScannerImpl fNamespaceScanner;
@@ -222,32 +222,32 @@
//
// XML 1.1 components
//
-
+
/** The XML 1.1 datatype factory. **/
protected DTDDVFactory fXML11DatatypeFactory = null;
-
+
/** The XML 1.1 document scanner that does namespace binding. **/
protected XML11NSDocumentScannerImpl fXML11NSDocScanner = null;
-
+
/** The XML 1.1 document scanner that does not do namespace binding. **/
protected XML11DocumentScannerImpl fXML11DocScanner = null;
-
+
/** The XML 1.1 DTD scanner. **/
protected XML11DTDScannerImpl fXML11DTDScanner = null;
-
+
//
// Common components
//
-
+
/** Grammar pool. */
protected XMLGrammarPool fGrammarPool;
-
+
/** Error reporter. */
protected XMLErrorReporter fErrorReporter;
-
+
/** Entity manager. */
protected XMLEntityManager fEntityManager;
-
+
/** Current scanner */
protected XMLDocumentScanner fCurrentScanner;
@@ -256,7 +256,7 @@
/** Current DTD scanner. */
protected XMLDTDScanner fCurrentDTDScanner;
-
+
/** Flag indiciating whether XML11 components have been initialized. */
private boolean f11Initialized = false;
1.2 +55 -55
xml-xerces/java/src/org/apache/xerces/parsers/XML11DTDConfiguration.java
Index: XML11DTDConfiguration.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/XML11DTDConfiguration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XML11DTDConfiguration.java 23 Jul 2004 15:36:57 -0000 1.1
+++ XML11DTDConfiguration.java 23 Jul 2004 15:50:15 -0000 1.2
@@ -99,7 +99,7 @@
* @version $Id$
*/
public class XML11DTDConfiguration extends ParserConfigurationSettings
- implements XMLPullParserConfiguration {
+ implements XMLPullParserConfiguration, XML11Configurable {
//
// Constants
@@ -108,27 +108,27 @@
"org.apache.xerces.impl.dv.dtd.XML11DTDDVFactoryImpl";
// feature identifiers
-
- /** Feature identifier: validation. */
- protected static final String VALIDATION =
- Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
- /** Feature identifier: namespaces. */
- protected static final String NAMESPACES =
- Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
- /** Feature identifier: external general entities. */
- protected static final String EXTERNAL_GENERAL_ENTITIES =
- Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
- /** Feature identifier: external parameter entities. */
- protected static final String EXTERNAL_PARAMETER_ENTITIES =
- Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
+
+ /** Feature identifier: validation. */
+ protected static final String VALIDATION =
+ Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
+
+ /** Feature identifier: namespaces. */
+ protected static final String NAMESPACES =
+ Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
+
+ /** Feature identifier: external general entities. */
+ protected static final String EXTERNAL_GENERAL_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
+
+ /** Feature identifier: external parameter entities. */
+ protected static final String EXTERNAL_PARAMETER_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX +
Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
+
/** Feature identifier: continue after fatal error. */
protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX +
Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
+
/** Feature identifier: load external DTD. */
protected static final String LOAD_EXTERNAL_DTD =
Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
@@ -206,34 +206,34 @@
//
// Data
//
- protected SymbolTable fSymbolTable;
+ protected SymbolTable fSymbolTable;
protected XMLInputSource fInputSource;
protected ValidationManager fValidationManager;
- protected XMLVersionDetector fVersionDetector;
+ protected XMLVersionDetector fVersionDetector;
protected XMLLocator fLocator;
- protected Locale fLocale;
-
- /** XML 1.0 Components. */
- protected ArrayList fComponents;
+ protected Locale fLocale;
+
+ /** XML 1.0 Components. */
+ protected ArrayList fComponents;
+
+ /** XML 1.1. Components. */
+ protected ArrayList fXML11Components = null;
+
+ /** Common components: XMLEntityManager, XMLErrorReporter */
+ protected ArrayList fCommonComponents = null;
+
+ /** The document handler. */
+ protected XMLDocumentHandler fDocumentHandler;
+
+ /** The DTD handler. */
+ protected XMLDTDHandler fDTDHandler;
+
+ /** The DTD content model handler. */
+ protected XMLDTDContentModelHandler fDTDContentModelHandler;
+
+ /** Last component in the document pipeline */
+ protected XMLDocumentSource fLastComponent;
- /** XML 1.1. Components. */
- protected ArrayList fXML11Components = null;
-
- /** Common components: XMLEntityManager, XMLErrorReporter */
- protected ArrayList fCommonComponents = null;
-
- /** The document handler. */
- protected XMLDocumentHandler fDocumentHandler;
-
- /** The DTD handler. */
- protected XMLDTDHandler fDTDHandler;
-
- /** The DTD content model handler. */
- protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
- /** Last component in the document pipeline */
- protected XMLDocumentSource fLastComponent;
-
/**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
@@ -245,15 +245,15 @@
* fConfigUpdated is set to true if there has been any change to the
configuration settings,
* i.e a feature or a property was changed.
*/
- protected boolean fConfigUpdated = false;
-
+ protected boolean fConfigUpdated = false;
+
//
// XML 1.0 components
//
-
+
/** The XML 1.0 Datatype validator factory. */
protected DTDDVFactory fDatatypeValidatorFactory;
-
+
/** The XML 1.0 Document scanner that does namespace binding. */
protected XMLNSDocumentScannerImpl fNamespaceScanner;
@@ -271,26 +271,26 @@
/** The XML 1.0 DTD Processor . */
protected XMLDTDProcessor fDTDProcessor;
-
+
//
// XML 1.1 components
//
-
+
/** The XML 1.1 datatype factory. **/
protected DTDDVFactory fXML11DatatypeFactory = null;
-
+
/** The XML 1.1 document scanner that does namespace binding. **/
protected XML11NSDocumentScannerImpl fXML11NSDocScanner = null;
-
+
/** The XML 1.1 document scanner that does not do namespace binding. **/
protected XML11DocumentScannerImpl fXML11DocScanner = null;
-
+
/** The XML 1.1 DTD validator that does namespace binding. **/
protected XML11NSDTDValidator fXML11NSDTDValidator = null;
-
+
/** The XML 1.1 DTD validator that does not do namespace binding. **/
protected XML11DTDValidator fXML11DTDValidator = null;
-
+
/** The XML 1.1 DTD scanner. **/
protected XML11DTDScannerImpl fXML11DTDScanner = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]