sboag       01/05/15 10:55:33

  Modified:    java/src/org/apache/xml/dtm Tag: DTM_EXP
                        DTMManagerDefault.java
  Log:
  Check for return of doParse to see if it's an exception, and, if it is
  call clearCoRoutine and throw the exception.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +15 -1     
xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMManagerDefault.java
  
  Index: DTMManagerDefault.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMManagerDefault.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- DTMManagerDefault.java    2001/05/15 16:59:37     1.1.2.9
  +++ DTMManagerDefault.java    2001/05/15 17:55:26     1.1.2.10
  @@ -217,8 +217,13 @@
           {
             // This is a strange way to start the parse.
             Object gotMore = coParser.doParse(xmlSource, appCoroutine);
  -          if (gotMore != Boolean.TRUE)
  +          if( gotMore instanceof Exception)
             {
  +            dtm.clearCoRoutine();
  +            throw ((Exception)gotMore);
  +          }
  +          else if (gotMore != Boolean.TRUE)
  +          {
         
               dtm.clearCoRoutine();
             }
  @@ -310,6 +315,15 @@
         {
           reader.setFeature("http://xml.org/sax/features/namespace-prefixes";,
                             true);
  +      }
  +      catch (org.xml.sax.SAXException se)
  +      {
  +
  +        // What can we do?
  +        // TODO: User diagnostics.
  +      }
  +      try
  +      {
           
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
                             true);
         }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to