OK, I'll try to find another way.

On 9/19/16, 12:12 PM, "Harbs" <harbs.li...@gmail.com> wrote:

>Yes. I’m pretty sure it’s used to implicitly convert a qname into a
>proper string representation to an XML name. This can be in client code
>such as var foo:String = myXML.name(). It’s also used in
>On Sep 19, 2016, at 9:35 PM, Alex Harui <aha...@adobe.com> wrote:
>> Hi,
>> FlexJS has a Qname class.  Looks like it is mostly used in XML.  It has
>> toString() that adds a "::" between the uri and localname.  Is
>> being used anywhere?
>> I want to change Qname.toString() to produce a valid JS identifier.
>> I can use Qname outside of XML.  If mx_internal which is a namespace
>> in a qname has the uri of "http://www.a.com/foo/bar"; is used in
>> Qname(mx_internal, "baz"), you currently get a toString() of
>> "http://www.a.com/foo/bar::baz";.  I believe that ':' and "/" and '.' are
>> not valid in JS identifiers, so I would just replace them all with "_"
>> (yes, I know I could URIEncode them, but it makes it less readable) so
>> result would be "http___www_a_com_foo_bar_baz".
>> This would allow us to support
>> mx_internal function baz()
>> Which would then cross compile to:
>> someClass.prototype.http___www_a_com_foo_bar_baz = function()
>> And access like
>> Var baz:Qname = Qname(mx_internal, "baz");
>> someClass[baz] would then work.
>> Thoughts?
>> -Alex

Reply via email to