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 <[email protected]>
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;
                }
                

Reply via email to