zongaro     2003/02/03 12:48:43

  Modified:    java/src/org/apache/xpath Tag: xslt20 SourceTreeManager.java
               java/src/org/apache/xml/dtm/ref Tag: xslt20
                        DTMManagerDefault.java
               java/src/org/apache/xalan/xslt Tag: xslt20 Process.java
               java/src/org/apache/xalan/transformer Tag: xslt20
                        TrAXFilter.java TransformerIdentityImpl.java
               java/src/org/apache/xalan/processor Tag: xslt20
                        ProcessorInclude.java TransformerFactoryImpl.java
  Log:
  The behaviour of the Xerces-J parser recently changed to agree with its
  documented behaviour with respect to the dynamic validation feature.  This
  causes problems for stylesheets that contain a DTD, but are not otherwise
  "valid" - for instance, because the DTD contains ENTITY declarations, but no
  ELEMENT declarations - because error reporting is performed for documents if
  the dynamic validation feature is enabled and the document contains a DOCTYPE
  declaration.
  
  The solution is to remove code (including code that was commented out) that
  enabled the Xerces dynamic validation feature.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.30.10.2 +0 -7      
xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java
  
  Index: SourceTreeManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java,v
  retrieving revision 1.30.10.1
  retrieving revision 1.30.10.2
  diff -u -r1.30.10.1 -r1.30.10.2
  --- SourceTreeManager.java    28 Oct 2002 16:17:33 -0000      1.30.10.1
  +++ SourceTreeManager.java    3 Feb 2003 20:48:41 -0000       1.30.10.2
  @@ -432,8 +432,6 @@
         XMLReader reader = (inputSource instanceof SAXSource)
                            ? ((SAXSource) inputSource).getXMLReader() : null;
                            
  -      boolean isUserReader = (reader != null);
  -
         if (null == reader)
         {
           try {
  @@ -459,11 +457,6 @@
         {
           reader.setFeature("http://xml.org/sax/features/namespace-prefixes";,
                             true);
  -        // Commented out as per discussion with [EMAIL PROTECTED] 
  -        // about bug 2124.
  -//        if(!isUserReader)
  -//          
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -//                            true);
         }
         catch (org.xml.sax.SAXException se)
         {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.41.6.1.2.10 +0 -19     
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.6.1.2.9
  retrieving revision 1.41.6.1.2.10
  diff -u -r1.41.6.1.2.9 -r1.41.6.1.2.10
  --- DTMManagerDefault.java    30 Jan 2003 00:39:55 -0000      1.41.6.1.2.9
  +++ DTMManagerDefault.java    3 Feb 2003 20:48:42 -0000       1.41.6.1.2.10
  @@ -793,8 +793,6 @@
         XMLReader reader = (inputSource instanceof SAXSource)
                            ? ((SAXSource) inputSource).getXMLReader() : null;
   
  -      boolean isUserReader = (reader != null);
  -
         if (null == reader)
         {
           try
  @@ -834,23 +832,6 @@
           // What can we do?
           // TODO: User diagnostics.
         }
  -
  -        // Commented out as per discussion with [EMAIL PROTECTED]
  -        // about bug 2124.
  -//      if(!isUserReader)
  -//      {
  -//        try
  -//        {
  -//          
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -//                            true);
  -//        }
  -//        catch (org.xml.sax.SAXException se)
  -//        {
  -//
  -//          // What can we do?
  -//          // TODO: User diagnostics.
  -//        }
  -//      }
   
         return reader;
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.49.4.2  +0 -6      xml-xalan/java/src/org/apache/xalan/xslt/Process.java
  
  Index: Process.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/Process.java,v
  retrieving revision 1.49.4.1
  retrieving revision 1.49.4.2
  diff -u -r1.49.4.1 -r1.49.4.2
  --- Process.java      30 Jan 2003 00:40:04 -0000      1.49.4.1
  +++ Process.java      3 Feb 2003 20:48:42 -0000       1.49.4.2
  @@ -790,12 +790,6 @@
                                     true);
                 } catch (org.xml.sax.SAXException se) {}
           
  -              try
  -              {
  -                
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -                                  true);
  -              } catch (org.xml.sax.SAXException se) {}
  -              
                 th.setResult(strResult);
                 
                 // System.out.println("sending parse events to the 
