You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jk...@apache.org on 2002/04/18 22:55:11 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/dtm/ref/xni2dtm XNI2DTM.java
jkesselm 02/04/18 13:55:11
Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3
DTMManagerDefault.java
java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3
XNI2DTM.java
Log:
Minor polishing, disabling debugging dump.
We currently pass most of Smoketest with the new XNI code enabled.
Some suspicious stuff in the API tests; my attempts to disentangle
the XNI and SAX support may not have been 100% succesful.
Revision Changes Path
No revision
No revision
1.41.2.3 +4 -42 xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java
Index: DTMManagerDefault.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java,v
retrieving revision 1.41.2.2
retrieving revision 1.41.2.3
diff -u -r1.41.2.2 -r1.41.2.3
--- DTMManagerDefault.java 18 Apr 2002 19:31:20 -0000 1.41.2.2
+++ DTMManagerDefault.java 18 Apr 2002 20:55:11 -0000 1.41.2.3
@@ -121,14 +121,6 @@
* */
public class DTMManagerDefault extends DTMManager
{
- /** TEMPORARY EXPERIMENTAL: If true, enable Joe's kluge to drag in the
- * XNI2DTM/XPath2 support. This may be a sloppy solution, mostly because
- * our getDTM() method is unnecessarily convoluted and needs to be
- * rationalized. There's also the problem that XNI2DTM requires Xerces2
- * in order to compile... so we may want reflection here. GRUMP!
- * */
- private static final boolean JKESS_XNI_EXPERIMENT=true;
-
/** Set this to true if you want a dump of the DTM after creation. */
private static final boolean DUMPTREE = false;
@@ -366,10 +358,9 @@
xmlSource.setSystemId(urlOfSource);
} // urlOfSource fixup
- // GONK -- Need a better test for whether Xerces2 is available
+ // %REVIEW% Need a better test for whether Xerces2 is available
// This one involves creating a SAX reader, then discarding
// it in order to build a lower-level XNI reader. Wasteful.
- // %REVIEW%
if(reader.getClass().getName().equals("org.apache.xerces.parsers.SAXParser"))
{
DTM dtm = new XNI2DTM(this, source, documentID, whiteSpaceFilter,
@@ -449,19 +440,8 @@
xmlSource.setSystemId(urlOfSource);
}
- /**************************************************************/
- // EXPERIMENTAL 3/22/02
- if(JKESS_XNI_EXPERIMENT && m_incremental)
- {
- dtm = new XNI2DTM(this, source, documentID, whiteSpaceFilter,
- xstringFactory, doIndexing);
- }
- else // Create the basic SAX2DTM.
- /**************************************************************/
- {
- dtm = new SAX2DTM(this, source, documentID, whiteSpaceFilter,
+ dtm = new SAX2DTM(this, source, documentID, whiteSpaceFilter,
xstringFactory, doIndexing);
- }
// Add the DTM to the lookup table with offset 0 (start of new DTM).
// This needs to be done before any parsing occurs.
@@ -508,26 +488,8 @@
}
-
- /**************************************************************/
- // EXPERIMENTAL 3/22/02
- if(JKESS_XNI_EXPERIMENT && m_incremental &
- dtm instanceof XNI2DTM &&
- coParser instanceof IncrementalSAXSource_Xerces)
- {
- org.apache.xerces.xni.parser.XMLPullParserConfiguration xpc=
- ((IncrementalSAXSource_Xerces)coParser).getXNIParserConfiguration();
- if(xpc!=null)
- // Bypass SAX; listen to the XNI stream
- ((XNI2DTM)dtm).setIncrementalXNISource(xpc);
- else
- // Listen to the SAX stream (will fail, diagnostically...)
- dtm.setIncrementalSAXSource(coParser);
- } else
- /***************************************************************/
-
- // Have the DTM set itself up as the IncrementalSAXSource's listener.
- dtm.setIncrementalSAXSource(coParser);
+ // Have the DTM set itself up as the IncrementalSAXSource's listener.
+ dtm.setIncrementalSAXSource(coParser);
if (null == xmlSource)
{
No revision
No revision
1.2.2.2 +1 -1 xml-xalan/java/src/org/apache/xml/dtm/ref/xni2dtm/Attic/XNI2DTM.java
Index: XNI2DTM.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/xni2dtm/Attic/XNI2DTM.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- XNI2DTM.java 12 Apr 2002 19:31:46 -0000 1.2.2.1
+++ XNI2DTM.java 18 Apr 2002 20:55:11 -0000 1.2.2.2
@@ -119,7 +119,7 @@
implements XMLDocumentHandler, XMLErrorHandler, XMLDTDHandler
{
/** DEBUGGING FLAG: Set true to monitor XNI events and similar diagnostic info. */
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
/** %OPT% %REVIEW% PROTOTYPE: Schema Type information, datatype as declared.
* See discussion in addNode
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org