cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1236943 - /cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
Date Sat, 28 Jan 2012 00:33:49 GMT
Author: thorsten
Date: Sat Jan 28 00:33:48 2012
New Revision: 1236943

URL: http://svn.apache.org/viewvc?rev=1236943&view=rev
Log:
Fixing NekoGenerator for use in the sitemap.

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=1236943&r1=1236942&r2=1236943&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
Sat Jan 28 00:33:48 2012
@@ -61,7 +61,13 @@ public class NekoGenerator extends Abstr
             .getLogger(XMLGenerator.class);
    
     public NekoGenerator() {
-        super();
+        this((URL) null);
+    }
+
+    protected SAXParser getSAXParser() {
+        if (null!=this.saxParser){
+            return this.saxParser;
+        }
         this.saxParser = new SAXParser();
         try {
             this.saxParser.setFeature(BALANCE_TAGS_URI, true);
@@ -76,17 +82,17 @@ public class NekoGenerator extends Abstr
             throw new SetupException(
                     "Property not supported by the HTML Parser", e);
         }
-
+        return this.saxParser;
     }
 
     public NekoGenerator(URL url) {
-        this();
-        this.generator = new URLGenerator(url, saxParser);
+        super();
+        this.generator = new URLGenerator(url, getSAXParser());
     }
 
     public NekoGenerator(final String xmlString) {
-        this();
-        this.generator = new StringGenerator(xmlString, saxParser);
+        super();
+        this.generator = new StringGenerator(xmlString, getSAXParser());
     }
     
     public NekoGenerator(final String xmlString, final SAXParser saxParser) {



Mime
View raw message