cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation TraxTransformer.java
Date Tue, 17 Jul 2001 15:24:39 GMT
cziegeler    01/07/17 08:24:39

  Modified:    src/org/apache/cocoon/transformation Tag: cocoon_20_branch
                        TraxTransformer.java
  Log:
  Fixed serious bug in the TraxTransformer: The lexical handler was
  never set!
  
  Please check if this new version is working properly, so that
  we don't get any problems for the upcoming beta2.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.10 +7 -33     xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.15.2.9
  retrieving revision 1.15.2.10
  diff -u -r1.15.2.9 -r1.15.2.10
  --- TraxTransformer.java	2001/07/13 13:39:58	1.15.2.9
  +++ TraxTransformer.java	2001/07/17 15:24:33	1.15.2.10
  @@ -100,13 +100,11 @@
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
  - * @version CVS $Id: TraxTransformer.java,v 1.15.2.9 2001/07/13 13:39:58 dims Exp $
  + * @version CVS $Id: TraxTransformer.java,v 1.15.2.10 2001/07/17 15:24:33 cziegeler Exp
$
    */
  -public class TraxTransformer extends ContentHandlerWrapper
  +public class TraxTransformer extends AbstractTransformer
   implements Transformer, Composable, Recyclable, Configurable, Cacheable, Disposable, URIResolver
{
   
  -    private static final String FILE = "file:";
  -
       /** The store service instance */
       private Store store = null;
   
  @@ -412,9 +410,6 @@
   
       /**
        * Set the <code>XMLConsumer</code> that will receive XML data.
  -     * <br>
  -     * This method will simply call <code>setContentHandler(consumer)</code>
  -     * and <code>setLexicalHandler(consumer)</code>.
        */
       public void setConsumer(XMLConsumer consumer) {
   
  @@ -445,13 +440,15 @@
           }
   
           super.setContentHandler(transformerHandler);
  +        super.setLexicalHandler(transformerHandler);
  +
           if(transformerHandler instanceof Loggable) {
               ((Loggable)transformerHandler).setLogger(getLogger());
           }
           // According to TrAX specs, all TransformerHandlers are LexicalHandlers
  -        this.setLexicalHandler(transformerHandler);
  -
  -        this.setContentHandler(consumer);
  +        SAXResult result = new SAXResult(consumer);
  +        result.setLexicalHandler(consumer);
  +        transformerHandler.setResult(result);
       }
   
       private HashMap getLogicSheetParameters() {
  @@ -547,29 +544,6 @@
           }
   
           return map;
  -    }
  -
  -    /**
  -     * Set the <code>ContentHandler</code> that will receive XML data.
  -     * <br>
  -     * Subclasses may retrieve this <code>ContentHandler</code> instance
  -     * accessing the protected <code>super.contentHandler</code> field.
  -     */
  -    public void setContentHandler(ContentHandler content) {
  -        transformerHandler.setResult(new SAXResult(content));
  -    }
  -
  -    /**
  -     * Set the <code>LexicalHandler</code> that will receive XML data.
  -     * <br>
  -     * Subclasses may retrieve this <code>LexicalHandler</code> instance
  -     * accessing the protected <code>super.lexicalHandler</code> field.
  -     *
  -     * @exception IllegalStateException If the <code>LexicalHandler</code>
or
  -     *                                  the <code>XMLConsumer</code> were
  -     *                                  already set.
  -     */
  -    public void setLexicalHandler(LexicalHandler lexical) {
       }
   
       // FIXME (SM): this method may be a hotspot for requests with many
  
  
  

----------------------------------------------------------------------
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