cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation XIncludeTransformer.java
Date Mon, 17 Sep 2001 11:03:13 GMT
dims        01/09/17 04:03:13

  Modified:    src/org/apache/cocoon/transformation
                        XIncludeTransformer.java
  Log:
  Possible patch for XIncludeTransformer Bug #3646. Am resetting all the variables in the
recycle() method now.
  
  Revision  Changes    Path
  1.13      +14 -12    xml-cocoon2/src/org/apache/cocoon/transformation/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/XIncludeTransformer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XIncludeTransformer.java	2001/08/20 13:55:17	1.12
  +++ XIncludeTransformer.java	2001/09/17 11:03:13	1.13
  @@ -49,7 +49,7 @@
    * by the SAX event FSM yet.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.12 $ $Date: 2001/08/20 13:55:17 $ $Author: dims $
  + * @version CVS $Revision: 1.13 $ $Date: 2001/09/17 11:03:13 $ $Author: dims $
    */
   public class XIncludeTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable {
   
  @@ -86,17 +86,6 @@
       public void setup(SourceResolver resolver, Map objectModel,
                         String source, Parameters parameters)
               throws ProcessingException, SAXException, IOException {}
  -    /*
  -        try {
  -            getLogger().debug("SOURCE: "+source);
  -            base_xmlbase_uri = urlFactory.getURL(source);
  -            getLogger().debug("SOURCE URI: "+base_xmlbase_uri.toString());
  -        } catch (MalformedURLException e) {
  -            getLogger().debug("XincludeTransformer", e);
  -            throw new ProcessingException(e.getMessage(), e);
  -        }
  -    }
  -    */
   
       public void compose(ComponentManager manager) {
           this.manager = manager;
  @@ -306,6 +295,19 @@
                   if(parser != null) this.manager.release(parser);
               }
           }
  +    }
  +
  +    public void recycle()
  +    {
  +        // Reset all variables to initial state.
  +        base_xmlbase_uri = null;
  +        current_xmlbase_uri = null;
  +        xmlbase_stack = new Stack();
  +        last_xmlbase_element_uri = "";
  +        xmlbase_element_uri_stack = new Stack();
  +        last_xmlbase_element_name = "";
  +        xmlbase_element_name_stack = new Stack();
  +        super.recycle();
       }
   
       public void dispose()
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message