cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1203574 - /cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
Date Fri, 18 Nov 2011 10:37:06 GMT
Author: thorsten
Date: Fri Nov 18 10:37:06 2011
New Revision: 1203574

URL: http://svn.apache.org/viewvc?rev=1203574&view=rev
Log:
Extending NekoGenerator to pass specifc saxParser which allows to have your own Neko feature/properties
configuration

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=1203574&r1=1203573&r2=1203574&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
Fri Nov 18 10:37:06 2011
@@ -40,17 +40,17 @@ import org.xml.sax.SAXNotSupportedExcept
 
 public class NekoGenerator extends AbstractSAXGenerator {
 
-    private static final String BALANCE_TAGS_URI = "http://cyberneko.org/html/features/balance-tags";
+    public static final String BALANCE_TAGS_URI = "http://cyberneko.org/html/features/balance-tags";
 
-    private static final String ELEMS_URI = "http://cyberneko.org/html/properties/names/elems";
+    public static final String ELEMS_URI = "http://cyberneko.org/html/properties/names/elems";
 
-    private static final String OVERRIDE_NAMESPACES_URI = "http://cyberneko.org/html/features/override-namespaces";
+    public static final String OVERRIDE_NAMESPACES_URI = "http://cyberneko.org/html/features/override-namespaces";
 
-    private static final String INSERT_NAMESPACES_URI = "http://cyberneko.org/html/features/insert-namespaces";
+    public static final String INSERT_NAMESPACES_URI = "http://cyberneko.org/html/features/insert-namespaces";
 
-    private static final String NAMESPACES_URI = "http://cyberneko.org/html/properties/namespaces-uri";
+    public static final String NAMESPACES_URI = "http://cyberneko.org/html/properties/namespaces-uri";
 
-    private static final String XHTML_URL = "http://www.w3.org/1999/xhtml";
+    public static final String XHTML_URL = "http://www.w3.org/1999/xhtml";
 
     private transient Starter generator;
 
@@ -60,7 +60,7 @@ public class NekoGenerator extends Abstr
      */
     private static final Logger LOG = LoggerFactory
             .getLogger(XMLGenerator.class);
-
+   
     public NekoGenerator() {
         super();
         this.saxParser = new SAXParser();
@@ -89,6 +89,11 @@ public class NekoGenerator extends Abstr
         this();
         this.generator = new StringGenerator(xmlString, saxParser);
     }
+    
+    public NekoGenerator(final String xmlString, final SAXParser saxParser) {
+        this.saxParser = saxParser;
+        this.generator = new StringGenerator(xmlString, saxParser);
+    }
 
     public void execute() {
         this.generator.execute();



Mime
View raw message