cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1447674 - /cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
Date Tue, 19 Feb 2013 11:12:25 GMT
Author: thorsten
Date: Tue Feb 19 11:12:24 2013
New Revision: 1447674

URL: http://svn.apache.org/r1447674
Log:
COCOON3-120
Making nekoGenerator configurable. You can now inject the default encoding via spring like:
  <bean name="generator:html" class="org.apache.cocoon.optional.pipeline.components.sax.neko.NekoGenerator"
scope="prototype" >
    <property name="defaultEncoding" value="UTF-8"/>
  </bean>


Modified:
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java?rev=1447674&r1=1447673&r2=1447674&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
Tue Feb 19 11:12:24 2013
@@ -107,6 +107,10 @@ public class NekoGenerator extends Abstr
         this.generator.execute();
     }
 
+    public void setDefaultEncoding(String encoding) throws SAXNotRecognizedException, SAXNotSupportedException{
+        this.saxParser.setProperty(DEFAULT_ENCODING, encoding);
+    }
+
     @Override
     public void setConfiguration(Map<String, ? extends Object> configuration) {
         ((URLGenerator) this.generator).setSource((URL) configuration



Mime
View raw message