jkesselm 02/04/29 09:07:40
Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3
DTMManagerDefault.java
IncrementalSAXSource_Xerces.java
Log:
Easy enable/disable of XNI support for testing purposes,
and some error-reporting cleanup. We still fail a few API tests
in XNI mode, mostly related to error handling.
Revision Changes Path
No revision
No revision
1.41.2.4 +5 -4
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.3
retrieving revision 1.41.2.4
diff -u -r1.41.2.3 -r1.41.2.4
--- DTMManagerDefault.java 18 Apr 2002 20:55:11 -0000 1.41.2.3
+++ DTMManagerDefault.java 29 Apr 2002 16:07:40 -0000 1.41.2.4
@@ -121,6 +121,8 @@
* */
public class DTMManagerDefault extends DTMManager
{
+ static final boolean JJK_ENABLE_XNI=true;
+
/** Set this to true if you want a dump of the DTM after creation. */
private static final boolean DUMPTREE = false;
@@ -273,7 +275,6 @@
DTMWSFilter whiteSpaceFilter,
boolean incremental, boolean doIndexing)
{
-
if(DEBUG && null != source)
System.out.println("Starting "+
(unique ? "UNIQUE" : "shared")+
@@ -336,7 +337,7 @@
return dtm;
}
- if (source instanceof StreamSource)
+ if (JJK_ENABLE_XNI && source instanceof StreamSource)
{
// Try processing it as XNI first, to get PSVI information!
@@ -415,8 +416,8 @@
} // if streamsource
- // if ((source instanceof SAXSource) || (source instanceof StreamSource))
- if (source instanceof SAXSource)
+ if ((source instanceof SAXSource) || (source instanceof StreamSource))
+ // if (source instanceof SAXSource)
{
XMLReader reader;
InputSource xmlSource;
1.8.6.3 +4 -11
xml-xalan/java/src/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java
Index: IncrementalSAXSource_Xerces.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java,v
retrieving revision 1.8.6.2
retrieving revision 1.8.6.3
diff -u -r1.8.6.2 -r1.8.6.3
--- IncrementalSAXSource_Xerces.java 18 Apr 2002 19:31:20 -0000 1.8.6.2
+++ IncrementalSAXSource_Xerces.java 29 Apr 2002 16:07:40 -0000 1.8.6.3
@@ -378,22 +378,15 @@
* but as a wrapper around the Xerces XNI layer; its primary purpose
* is to simplify the logic in DTMManagerDefault.java
* */
- public void deliverAllNodes ()
+ public void deliverAllNodes () throws SAXException
{
try
{
Object
ret=(Boolean)(fConfigParse.invoke(fPullParserConfig,parmstrue));
}
- catch(IllegalAccessException e)
- {
- // %REVIEW% shouldn't happen
- e.printStackTrace();
- }
- catch(java.lang.reflect.InvocationTargetException e)
- {
- // %REVIEW% shouldn't happen
- e.printStackTrace();
- }
+ catch (Exception ex) {
+ throw new SAXException(ex);
+ }
}
// Private methods -- conveniences to hide the reflection details
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]