You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/12/28 06:16:56 UTC

[royale-compiler] branch develop updated (39c4c1c -> f242cd0)

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from 39c4c1c  output xmlliteral in tdf menubarexample correctly
     new 3b869da  browser DOMParser doesn't like empty nodes
     new f242cd0  change output to exclude empty nodes since XMLList is expecting to add those nodes itself

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../compiler/internal/codegen/js/jx/LiteralContainerEmitter.java  | 8 ++++++++
 1 file changed, 8 insertions(+)


[royale-compiler] 02/02: change output to exclude empty nodes since XMLList is expecting to add those nodes itself

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit f242cd0b7acf7939a9b124c6466e7b9467ee7a64
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Dec 27 22:16:44 2018 -0800

    change output to exclude empty nodes since XMLList is expecting to add those nodes itself
---
 .../compiler/internal/codegen/js/jx/LiteralContainerEmitter.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
index ac0a3fa..c42c211 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
@@ -89,10 +89,14 @@ public class LiteralContainerEmitter extends JSSubEmitter implements
             		value = value.replace("\"", "\\\"");
             		value = value.replace("\r", "");
             		value = value.replace("\n", "\\n");
+            		// skip the wrapping empty nodes.  XMLList
+            		// is expecting illegal xml (a sequence of children nodes
+            		// and will wrap it
+            		// in containing nodes
             		if (value.contentEquals("<>"))
-            			value = "<domparserdoesntlikeemptynodes>";
+            			continue;
             		else if (value.contentEquals("</>"))
-            			value = "</domparserdoesntlikeemptynodes>";
+            			continue;
             		write(value);
             	}
             }


[royale-compiler] 01/02: browser DOMParser doesn't like empty nodes

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 3b869da17059654536d6e1a928e19cfa4b20c331
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Dec 27 21:09:19 2018 -0800

    browser DOMParser doesn't like empty nodes
---
 .../compiler/internal/codegen/js/jx/LiteralContainerEmitter.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
index 5e07fa1..ac0a3fa 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java
@@ -89,6 +89,10 @@ public class LiteralContainerEmitter extends JSSubEmitter implements
             		value = value.replace("\"", "\\\"");
             		value = value.replace("\r", "");
             		value = value.replace("\n", "\\n");
+            		if (value.contentEquals("<>"))
+            			value = "<domparserdoesntlikeemptynodes>";
+            		else if (value.contentEquals("</>"))
+            			value = "</domparserdoesntlikeemptynodes>";
             		write(value);
             	}
             }