forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r725650 - /forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Date Thu, 11 Dec 2008 10:44:34 GMT
Author: thorsten
Date: Thu Dec 11 02:44:33 2008
New Revision: 725650

URL: http://svn.apache.org/viewvc?rev=725650&view=rev
Log:
Using the config to determine whether we are allowed to parse properties

Modified:
    forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=725650&r1=725649&r2=725650&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
(original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Thu Dec 11 02:44:33 2008
@@ -237,8 +237,6 @@
 
   private HashMap<String, Object> localParams;
 
-  private boolean allowXml;
-
   private String currentProperty;
 
   private InputStream dataStream;
@@ -259,7 +257,7 @@
     config = new WritableDispatcherBean();
     config.setStaxHelper(new StAX());
     // are we allowing xml properties?
-    allowXml = configuration.getChild("allowXml").getValueAsBoolean(false);
+    boolean allowXml = configuration.getChild("allowXml").getValueAsBoolean(false);
     config.setAllowXmlProperties(allowXml);
     // set the prefix for the contract resolving
     contractUriPrefix = configuration.getChild("contractUriPrefix").getValue(
@@ -401,9 +399,7 @@
     } else if (Captions.NS.equals(uri)) {
       // we are in the dispatcher ns
       try {
-        /*
-         * We are in the dispatcher ns.
-         */
+        // We are in the dispatcher ns.
         getLogger().debug("Starting dispatcher element: " + raw);
         if (Captions.STRUCTURE_ELEMENT.equals(name)) {
           // we are in a structurer definition
@@ -458,7 +454,7 @@
           contractProcessingEnd();
         } else if (Captions.PROPERTY_ELEMENT.equals(name) && this.includeNodes) {
           // we are inside a property end element
-          if (allowXml) {
+          if (config.isAllowXmlProperties()) {
             String property = null;
             try {
               //XMLizable endSAXRecording = super.endSAXRecording();
@@ -692,7 +688,7 @@
     }
     currentProperty = id;
     // if we allow xml properties we will just record them
-    if (allowXml) {
+    if (config.isAllowXmlProperties()) {
    // just start the recording
       prefixString = "<"+raw+attributesString+">";
       startSerializedXMLRecording((XMLUtils.createPropertiesForXML(true)));



Mime
View raw message