You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2024/06/10 10:06:59 UTC

(royale-asjs) branch develop updated: Fixed attribute name

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new cb8e39352b Fixed attribute name
cb8e39352b is described below

commit cb8e39352b0be402a512b94c71f477f64aa79cb3
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jun 10 13:06:53 2024 +0300

    Fixed attribute name
---
 frameworks/projects/XML/src/main/royale/XML.as | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index 500e53203c..f0910bd2ed 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -3220,10 +3220,15 @@ package
 			var str:String = name.toString();
 			if(parseInt(str,10).toString() == name)
 				throw new TypeError("invalid element name");
+			
+			var isAttribute:Boolean = str.charCodeAt(0) == 64;// "@"
+			if(isAttribute)
+				str = str.slice(1);
+
 			var qname:QName = new QName(str);
-			if(str.charCodeAt(0) == 64)// "@"
+			if(isAttribute)
 				qname.setIsAttribute(true);
-
+				
 			return qname;
 		}