cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r907777 - /cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/neko/NekoGenerator.java
Date Mon, 08 Feb 2010 20:14:07 GMT
Author: simonetripodi
Date: Mon Feb  8 20:14:06 2010
New Revision: 907777

URL: http://svn.apache.org/viewvc?rev=907777&view=rev
Log:
optimized URIs constants

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=907777&r1=907776&r2=907777&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
Mon Feb  8 20:14:06 2010
@@ -31,6 +31,18 @@
 
 public class NekoGenerator extends AbstractSAXGenerator {
 
+    private 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";
+
+    private 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";
+
+    private static final String NAMESPACES_URI = "http://cyberneko.org/html/properties/namespaces-uri";
+
+    private static final String XHTML_URL = "http://www.w3.org/1999/xhtml";
+
     private URL htmlSource;
 
     private SAXParser saxParser;
@@ -74,12 +86,11 @@
 
         this.saxParser = new SAXParser();
         try {
-            this.saxParser.setFeature("http://cyberneko.org/html/features/balance-tags",
true);
-            this.saxParser.setProperty("http://cyberneko.org/html/properties/names/elems",
"lower");
-            this.saxParser.setFeature("http://cyberneko.org/html/features/override-namespaces",
true);
-            this.saxParser.setFeature("http://cyberneko.org/html/features/insert-namespaces",
true);
-            this.saxParser.setProperty("http://cyberneko.org/html/properties/namespaces-uri",
-                    "http://www.w3.org/1999/xhtml");
+            this.saxParser.setFeature(BALANCE_TAGS_URI, true);
+            this.saxParser.setProperty(ELEMS_URI, "lower");
+            this.saxParser.setFeature(OVERRIDE_NAMESPACES_URI, true);
+            this.saxParser.setFeature(INSERT_NAMESPACES_URI, true);
+            this.saxParser.setProperty(NAMESPACES_URI, XHTML_URL);
         } catch (SAXNotRecognizedException e) {
             throw new SetupException("Impossible to set property to HTML Parser", e);
         } catch (SAXNotSupportedException e) {



Mime
View raw message