You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/10/07 18:05:09 UTC

[GitHub] Harbs opened a new issue #52: Add more tests for XML bracket access

Harbs opened a new issue #52: Add more tests for XML bracket access
URL: https://github.com/apache/royale-compiler/issues/52
 
 
   Given:
   `var xml:XML = <foo><baz/></foo>`
   `var baz:XMLList = foo.baz;`
   
   `baz = foo["baz”];`
   Should become:
   `baz = foo.child("baz”);`
   
   `baz = foo[foo.length()-1];`
   Should remain unchanged:
   `baz = foo[foo.length()-1];`
   
   `foo["baz"] = <baz/>;`
   Now becomes:
   `foo.child("baz") = new XML("<baz/“);`
   But that’s wrong. It should be:
   `foo.setChild("baz",new XML("<baz/"));`
   
   `foo[0] = <baz/>;`
   Should remain unchanged:
   `foo[0] = new XML("<baz/>");`
   
   Given:
   `var a:XML = new XML("<top attr1='cat'><child attr2='dog'><grandchild attr3='fish'>text</grandchild></child></top>");`
   `var b:XMLList = a[a.children()[0].name().localName()];`
   should become:
   `var b:XMLList = a.child(a.children()[0].name().localName());`
   
   Some of these test exist already, but not all.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services