svn commit: r1309011 - /cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
Author: thorsten
Date: Tue Apr  3 16:10:24 2012
New Revision: 1309011

URL: http://svn.apache.org/viewvc?rev=1309011&view=rev
Log:
Reverting partly the fix since it seems that the setup is called more the once and the last call from the sitemap always results that parseXml is null

Modified:
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java

Modified: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java?rev=1309011&r1=1309010&r2=1309011&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java Tue Apr  3 16:10:24 2012
@@ -827,8 +827,11 @@ public class I18nTransformer extends Abs
 
     @Override
     public void setup(final Map<String, Object> parameters) {
-        // If we do not have parameters we will not go on
-        if (parameters == null) {
+        /* 
+         * If we do not have parameters we will not go on 
+         * If we do not have a bundle we cannot proceed
+         */
+        if (parameters == null||!parameters.containsKey(PARAM_BUNDLE)) {
             return;
         }
         
@@ -841,10 +844,6 @@ public class I18nTransformer extends Abs
                     ? (String) parameters.get(PARAM_PARSE_NAMESPACE)
                     : "http://www.w3.org/1999/xhtml";
         }
-        // If we do not have a bundle we cannot proceed
-        if (!parameters.containsKey(PARAM_BUNDLE)) {
-            return;
-        }
         final String encoding = (String) (parameters.containsKey(PARAM_ENCODING)
                 ? parameters.get(PARAM_ENCODING) : DEFAULT_ENCODING);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.