cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gian...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/html/java/org/apache/cocoon/transformation HTMLTransformer.java
Date Tue, 22 Jul 2003 10:20:31 GMT
gianugo     2003/07/22 03:20:31

  Modified:    src/blocks/html/java/org/apache/cocoon/transformation
                        HTMLTransformer.java
  Log:
  Fix to a ClassCastException & replaced DOMStreamer with IncludeXMLConsumer
  (fixing hence a RuntimeException)
  PR: 21745
  Submitted by:	Guido Casper (g.casper@s-und-n.de)
  
  Revision  Changes    Path
  1.2       +5 -7      cocoon-2.1/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java
  
  Index: HTMLTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HTMLTransformer.java	18 Jul 2003 11:24:28 -0000	1.1
  +++ HTMLTransformer.java	22 Jul 2003 10:20:30 -0000	1.2
  @@ -68,7 +68,7 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.transformation.AbstractSAXTransformer;
   import org.apache.cocoon.xml.XMLUtils;
  -import org.apache.cocoon.xml.dom.DOMStreamer;
  +import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.excalibur.source.Source;
   import org.w3c.tidy.Tidy;
   import org.xml.sax.Attributes;
  @@ -147,8 +147,8 @@
               org.apache.excalibur.source.SourceResolver resolver = null;
               Source configSource = null;
               try {
  -                resolver =
  -                    (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
  +                resolver = (org.apache.excalibur.source.SourceResolver)
  +                           this.manager.lookup(org.apache.excalibur.source.SourceResolver.ROLE);
                   configSource = resolver.resolveURI(configUrl);
                   if (getLogger().isDebugEnabled()) {
                       getLogger().debug(
  @@ -214,12 +214,10 @@
                   getLogger().warn(stringWriter.toString());
               }
   
  -            DOMStreamer streamer =
  -                new DOMStreamer(this.contentHandler, this.lexicalHandler);
  -            streamer.stream(doc);
  +            IncludeXMLConsumer.includeNode(doc, this.contentHandler, this.lexicalHandler);
           } catch (Exception e) {
               throw new ProcessingException(
  -                "Exception in NormalizerTransformer.normalize()",
  +                "Exception in HTMLTransformer.normalize()",
                   e);
           }
       }
  
  
  

Mime
View raw message