commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r680561 - /commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
Date Mon, 28 Jul 2008 23:22:35 GMT
Author: rahul
Date: Mon Jul 28 16:22:35 2008
New Revision: 680561

URL: http://svn.apache.org/viewvc?rev=680561&view=rev
Log:
Port r680560 from trunk.
Actions <var> and <exit> should be serialized in the Commons SCXML namespace.

Modified:
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java?rev=680561&r1=680560&r2=680561&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
Mon Jul 28 16:22:35 2008
@@ -76,6 +76,9 @@
     /** The SCXML namespace. */
     private static final String NAMESPACE_SCXML =
         "http://www.w3.org/2005/07/scxml";
+    /** The Commons SCXML namespace. */
+    private static final String NAMESPACE_COMMONS_SCXML =
+        "http://commons.apache.org/scxml";
 
     /**
      * Serialize this SCXML object (primarily for debugging).
@@ -88,6 +91,7 @@
         StringBuffer b =
             new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n").
                 append("<scxml xmlns=\"").append(NAMESPACE_SCXML).
+                append("\" xmlns:cs=\"").append(NAMESPACE_COMMONS_SCXML).
                 append("\" version=\"").append(scxml.getVersion()).
                 append("\" initial=\"").append(scxml.getInitial()).
                 append("\">\n");
@@ -412,7 +416,7 @@
         for (Action a : l) {
             if (a instanceof Var) {
                 Var v = (Var) a;
-                b.append(indent).append("<var name=\"").append(v.getName())
+                b.append(indent).append("<cs:var name=\"").append(v.getName())
                     .append("\" expr=\"")
                     .append(SCXMLHelper.escapeXML(v.getExpr()))
                     .append("\"/>\n");
@@ -446,7 +450,7 @@
                     append("\"/>\n");
             } else if (a instanceof Exit) {
                 Exit e = (Exit) a;
-                b.append(indent).append("<exit");
+                b.append(indent).append("<cs:exit");
                 String expr = SCXMLHelper.escapeXML(e.getExpr());
                 String nl = e.getNamelist();
                 if (expr != null) {



Mime
View raw message