handler...");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.14.2  +0 -4      
xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java
  
  Index: TrAXFilter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java,v
  retrieving revision 1.9.14.1
  retrieving revision 1.9.14.2
  diff -u -r1.9.14.1 -r1.9.14.2
  --- TrAXFilter.java   30 Jan 2003 00:39:19 -0000      1.9.14.1
  +++ TrAXFilter.java   3 Feb 2003 20:48:42 -0000       1.9.14.2
  @@ -168,10 +168,6 @@
         {
           parent.setFeature("http://xml.org/sax/features/namespace-prefixes";,
                             true);
  -        // Commented out as per discussion with [EMAIL PROTECTED] 
  -        // about bug 2124.
  -//        
parent.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -//                          true);
         }
         catch (org.xml.sax.SAXException se){}
         // setParent calls setupParse...
  
  
  
  1.18.14.2 +0 -7      
xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java
  
  Index: TransformerIdentityImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java,v
  retrieving revision 1.18.14.1
  retrieving revision 1.18.14.2
  diff -u -r1.18.14.1 -r1.18.14.2
  --- TransformerIdentityImpl.java      30 Jan 2003 00:39:19 -0000      
1.18.14.1
  +++ TransformerIdentityImpl.java      3 Feb 2003 20:48:42 -0000       
1.18.14.2
  @@ -365,8 +365,6 @@
           if (source instanceof SAXSource)
             reader = ((SAXSource) source).getXMLReader();
             
  -        boolean isUserReader = (reader != null);
  -  
           if (null == reader)
           {
     
  @@ -403,11 +401,6 @@
           {
             reader.setFeature("http://xml.org/sax/features/namespace-prefixes";,
                               true);
  -        // Commented out as per discussion with [EMAIL PROTECTED] 
  -        // about bug 2124.
  -//          if(!isUserReader)
  -//            
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -//                              true);
           }
           catch (org.xml.sax.SAXException se)
           {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.21.2.1.2.3 +0 -10     
xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java
  
  Index: ProcessorInclude.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java,v
  retrieving revision 1.21.2.1.2.2
  retrieving revision 1.21.2.1.2.3
  diff -u -r1.21.2.1.2.2 -r1.21.2.1.2.3
  --- ProcessorInclude.java     30 Jan 2003 00:39:17 -0000      1.21.2.1.2.2
  +++ ProcessorInclude.java     3 Feb 2003 20:48:43 -0000       1.21.2.1.2.3
  @@ -266,8 +266,6 @@
           reader = saxSource.getXMLReader(); // may be null
         }
         
  -      boolean isUserReader = (reader != null);
  -      
         InputSource inputSource = SAXSource.sourceToInputSource(source);
   
         if (null == reader)
  @@ -297,14 +295,6 @@
         if (null != reader)
         {
           reader.setContentHandler(handler);
  -        try
  -        {
  -          if(!isUserReader)
  -            
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -                              true);
  -        }
  -        catch(org.xml.sax.SAXException se) {}
  -        
           handler.pushBaseIndentifier(inputSource.getSystemId());
   
           try
  
  
  
  1.42.4.5  +0 -14     
xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java,v
  retrieving revision 1.42.4.4
  retrieving revision 1.42.4.5
  diff -u -r1.42.4.4 -r1.42.4.5
  --- TransformerFactoryImpl.java       30 Jan 2003 00:39:17 -0000      1.42.4.4
  +++ TransformerFactoryImpl.java       3 Feb 2003 20:48:43 -0000       1.42.4.5
  @@ -915,8 +915,6 @@
         if (source instanceof SAXSource)
           reader = ((SAXSource) source).getXMLReader();
           
  -      boolean isUserReader = (reader != null);
  -
         if (null == reader)
         {
   
  @@ -950,18 +948,6 @@
         // If you set the namespaces to true, we'll end up getting double 
         // xmlns attributes.  Needs to be fixed.  -sb
         // reader.setFeature("http://xml.org/sax/features/namespace-prefixes";, 
true);
  -      try
  -      {
  -        if(!isUserReader)
  -          
reader.setFeature("http://apache.org/xml/features/validation/dynamic";,
  -                            true);
  -      }
  -      catch (org.xml.sax.SAXException ex)
  -      {
  -
  -        // feature not recognized
  -      }
  -
         reader.setContentHandler(builder);
         reader.parse(isource);
       }
  
  
  

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

Reply via email to