You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2016/04/11 00:48:12 UTC

[01/49] git commit: [flex-asjs] [refs/heads/develop] - First commit of XML processing (non functional) Includes a shell of "JXON" classes for alternate XML processing

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 64c699d37 -> d4bce998c


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/basic-manifest.xml b/frameworks/projects/XML/basic-manifest.xml
new file mode 100644
index 0000000..cd0f5b4
--- /dev/null
+++ b/frameworks/projects/XML/basic-manifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
new file mode 100644
index 0000000..8c39d13
--- /dev/null
+++ b/frameworks/projects/XML/build.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="XML" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../.."/>
+
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
+    <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+
+    <target name="main" depends="clean,compile,test" description="Clean build of Core.swc">
+    </target>
+
+    <target name="all" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of XML.swc">
+    </target>
+
+    <target name="test" unless="is.jenkins">
+        <ant dir="as/tests"/>
+    </target>
+
+    <target name="test-js" unless="is.jenkins">
+        <!-- no tests yet
+         <ant dir="js/tests" />
+         -->
+    </target>
+
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${FLEXJS_HOME}/frameworks/libs">
+                <include name="XML.swc"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false">
+            <fileset dir="${basedir}/js/out">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+    </target>
+
+    <path id="lib.path">
+        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+    </path>
+
+    <target name="compile" description="Compiles .as files into .swc">
+        <echo message="Compiling libs/XML.swc"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        <!-- make JS output folder now so include-file doesn't error -->
+        <mkdir dir="${basedir}/js/out"/>
+
+        <!-- Load the <compc> task. We can't do this at the <project> level -->
+        <!-- because targets that run before flexTasks.jar gets built would fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <!--
+            Link in the classes (and their dependencies) for the MXML tags
+            listed in this project's manifest.xml.
+            Also link the additional classes (and their dependencies)
+            listed in CoreClasses.as,
+            because these aren't referenced by the manifest classes.
+            Keep the standard metadata when compiling.
+            Include the appropriate CSS files and assets in the SWC.
+            Don't include any resources in the SWC.
+            Write a bundle list of referenced resource bundles
+            into the file bundles.properties in this directory.
+        -->
+        <compc fork="true"
+               output="${FLEXJS_HOME}/frameworks/libs/XML.swc">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="compile-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::JS,false" />
+        </compc>
+    </target>
+
+    <target name="compile-asjs">
+        <echo message="Cross-compiling XML"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
+            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
+            <arg value="-output=${basedir}/js/out" />
+            <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+            <!-- this is not on external-library path otherwise goog.requires are not generated -->
+            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+            <arg value="-define=COMPILE::AS3,false" />
+            <arg value="-define=COMPILE::JS,true" />
+        </java>
+    </target>
+
+    <target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
+        <echo message="Compiling externs/XML.swc"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        <!-- make JS output folder now so include-file doesn't error -->
+        <mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+        
+        <!-- Load the <compc> task. We can't do this at the <project> level -->
+        <!-- because targets that run before flexTasks.jar gets built would fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <!--
+         Link in the classes (and their dependencies) for the MXML tags
+         listed in this project's manifest.xml.
+         Also link the additional classes (and their dependencies)
+         listed in CoreClasses.as,
+         because these aren't referenced by the manifest classes.
+         Keep the standard metadata when compiling.
+         Include the appropriate CSS files and assets in the SWC.
+         Don't include any resources in the SWC.
+         Write a bundle list of referenced resource bundles
+         into the file bundles.properties in this directory.
+         -->
+        <compc fork="true"
+            output="${FLEXJS_HOME}/frameworks/externs/XML.swc">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="compile-asjs-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+            <!-- this is not on external-library path otherwise goog.requires are not generated -->
+            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+            <arg value="-define=COMPILE::AS3,false" />
+            <arg value="-define=COMPILE::JS,true" />
+        </compc>
+    </target>
+
+    <target name="copy-js">
+        <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
+            <fileset dir="${basedir}/js/out">
+                <include name="**/**"/>
+            </fileset>
+        </copy>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-as-to-js-config.xml b/frameworks/projects/XML/compile-as-to-js-config.xml
new file mode 100644
index 0000000..e601b79
--- /dev/null
+++ b/frameworks/projects/XML/compile-as-to-js-config.xml
@@ -0,0 +1,77 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element>
+        </external-library-path>
+
+        <mxml>
+            <children-as-data>true</children-as-data>
+        </mxml>
+        <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+        <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+        <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+            <name>Bindable</name>
+            <name>Managed</name>
+            <name>ChangeEvent</name>
+            <name>NonCommittingChangeEvent</name>
+            <name>Transient</name>
+        </keep-as3-metadata>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <locale/>
+
+        <source-path>
+            <!--<path-element>as/src</path-element>-->
+        </source-path>
+
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+
+    <include-sources>
+        <path-element>as/src</path-element>
+    </include-sources>
+
+    <include-classes>
+        <class>CoreClasses</class>
+        <!--<class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+        
+    <target-player>11.1</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-asjs-config.xml b/frameworks/projects/XML/compile-asjs-config.xml
new file mode 100644
index 0000000..977c1d4
--- /dev/null
+++ b/frameworks/projects/XML/compile-asjs-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+    </include-file>
+
+    <include-sources>
+    </include-sources>
+    
+    <include-classes>
+        <class>CoreClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+    
+    <!--<target-player>${playerglobal.version}</target-player>-->
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-config.xml b/frameworks/projects/XML/compile-config.xml
new file mode 100644
index 0000000..7d862dc
--- /dev/null
+++ b/frameworks/projects/XML/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <!--
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+     -->
+
+    <include-classes>
+        <class>XMLClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-js-config.xml b/frameworks/projects/XML/compile-js-config.xml
new file mode 100644
index 0000000..b37f6af
--- /dev/null
+++ b/frameworks/projects/XML/compile-js-config.xml
@@ -0,0 +1,87 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+            <path-element>asjs/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <!--
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+     -->
+    
+    <include-classes>
+        <class>XMLClasses</class>
+        <!-- leave out for now until we get Application to compile
+        <class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+		<uri>library://ns.apache.org/flexjs/svg</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>


[20/49] git commit: [flex-asjs] [refs/heads/develop] - Changed XML to match the new folder structure

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
deleted file mode 100644
index e34b765..0000000
--- a/frameworks/projects/XML/as/src/XMLList.as
+++ /dev/null
@@ -1,657 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
-package
-{
-	public class XMLList
-	{
-		public function XMLList()
-		{
-			addIndex(0);
-		}
-		private var _targetObject:XML;
-		public function set targetObject(value:XML):void
-		{
-			_targetObject = value;
-		}
-		private var _targetProperty:QName;
-		public function set targetProperty(value:QName):void
-		{
-			_targetProperty = value;
-		}
-		private var _xmlArray:Array = [];
-		/*
-			9.2.1.2 [[Put]] (P, V)
-			Overview
-			The XMLList type overrides the internal [[Put]] method defined by the Object type. The XMLList [[Put]] method is used to modify or replace an XML object within the XMLList and the context of its parent. In addition, when the XMLList contains a single property with an XML object, the [[Put]] method is used to modify, replace, and insert properties or XML attributes of that value by name. The input argument P identifies which portion of the XMLList and associated XML objects will be affected and may be a numeric property name, an unqualified name for an XML attribute (distinguished from XML valued property names by a leading “@” symbol) or set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes or the properties wildcard “*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes
  in no namespace. The input argument V may be a value of type XML, XMLList or any value that can be converted to a String with ToString().
-			NOTE Unlike the internal Object [[Put]] method, the internal XMLList [[Put]] method is never used for modifying the set of methods associated with XMLList objects.
-			Semantics
-			When the [[Put]] method of an XMLList object x is called with property name P and value V, the following steps are taken:
-			1. Let i = ToUint32(P)
-			2. If ToString(i) == P
-			  a. If x.[[TargetObject]] is not null
-			    i. Let r be the result of calling the [[ResolveValue]] method of x.[[TargetObject]]
-			    ii. If r == null, return
-			  b. Else let r = null
-			  c. If i is greater than or equal to x.[[Length]]
-			    i. If Type(r) is XMLList
-			      1. If r.[[Length]] is not equal to 1, return
-			      2. Else let r = r[0]
-			    ii. If r.[[Class]] is not equal to "element", return
-			    iii. Create a new XML object y with y.[[Parent]] = r, y.[[Name]] = x.[[TargetProperty]], y.[[Attributes]] = {}, y.[[Length]] = 0
-			    iv. If Type(x.[[TargetProperty]]) is AttributeName
-			      1. Let attributeExists be the result of calling the [[Get]] method of r with argument y.[[Name]]
-			      2. If (attributeExists.[[Length]] > 0), return
-			      3. Let y.[[Class]] = "attribute"
-			    v. Else if x.[[TargetProperty]] == null or x.[[TargetProperty]].localName == "*"
-			      1. Let y.[[Name]] = null
-			      2. Let y.[[Class]] = "text"
-			    vi. Else let y.[[Class]] = "element"
-			    vii. Let i = x.[[Length]]
-			    viii. If (y.[[Class]] is not equal to "attribute")
-			      1. If r is not null
-			        a. If (i > 0)
-			          i. Let j = 0
-			          ii. While (j < r.[[Length]]-1) and (r[j] is not the same object as x[i-1])
-			            1. Let j = j + 1
-			        b. Else
-			          i. Let j = r.[[Length]]-1
-			        c. Call the [[Insert]] method of r with arguments ToString(j+1) and y
-			      2. If Type(V) is XML, let y.[[Name]] = V.[[Name]]
-			      3. Else if Type(V) is XMLList, let y.[[Name]] = V.[[TargetProperty]]
-			    ix. Call the [[Append]] method of x with argument y
-			  d. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"}), let V = ToString(V)
-			  e. If x[i].[[Class]] == "attribute"
-			    i. Let z = ToAttributeName(x[i].[[Name]])
-			    ii. Call the [[Put]] method of x[i].[[Parent]] with arguments z and V
-			    iii. Let attr be the result of calling [[Get]] on x[i].[[Parent]] with argument z
-			    iv. Let x[i] = attr[0]
-			  f. Else if Type(V) is XMLList
-			    i. Create a shallow copy c of V
-			    ii. Let parent = x[i].[[Parent]]
-			    iii. If parent is not null
-			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
-			      2. Call the [[Replace]] method of parent with arguments q and c
-			      3. For j = 0 to c.[[Length]]-1
-			        a. Let c[j] = parent[ToUint32(q)+j]
-			    iv. If c.[[Length]] == 0
-			      1. For j = i + 1 to x.[[Length]] – 1, rename property j of x to ToString(j-1)
-			    v. Else
-			      1. For j = x.[[Length]]-1 downto i + 1, rename property j of x to ToString(j + c.[[Length]] - 1)
-			    vi. For j = 0 to c.[[Length]]-1, let x[i + j] = c[j]
-			    vii. Let x.[[Length]] = x.[[Length]] + c.[[Length]] - 1
-			  g. Else if (Type(V) is XML) or (x[i].[[Class]] ∈ {"text", "comment", "processing-instruction"})
-			    i. Let parent = x[i].[[Parent]]
-			    ii. If parent is not null
-			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
-			      2. Call the [[Replace]] method of parent with arguments q and V
-			      3. Let V = parent[q]
-			    iii. If Type(V) is String
-			      1. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = V
-			      2. Let x[i] = t
-			    iv. Else
-			      1. Let x[i] = V
-			  h. Else
-			    i. Call the [[Put]] method of x[i] with arguments "*" and V
-			3. Else if x.[[Length]] is less than or equal to 1
-			  a. If x.[[Length]] == 0
-			    i. Let r be the result of calling the [[ResolveValue]] method of x
-			    ii. If (r == null) or (r.[[Length]] is not equal to 1), return
-			    iii. Call the [[Append]] method of x with argument r
-			  b. Call the [[Put]] method of x[0] with arguments P and V
-			4. Return
-		*/
-		private function addIndex(idx:int):void
-		{
-			var idxStr:String = "" + idx;
-			Object.defineProperty(this,idxStr,
-				{
-					get: function() { return _xmlArray[idx]; },
-					set: function(newValue:*) {
-						var i:int;
-						if(newValue is XML)
-						{
-							_xmlArray[idx] = newValue;
-						}
-						else if(newValue is XMLList)
-						{
-							var len:int = newValue.length();
-							for(i=0;i<len;i++)
-							{
-								// replace the first one and add each additonal one.
-								if(i==0)
-									_xmlArray[idx] = newValue[i];
-								else
-									_xmlArray.splice(idx+i,0,newValue[i]);
-							}
-						}
-						// add indexes as necessary
-						while(idx++ < _xmlArray.length)
-						{
-							if(!this.hasOwnProperty(idx))
-								addIndex(idx);
-						}
-					},
-					enumerable: true,
-					configurable: true
-				}
-			);
-		}
-		
-		public function appendChild(child:XML):void
-		{
-			addIndex(_xmlArray.length);
-			_xmlArray[_xmlArray.length] = child;
-		}
-		
-		/**
-		 * Calls the attribute() method of each XML object and returns an XMLList object of the results.
-		 * 
-		 * @param attributeName
-		 * @return 
-		 * 
-		 */
-		public function attribute(attributeName:*):XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].attribute(attributeName);
-				if(list.length())
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		/**
-		 * Calls the attributes() method of each XML object and returns an XMLList object of attributes for each XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function attributes():XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].attributes();
-				if(list.length())
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		/**
-		 * Calls the child() method of each XML object and returns an XMLList object that contains the results in order.
-		 * 
-		 * @param propertyName
-		 * @return 
-		 * 
-		 */
-		public function child(propertyName:Object):XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].child(propertyName);
-				if(list.length())
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		/**
-		 * Calls the children() method of each XML object and returns an XMLList object that contains the results.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function children():XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].children();
-				if(list.length)
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		
-		/**
-		 * Calls the comments() method of each XML object and returns an XMLList of comments.
-		 * @return 
-		 * 
-		 */
-		public function comments():XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].comments();
-				if(list.length)
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		
-		public function concat(list:*):XMLList
-		{
-			if(list is XML)
-			{
-				var newList:XMLList = new XMLList();
-				newList.appendChild(list);
-				list = newList;
-			}
-			if(!(list is XMLList))
-				throw new TypeError("invalid type");
-
-			var retVal:XMLList = this.copy();
-			var item:XML;
-			for each(item in list)
-				retVal.appendChild(item);
-				
-			return retVal;
-		}
-		
-		/**
-		 * Checks whether the XMLList object contains an XML object that is equal to the given value parameter.
-		 * 
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function contains(value:XML):Boolean
-		{
-			
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				if(_xmlArray[i].contains(value))
-					return true;
-			}
-			return false;
-		}
-		
-		/**
-		 * Returns a copy of the given XMLList object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function copy():XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-				retVal[i] = _xmlArray[i].copy();
-			
-			return retVal;
-		}
-		
-		/**
-		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function descendants(name:Object = *):XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].descendants(name);
-				if(list.length())
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-		
-		/**
-		 * Calls the elements() method of each XML object.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function elements(name:Object = *):XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].elements(name);
-				if(list.length())
-					retVal = retVal.concat(list);
-			}
-			return retVal;
-		}
-
-		public function equals(list:*):Boolean
-		{
-			/*
-				Overview
-				The XMLList type adds the internal [[Equals]] method to the internal properties defined by the Object type.
-				The XMLList [[Equals]] method is used to compare this XMLList object for content equality 
-				with another XMLList object V or determine whether this XMLList object contains a single XML object that compares equal to V. 
-				The [[Equals]] operator returns true if this XMLList object is considered equal to V 
-				or contains only one XML object that is considered equal to V. Otherwise, it returns false. 
-				Empty XMLList objects are considered equal to undefined. 
-				The input argument V may be a value of type XMLList, XML, undefined or any value that can be converted to a String with ToString().
-				
-				Semantics
-				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
-				1. If V == undefined and x.[[Length]] == 0, return true
-				2. If Type(V) is XMLList
-				  a. If x.[[Length]] is not equal to V.[[Length]], return false
-				  b. For i = 0 to x.[[Length]]
-				    i. If the result of the comparison x[i] == V[i] is false, return false
-				  c. Return true
-				3. Else if x.[[Length]] == 1
-				  a. Return the result of the comparison x[0] == V
-				4. Return false
-			*/
-			return false;
-		}
-		
-		public function hasComplexContent():Boolean
-		{
-			//what to do with multiple nodes? If anything is complex, we return true.
-			if(_xmlArray.length == 0)
-				return false;
-			var len:int = _xmlArray.length;
-			for (var i:int=1;i<len;i++)
-			{
-				if(_xmlArray[i].hasComplexContent())
-					return true;
-			}
-			return false;
-		}
-
-		public function hasOwnProperty(propertyName:*):Boolean
-		{
-			/*
-				Overview
-				The XMLList type overrides the internal [[HasProperty]] method defined by the Object type. The XMLList [[HasProperty]] method is used to determine whether this XMLList object contains an XML element or attribute by its ordinal position or whether any of the objects contained in this XMLList object contains an XML element or attribute by its name. The input argument P may be a numeric property name, an unqualified name for an XML attribute (distinguished from the name of XML elements by a leading “@” symbol) or a set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes, the properties wildcard “*” or the attributes wildcard “@*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes in no namespace.
-				Semantics
-				When the [[HasProperty]] method of an XMLList object x is called with property name P, the following steps are taken:
-				1. If ToString(ToUint32(P)) == P
-				a. Return (ToUint32(P) < x.[[Length]])
-				2. For i = 0 to x.[[Length]]-1
-				a. If x[i].[[Class]] == "element" and the result of calling the [[HasProperty]] method of x[i] with argument P == true, return true
-				3. Return false			
-			*/
-			if(parseInt(propertyName,10).toString() == propertyName)
-			{
-				return parseInt(propertyName,10) < _xmlArray.length;
-			}
-			var len:int = _xmlArray.length;
-			for (var i:int=1;i<len;i++)
-			{
-				if(_xmlArray[i].hasOwnProperty(propertyName))
-					return true;
-			}
-			return false;
-		}
-		
-		/**
-		 * Checks whether the XMLList object contains simple content.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function hasSimpleContent():Boolean
-		{
-			//what to do with multiple nodes? If anything is complex, we return false.
-			if(_xmlArray.length == 0)
-				return true;
-			var len:int = _xmlArray.length;
-			for (var i:int=1;i<len;i++)
-			{
-				if(_xmlArray[i].hasComplexContent())
-					return false;
-			}
-			return true;
-		}
-		
-		/**
-		 * Returns the number of items in the XMLList.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function length():int
-		{
-			return _xmlArray.length;
-		}
-		
-		/**
-		 * Merges adjacent text nodes and eliminates empty text nodes for each of the following:
-		 * all text nodes in the XMLList, all the XML objects contained in the XMLList, and the descendants of all the XML objects in the XMLList.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function normalize():XMLList
-		{
-			//TODO: Figure out what to do here.
-		}
-		
-		/**
-		 * Returns the parent of the XMLList object if all items in the XMLList object have the same parent.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function parent():Object
-		{
-			if(_xmlArray.length == 0)
-				return undefined;
-			var retVal = this[0].parent;
-			var len:int = _xmlArray.length;
-			for (var i:int=1;i<len;i++)
-			{
-				if(_xmlArray[i].parent != retVal)
-					return undefined;
-			}
-			return retVal;
-		}
-		
-		/**
-		 * If a name parameter is provided, lists all the children of the XMLList object that contain processing instructions with that name.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function processingInstructions(name:String = "*"):XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			if(!name)
-				return retVal;
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				if(_xmlArray[i].nodeKind() != "processing-instruction")
-					continue;
-				if(name == "*")
-				{
-					retVal.appendChild(_xmlArray[i]);
-				}
-				else if(name == _xmlArray[i].localName)
-					retVal.appendChild(_xmlArray[i]);
-			}
-			return retVal;
-		}
-
-		public function removeChild(child:*):void
-		{
-			var i:int;
-			var len:int;
-			if(child is XMLList)
-			{
-				len = child.length();
-				for(i=0;i<len;i++)
-				{
-					removeChild(child[i]);
-				}
-			}
-			else if(child is XML)
-			{
-				len = _xmlArray.length-1;
-				for(i=len; i >= 0; i--)
-				{
-					if(_xmlArray[i] == child)
-					{
-						_xmlArray.splice(i,1);
-					}
-				}
-			}
-		}
-
-		public function removeChildAt(idx:int):void
-		{
-			if(idx >= 0 && idx < _xmlArray.length)
-				_xmlArray.splice(idx,1);
-		}
-
-		private var _targetObject:*;
-		/**
-		 * @private
-		 * 
-		 * Internally used to store an associated XML or XMLList object which will be effected by operations
-		 */
-		public function set targetObject(value:*):void
-		{
-			_targetObject = value;
-		}
-		public function get targetObject():*
-		{
-			return _targetObject;
-		}
-
-		private var _targetProperty:*;
-		/**
-		 * @private
-		 * 
-		 * The name of a property that may be created in the targetObject when objects are added to an empty XMLList.
-		 */
-		public function set targetProperty(value:*):void
-		{
-			_targetProperty = value;
-		}
-		public function get targetProperty():*
-		{
-			return _targetProperty;
-		}
-		
-		/**
-		 * Calls the text() method of each XML object and returns an XMLList object that contains the results.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function text():XMLList
-		{
-			var retVal:XMLList = new XMLList();
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var list:XMLList = _xmlArray[i].text();
-				if(list.length())
-					retVal.concat(list);
-			}
-			return retVal;
-		}
-
-		/**
-		 * Returns the string representation of this object, formatted according to locale-specific conventions.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toLocaleString():String
-		{
-			var retVal:Array = [];
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var str:String = _xmlArray[i].toLocaleString();
-				if(str)
-					retVal.push(str);
-			}
-			return retVal.join("");
-		}
-		
-		/**
-		 * Returns a string representation of all the XML objects in an XMLList object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toString():String
-		{
-			var retVal:Array = [];
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var str:String = _xmlArray[i].toString();
-				if(str)
-					retVal.push(str);
-			}
-			return retVal.join("");
-		}
-		
-		/**
-		 * Returns a string representation of all the XML objects in an XMLList object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toXMLString():String
-		{
-			var retVal:Array = [];
-			var len:int = _xmlArray.length;
-			for (var i:int=0;i<len;i++)
-			{
-				var str:String = _xmlArray[i].toXMLString();
-				if(str)
-					retVal.push(str);
-			}
-			return retVal.join("");
-		}
-		
-		/**
-		 * Returns the XMLList object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function valueOf():XMLList
-		{
-			return this;
-		}
-	}
-}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
deleted file mode 100644
index 14b85ea..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
+++ /dev/null
@@ -1,29 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public interface IJXON
-	{
-		function isText():Boolean;
-		function toString():String;
-		function children():JXONList;
-		function attributes():JXONList;
-		function get nodeKind():String
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
deleted file mode 100644
index c4ae7d8..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
+++ /dev/null
@@ -1,544 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXON implements IJXON
-	{
-		public function JXON(xml:String)
-		{
-			
-		}
-		public function isText():Boolean
-		{
-			return false;
-		}
-		
-
-		private var _appliedNamespace:JXONNamespace;
-
-		public function get appliedNamespace():JXONNamespace
-		{
-			return _appliedNamespace;
-		}
-
-		public function set appliedNamespace(value:JXONNamespace):void
-		{
-			_appliedNamespace = value;
-		}
-		
-		private var _namespaces:Array;
-		private var _uriLookup:Object;
-		private function get uriLookup():Object{
-			if(!_uriLookup)
-				_uriLookup = {};
-			return _uriLookup;
-		}
-		private var _prefixLookup:Object
-		private function get prefixLookup():Object{
-			if(!_prefixLookup)
-				_prefixLookup = {};
-			return _prefixLookup;
-		}
-
-		/**
-		 * Adds a namespace to the set of in-scope namespaces for the XML object.
-		 *  
-		 * @param ns
-		 * 
-		 */
-		public function addNamespace(ns:JXONNamespace):void
-		{
-			//throw an error?
-			if(prefixLookup[ns.prefix])
-				return;
-			
-			if(uriLookup[ns.uri])
-				return;
-			
-			prefixLookup[ns.prefix] = ns;
-			uriLookup[ns.uri] = ns;
-			_namespaces.push(ns);
-		}
-		
-		/**
-		 * Appends the given child to the end of the XML object's properties.
-		 *  
-		 * @param child
-		 * @return 
-		 * 
-		 */
-		public function appendChild(child:IJXON):IJXON
-		{
-			return null;
-		}
-		
-		/**
-		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
-		 * 
-		 * @param attributeName
-		 * @return 
-		 * 
-		 */
-		public function attribute(attributeName:*):JXONList
-		{
-			return null;
-		}
-		
-		private var _attributes:Array;
-
-		/**
-		 * Returns a list of attribute values for the given XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get attributes():JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Lists the children of an XML object with a specific property name.
-		 *  
-		 * @param propertyName
-		 * @return 
-		 * 
-		 */
-		public function child(propertyName:Object):JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Identifies the zero-indexed position of this XML object within the context of its parent.
-		 *  
-		 * @return 
-		 * 
-		 */
-		public function childIndex():int
-		{
-			//TODO
-			return 0;
-		}
-		
-		private var _children:JXONList;
-		
-		/**
-		 * Lists the children of the XML object in the sequence in which they appear.
-		 *  
-		 * @return 
-		 * 
-		 */
-		public function get children():JXONList
-		{
-			return _children;
-		}
-		
-		//comments():XMLList include?
-		//Lists the properties of the XML object that contain XML comments.
-		
-		/**
-		 * Compares the XML object against the given value parameter.
-		 *  
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function contains(value:JXON):Boolean
-		{
-			//TODO
-			return true;
-		}
-		
-		/**
-		 * Returns a copy of the given XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function copy():JXON
-		{
-			return null;
-		}
-		
-		/**
-		 * Returns an object with the following properties set to the default values: 
-		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @return 
-		 * 
-		 */
-		static public function defaultSettings():Object
-		{
-			return {};
-		}
-		
-		/**
-		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
-		 *  
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function descendants(name:Object = null):JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Lists the elements of an XML object.
-		 *  
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function elements(name:Object = null):JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * filters XML content based on logic in the callback function
-		 * @param callback
-		 * @param thisObject
-		 * @return 
-		 * 
-		 */
-		public function filter(callback:Function, thisObject:* = null):JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Checks to see whether the XML object contains complex content.
-		 *  
-		 * @return 
-		 * 
-		 */
-		public function hasComplexContent():Boolean
-		{
-			return true;
-		}
-		
-		/**
-		 * Checks to see whether the XML object contains simple content.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function hasSimpleContent():Boolean
-		{
-			return true;
-		}
-		
-		/**
-		 * Lists the namespaces for the XML object, based on the object's parent.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function inScopeNamespaces():Array
-		{
-			return null;
-		}
-		
-		/**
-		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
-		 * 
-		 * @param child1
-		 * @param child2
-		 * @return 
-		 * 
-		 */
-		public function insertChildAfter(child1:Object, child2:Object):*
-		{
-			
-		}
-		
-		/**
-		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
-		 * 
-		 * @param child1
-		 * @param child2
-		 * @return 
-		 * 
-		 */
-		public function insertChildBefore(child1:Object, child2:Object):*
-		{
-			
-		}
-		
-		/**
-		 * For XML objects, this method always returns the integer 1.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get length():int
-		{
-			return 1;
-		}
-		
-		/**
-		 * Gives the local name portion of the qualified name of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get localName():Object
-		{
-			return null;
-		}
-		/**
-		 * Changes the local name of the XML object to the given name parameter.
-		 * 
-		 * @param name
-		 * 
-		 */
-		public function set localName(name:String):void
-		{
-			
-		}
-		/**
-		 * Gives the qualified name for the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get name():Object
-		{
-			return null;
-		}
-		
-		/**
-		 * Sets the name of the XML object to the given qualified name or attribute name.
-		 * 
-		 * @param name
-		 * 
-		 */
-		public function set name(name:String):void
-		{
-			
-		}
-		
-		/**
-		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
-		 * @param prefix
-		 * @return 
-		 * 
-		 */
-		public function xmlNamespace(prefix:String = null):*
-		{
-			
-		}
-		
-		/**
-		 * Lists namespace declarations associated with the XML object in the context of its parent.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get namespaceDeclarations():Array
-		{
-			return null;
-		}
-		
-		/**
-		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get nodeKind():String
-		{
-			return "element";
-		}
-		
-		/**
-		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function normalize():JXON
-		{
-			return null;
-		}
-		
-		private var _parent:*;
-
-		public function set parent(value:*):void
-		{
-			_parent = value;
-		}
-
-		/**
-		 * Returns the parent of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get parent():*
-		{
-			return _parent;
-		}
-		
-		/**
-		 * Inserts a copy of the provided child object into the XML element before any existing XML properties for that element.
-		 * 
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function prependChild(value:Object):JXON
-		{
-			return null;
-		}
-		
-		/**
-		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function processingInstructions(name:String = ""):JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Removes the given namespace for this object and all descendants.
-		 * 
-		 * @param ns
-		 * @return 
-		 * 
-		 */
-		public function removeNamespace(ns:Namespace):JXON
-		{
-			return null;
-		}
-		
-		/**
-		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
-		 * 
-		 * @param propertyName
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function replace(propertyName:Object, value:JXON):JXON
-		{
-			return null;
-		}
-		
-		/**
-		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
-		 * 
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function setChildren(value:JXONList):JXON
-		{
-			return null;
-		}
-		
-		
-		/**
-		 * Sets the namespace associated with the XML object.
-		 * 
-		 * @param ns
-		 * 
-		 */
-		public function setNamespace(ns:JXONNamespace):void
-		{
-			
-		}
-		
-		/**
-		 * Sets values for the following XML properties:
-		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @param rest
-		 * 
-		 */
-		static public function setSettings(... rest):void
-		{
-			
-		}
-		
-		/**
-		 * Retrieves the following properties:
-		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @return 
-		 * 
-		 */
-		static public function getSettings():Object
-		{
-			return null;
-		}
-		
-		/**
-		 * Returns an XMLNodeList object of all XML properties of the XML object that represent XML text nodes.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function get text():JXONList
-		{
-			return null;
-		}
-		
-		/**
-		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
-		 * 
-		 * @param k
-		 * @return 
-		 * 
-		 */
-		public function toJSON(k:String):*
-		{
-			
-		}
-		
-		/**
-		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toString():String
-		{
-			return "";
-		}
-		
-		/**
-		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toXMLString():String
-		{
-			return "";
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
deleted file mode 100644
index 5ed9ce0..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
+++ /dev/null
@@ -1,79 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONAttribute implements IJXON
-	{
-		public function JXONAttribute(name:String="",value:String="")
-		{
-			_name = name;
-			_value = value;
-		}
-		
-		private var _name:String;
-
-		public function get name():String
-		{
-			return _name;
-		}
-
-		public function set name(value:String):void
-		{
-			_name = value;
-		}
-		
-		private var _value:String;
-
-		public function get value():String
-		{
-			return _value;
-		}
-
-		public function set value(value:String):void
-		{
-			_value = value;
-		}
-
-
-		public function isText():Boolean
-		{
-			return false;
-		}
-		
-		public function toString():String
-		{
-			return null;
-		}
-		
-		public function children():JXONList
-		{
-			return null;
-		}
-		
-		public function attributes():JXONList
-		{
-			return null;
-		}
-		
-		public function get nodeKind():String
-		{
-			return "attribute";
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
deleted file mode 100644
index 649cb5c..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
+++ /dev/null
@@ -1,52 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONComment implements IJXON
-	{
-		public function JXONComment()
-		{
-		}
-		
-		public function isText():Boolean
-		{
-			return false;
-		}
-		
-		public function toString():String
-		{
-			return null;
-		}
-		
-		public function children():JXONList
-		{
-			return null;
-		}
-		
-		public function attributes():JXONList
-		{
-			return null;
-		}
-		
-		public function get nodeKind():String
-		{
-			return "comment";
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
deleted file mode 100644
index 27738d3..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
+++ /dev/null
@@ -1,52 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONInstruction implements IJXON
-	{
-		public function JXONInstruction()
-		{
-		}
-		
-		public function isText():Boolean
-		{
-			return false;
-		}
-		
-		public function toString():String
-		{
-			return null;
-		}
-		
-		public function children():JXONList
-		{
-			return null;
-		}
-		
-		public function attributes():JXONList
-		{
-			return null;
-		}
-		
-		public function get nodeKind():String
-		{
-			return "processing-instruction";
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
deleted file mode 100644
index 2fd1bd1..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
+++ /dev/null
@@ -1,28 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONList extends Array
-	{
-		public function JXONList(...parameters)
-		{
-			super(parameters);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
deleted file mode 100644
index 23eb15e..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
+++ /dev/null
@@ -1,67 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONNamespace
-	{
-		
-		/**
-		 * Constructor
-		 * 
-		 * @param prefix
-		 * @param uri
-		 * 
-		 *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.5.0
-		 * 
-		 */
-		public function JXONNamespace(prefix:String,uri:String)
-		{
-			_prefix = prefix;
-			_uri = uri;
-		}
-		
-		private var _prefix:String;
-
-		public function get prefix():String
-		{
-			return _prefix;
-		}
-
-		public function set prefix(value:String):void
-		{
-			_prefix = value;
-		}
-		
-		private var _uri:String;
-
-		public function get uri():String
-		{
-			return _uri;
-		}
-
-		public function set uri(value:String):void
-		{
-			_uri = value;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
deleted file mode 100644
index d108edc..0000000
--- a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
+++ /dev/null
@@ -1,52 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core.xml
-{
-	public class JXONText implements IJXON
-	{
-		public function JXONText()
-		{
-		}
-		
-		public function isText():Boolean
-		{
-			return true;
-		}
-		
-		public function toString():String
-		{
-			return null;
-		}
-		
-		public function children():JXONList
-		{
-			return null;
-		}
-		
-		public function attributes():JXONList
-		{
-			return null;
-		}
-		
-		public function get nodeKind():String
-		{
-			return "text";
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/basic-manifest.xml b/frameworks/projects/XML/basic-manifest.xml
deleted file mode 100644
index cd0f5b4..0000000
--- a/frameworks/projects/XML/basic-manifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-
-
-<componentPackage>
-
-</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-as-to-js-config.xml b/frameworks/projects/XML/compile-as-to-js-config.xml
deleted file mode 100644
index e601b79..0000000
--- a/frameworks/projects/XML/compile-as-to-js-config.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
-            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element>
-        </external-library-path>
-
-        <mxml>
-            <children-as-data>true</children-as-data>
-        </mxml>
-        <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-        <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-        <binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-            <name>Bindable</name>
-            <name>Managed</name>
-            <name>ChangeEvent</name>
-            <name>NonCommittingChangeEvent</name>
-            <name>Transient</name>
-        </keep-as3-metadata>
-
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <locale/>
-
-        <source-path>
-            <!--<path-element>as/src</path-element>-->
-        </source-path>
-
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-
-    <include-sources>
-        <path-element>as/src</path-element>
-    </include-sources>
-
-    <include-classes>
-        <class>CoreClasses</class>
-        <!--<class>CoreASJSClasses</class>-->
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-    </include-namespaces>
-        
-    <target-player>11.1</target-player>
-	
-
-</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-asjs-config.xml b/frameworks/projects/XML/compile-asjs-config.xml
deleted file mode 100644
index 977c1d4..0000000
--- a/frameworks/projects/XML/compile-asjs-config.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-        </external-library-path>
-        
-		<mxml>
-			<children-as-data>true</children-as-data>
-		</mxml>
-		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-          <name>Bindable</name>
-          <name>Managed</name>
-          <name>ChangeEvent</name>
-          <name>NonCommittingChangeEvent</name>
-          <name>Transient</name>
-        </keep-as3-metadata>
-	  
-        <locale/>
-        
-        <library-path>
-        </library-path>
-        
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <source-path>
-            <path-element>as/src</path-element>
-        </source-path>
-        
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-    
-    <include-file>
-    </include-file>
-
-    <include-sources>
-    </include-sources>
-    
-    <include-classes>
-        <class>CoreClasses</class>
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-    </include-namespaces>
-    
-    <!--<target-player>${playerglobal.version}</target-player>-->
-	
-
-</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-config.xml b/frameworks/projects/XML/compile-config.xml
deleted file mode 100644
index 7d862dc..0000000
--- a/frameworks/projects/XML/compile-config.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-        </external-library-path>
-        
-		<mxml>
-			<children-as-data>true</children-as-data>
-		</mxml>
-		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-          <name>Bindable</name>
-          <name>Managed</name>
-          <name>ChangeEvent</name>
-          <name>NonCommittingChangeEvent</name>
-          <name>Transient</name>
-        </keep-as3-metadata>
-	  
-        <locale/>
-        
-        <library-path/>
-
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <source-path>
-            <path-element>as/src</path-element>
-        </source-path>
-        
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-    
-    <include-file>
-        <name>js/out/*</name>
-        <path>js/out/*</path>
-    </include-file>
-    <!--
-    <include-file>
-        <name>js/src/*</name>
-        <path>js/src/*</path>
-    </include-file>
-     -->
-
-    <include-classes>
-        <class>XMLClasses</class>
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-    </include-namespaces>  
-        
-    <target-player>${playerglobal.version}</target-player>
-	
-
-</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/compile-js-config.xml b/frameworks/projects/XML/compile-js-config.xml
deleted file mode 100644
index b37f6af..0000000
--- a/frameworks/projects/XML/compile-js-config.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-        </external-library-path>
-        
-		<mxml>
-			<children-as-data>true</children-as-data>
-		</mxml>
-		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-          <name>Bindable</name>
-          <name>Managed</name>
-          <name>ChangeEvent</name>
-          <name>NonCommittingChangeEvent</name>
-          <name>Transient</name>
-        </keep-as3-metadata>
-	  
-        <locale/>
-        
-        <library-path/>
-
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <source-path>
-            <path-element>as/src</path-element>
-            <path-element>asjs/src</path-element>
-        </source-path>
-        
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-    
-    <include-file>
-        <name>js/out/*</name>
-        <path>js/out/*</path>
-    </include-file>
-    <!--
-    <include-file>
-        <name>js/src/*</name>
-        <path>js/src/*</path>
-    </include-file>
-     -->
-    
-    <include-classes>
-        <class>XMLClasses</class>
-        <!-- leave out for now until we get Application to compile
-        <class>CoreASJSClasses</class>-->
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-		<uri>library://ns.apache.org/flexjs/svg</uri>
-    </include-namespaces>  
-        
-    <target-player>${playerglobal.version}</target-player>
-	
-
-</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/flex/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/Namespace.as b/frameworks/projects/XML/src/main/flex/Namespace.as
new file mode 100644
index 0000000..95bb405
--- /dev/null
+++ b/frameworks/projects/XML/src/main/flex/Namespace.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class Namespace
+	{
+		public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
+		{
+			/*
+				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
+				1. Create a new Namespace object n
+				2. If prefixValue is not specified and uriValue is not specified
+				  a. Let n.prefix be the empty string
+				  b. Let n.uri be the empty string
+				3. Else if prefixValue is not specified
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "Namespace"
+				    i. Let n.prefix = uriValue.prefix
+				    ii. Let n.uri = uriValue.uri
+				  b. Else if Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri NOTE implementations that preserve prefixes in qualified names may also set n.prefix = uriValue.[[Prefix]]
+				  c. Else
+				    i. Let n.uri = ToString(uriValue)
+				    ii. If (n.uri is the empty string), let n.prefix be the empty string
+				    iii. Else n.prefix = undefined
+				4. Else
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri
+				  b. Else
+				    i. Let n.uri = ToString(uriValue)
+				  c. If n.uri is the empty string
+				    i. If prefixValue is undefined or ToString(prefixValue) is the empty string
+				      1. Let n.prefix be the empty string
+				    ii. Else throw a TypeError exception
+				  d. Else if prefixValue is undefined, let n.prefix = undefined
+				  e. Else if isXMLName(prefixValue) == false
+				  i. Let n.prefix = undefined
+				  f. Else let n.prefix = ToString(prefixValue)
+				5. Return n
+			*/
+			if(!uriValue && prefixOrUri) //we don't have a prefix defined
+			{
+				var uriVal:Object = uriValue ? uriValue : prefixOrUri;
+				if(uriVal is Namespace)
+				{
+					_prefix = (uriVal as Namespace).prefix;
+					_uri = (uriVal as Namespace).uri;
+				}
+				else if(uriVal is QName)
+				{
+					if((uriVal as QName).uri)
+						_uri = (uriVal as QName).uri;
+				}
+				else {
+					_uri = uriVal.toString();
+					if(_uri == "")
+						_prefix = "";
+				}
+			}
+			else if(uriValue)
+			{
+				// something is specified as the URI otherwise fall through and leave both the prefix and uri blank
+				if(uriValue is QName)
+				{
+					if((uriValue as QName).uri)
+						_uri = (uriValue as QName).uri;
+				}
+				else {
+					_uri = uriValue.toString();
+				}
+
+				if(!_uri)
+				{
+					if(!prefixOrUri)
+						_prefix = "";
+					else
+						throw new TypeError("invalid prefix");
+				}
+				else
+					_prefix = prefixOrUri.toString();
+
+			}
+		}
+
+		private var _uri:String = "";
+		public function get uri():String
+		{
+			return _uri;
+		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _prefix:String = null;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		public function toString():String
+		{
+			return uri;
+		}
+
+		public function valueOf():Object
+		{
+			return this;
+		}
+	}
+}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
new file mode 100644
index 0000000..5232bbe
--- /dev/null
+++ b/frameworks/projects/XML/src/main/flex/QName.as
@@ -0,0 +1,162 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class QName
+	{
+		public function QName(qNameOrUri:*=null,localNameVal:*=null)
+		{
+			/*
+				When the QName constructor is called with a one argument Name or two arguments Namespace and Name the following steps are taken:
+				1. If (Type(Name) is Object and Name.[[Class]] == "QName")
+				  a. If (Namespace is not specified), return a copy of Name
+				  b. Else let Name = Name.localName
+				2. If (Name is undefined or not specified)
+				  a. Let Name = “”
+				3. Else let Name = ToString(Name)
+				4. If (Namespace is undefined or not specified)
+				  a. If Name = "*"
+				    i. Let Namespace = null
+				  b. Else
+				    i. Let Namespace = GetDefaultNamespace()
+				5. Let q be a new QName with q.localName = Name
+				6. If Namespace == null
+				  a. Let q.uri = null NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to undefined
+				7. Else
+				  a. Let Namespace be a new Namespace created as if by calling the constructor new Namespace(Namespace)
+				  b. Let q.uri = Namespace.uri NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to Namespace.prefix
+				8. Return q
+			*/
+			if(qNameOrUri is QName)
+			{
+				_uri = qNameOrUri.uri;
+				_localName = qNameOrUri.localName;
+				_prefix = qNameOrUri.prefix;
+			}
+			else if(qNameOrUri is Namespace)
+			{
+				_uri = (qNameOrUri as Namespace).uri;
+				_prefix = (qNameOrUri as Namespace).prefix;
+				if(localNameVal)
+					_localName = localNameVal.toString();
+			}
+			else if (qNameOrUri.toString())
+			{
+				_uri = qNameOrUri;
+				if(localName)
+					_localName = localName;
+			}
+		}
+
+		private var _uri:String;
+		public function get uri():String
+		{
+			return _uri;
+		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _localName:String;
+		public function get localName():String
+		{
+			return _localName;
+		}
+		public function set localName(value:String):void
+		{
+			_localName = value;
+		}
+
+		private var _prefix:String;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		public function toString():String
+		{
+			return _localName;
+		}
+
+		public function equals(name:QName):Boolean
+		{
+			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
+		}
+		public function matches(name:QName):Boolean
+		{
+			if(this.uri == "*" || name.uri == "*")
+				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
+
+			if(this.localName == "*" || name.localName == "*")
+				return this.uri == name.uri;
+
+			return this.uri == name.uri && this.localName == name.localName;
+		}
+		private var _isAttribute:Boolean;
+		public function get isAttribute():Boolean
+		{
+			return _isAttribute;
+		}
+		public function set isAttribute(value:Boolean):void
+		{
+			_isAttribute = value;
+		}
+
+		public function getNamespace(namespaces:Array=null):Namespace
+		{
+			/*
+				When the [[GetNamespace]] method of a QName q is called with no arguments or one argument InScopeNamespaces, the following steps are taken:
+				1. If q.uri is null, throw a TypeError exception NOTE the exception above should never occur due to the way [[GetNamespace]] is called in this specification
+				2. If InScopeNamespaces was not specified, let InScopeNamespaces = { }
+				3. Find a Namespace ns in InScopeNamespaces, such that ns.uri == q.uri. If more than one such Namespace ns exists, the implementation may choose one of the matching Namespaces arbitrarily. NOTE implementations that preserve prefixes in qualified names may additionally constrain ns, such that ns.prefix == q.[[Prefix]]
+				4. If no such namespace ns exists
+				a. Let ns be a new namespace created as if by calling the constructor new Namespace(q.uri) NOTE implementations that preserve prefixes and qualified names may create the new namespaces as if by calling the constructor Namespace(q.[[Prefix]], q.uri)
+				5. Return ns
+			*/
+			var i:int;
+			var possibleMatch:Namespace;
+			if(!namespaces)
+				namespaces = [];
+			for(i=0;i<namespaces.length;i++)
+			{
+				if(namespaces[i].uri == _uri)
+				{
+					possibleMatch = namespaces[i];
+					if(namespaces[i].prefix == _prefix)
+						return namespaces[i];
+				}
+			}
+			if(possibleMatch)
+				return possibleMatch;
+			if(!_prefix)
+				return new Namespace(_uri);
+			return new Namespace(_prefix,_uri);
+		}
+
+	}
+}
+}
+


[08/49] git commit: [flex-asjs] [refs/heads/develop] - copy(), equals() and some fixes

Posted by ha...@apache.org.
copy(), equals() and some fixes


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a2d921d0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a2d921d0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a2d921d0

Branch: refs/heads/develop
Commit: a2d921d019e164efb6607949defdb1bcc2536784
Parents: 988296e
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 00:02:13 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 00:02:13 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/QName.as |  3 +-
 frameworks/projects/XML/as/src/XML.as   | 98 ++++++++++++++++++++++++++--
 2 files changed, 96 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2d921d0/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
index d24b7a7..2ceb487 100644
--- a/frameworks/projects/XML/as/src/QName.as
+++ b/frameworks/projects/XML/as/src/QName.as
@@ -49,6 +49,7 @@ package
 			{
 				_uri = qNameOrUri.uri;
 				_localName = qNameOrUri.localName;
+				_prefix = qNameOrUri.prefix;
 			}
 			else if(qNameOrUri is Namespace)
 			{
@@ -102,7 +103,7 @@ package
 
 		public function equals(name:QName):Boolean
 		{
-			return this.uri == name.uri && this.prefix == name.prefix && this.localName == name.localName;
+			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
 		}
 		public function matches(name:QName):Boolean
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2d921d0/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index 8be71e2..d077ae8 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -150,7 +150,7 @@ package
 			xml.setNodeKind("attribute");
 			xml.setName(att.name);
 			xml.setValue(att.value);
-			parent.
+			parent.addChild(xml);
 			return xml;
 		}
 		static private function iterateElement(node:Element,xml:XML):void
@@ -283,7 +283,7 @@ package
 
 		public function XML(xml:String = null)
 		{
-			if(xml != "")
+			if(xml)
 			{
 				var parser:DOMParser = new DOMParser();
 				// get error namespace. It's different in different browsers.
@@ -627,7 +627,23 @@ package
 				  c. Let c.[[Parent]] = y
 				6. Return y
 			*/
-			return null;
+			var i:int;
+			var xml:XML = new XML();
+			xml.setNodeKind(_nodeKind);
+			xml.setName(name());
+			xml.setValue(_value);
+			for(i-0;i<_namespaces.length;i++)
+			{
+				xml.addNamespace(new Namespace(_namespaces[i]));
+			}
+			//parent should be null by default
+			for(i=0;i<_attributes.length;i++)
+				xml.addChild(_attributes[i].copy());
+
+			for(i=0;i<_children.length;i++)
+				xml.addChild(_children[i].copy());
+			
+			return xml;
 		}
 		
 		/**
@@ -702,7 +718,7 @@ package
 			return null;
 		}
 
-		public function equals(xml:XML):Boolean
+		public function equals(xml:*):Boolean
 		{
 			/*
 				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
@@ -723,6 +739,66 @@ package
 				  b. If r == false, return false
 				10. Return true
 			*/
+			var i:int;
+			if(!(xml is XML))
+				return false;
+
+			if(xml.nodeKind() != _nodeKind)
+				return false;
+
+			if(!name().equals(xml.name()))
+				return false;
+			var selfAttrs:Array = getAttributeArray();
+			var xmlAttrs:Array = xml.getAttributeArray();
+			if(selfAttrs.length != xmlAttrs.length)
+				return false;
+			//length comparison should not be necessary because xml always has a length of 1
+			if(getValue() != xml.getValue())
+				return false;
+
+			for(i=0;i<selfAttrs.length;i++)
+			{
+				if(!xml.hasAttribute(selfAttrs[i]))
+					return false;
+			}
+			var selfChldrn:Array = getChildrenArray();
+			var xmlChildren:Array = xml.getChildrenArray();
+			if(selfChldrn.length != xmlChildren.length)
+				return false;
+			
+			for(i=0;i<selfChldrn.length;i++)
+			{
+				if(!selfChldrn[i].equals(xmlChildren[i]))
+					return false;
+			}
+			return true;
+		}
+
+		public function hasAttribute(nameOrXML:*,value:String=null):Boolean
+		{
+			if(!_attributes)
+				return false;
+			var name:QName;
+			if(nameOrXML is XML)
+			{
+				name = nameOrXML.name();
+				value = nameOrXML.getValue();
+			}
+			else
+			{
+				name = new QName(nameOrXML);
+			}
+			var i:int;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(name.matches(_attributes[i].name()))
+				{
+					if(!value)
+						return true;
+					return value == _attributes[i].getValue();
+				}
+			}
+			return false;
 		}
 
 		private function getAncestorNamespaces(namespaces:Array):Array
@@ -756,6 +832,15 @@ package
 			return namespaces;
 		}
 
+		public function getAttributeArray():Array
+		{
+			return _attributes ? _attributes.slice() : [];
+		}
+		public function getChildrenArray():Array
+		{
+			return _children ? _children.slice() : [];
+		}
+
 		public function getIndexOf(elem:XML):int
 		{
 			return _children.indexOf(elem);
@@ -772,6 +857,11 @@ package
 			}
 			return "";
 		}
+
+		public function getValue():String
+		{
+			return _value;
+		}
 		/**
 		 * Checks to see whether the XML object contains complex content.
 		 * 


[49/49] git commit: [flex-asjs] [refs/heads/develop] - XML Fixes More tests

Posted by ha...@apache.org.
XML Fixes
More tests


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d4bce998
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d4bce998
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d4bce998

Branch: refs/heads/develop
Commit: d4bce998c9ab32eccd8ea0e76ec2e8d593655f46
Parents: 33d0c00
Author: Harbs <ha...@in-tools.com>
Authored: Mon Apr 11 01:46:58 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Mon Apr 11 01:46:58 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as    | 19 +++++-
 .../projects/XML/src/main/flex/XMLList.as       | 65 ++++++++++++--------
 manualtests/XMLTest/src/MyInitialView.mxml      |  4 ++
 3 files changed, 63 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d4bce998/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index c3f212c..288fa35 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -1635,7 +1635,7 @@ package
 		}
 
 		COMPILE::JS
-		private function replaceChild(idx:int,v:*):void
+		public function replaceChildAt(idx:int,v:*):void
 		{
 			/*
 				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
@@ -1681,6 +1681,19 @@ package
 				if(_children[idx])
 					_children[idx].setParent(null);
 
+				var len:int = v.length();
+				v[0].setParent(this);
+				_children[idx] = v[0];
+				var listIdx:int = 1;
+				var chld:XML = v[0];
+				while(listIdx < len)
+				{
+					chld = v[listIdx];
+					insertChildAt(chld,idx+listIdx);
+					listIdx++;
+
+				}
+
 			}
 			else
 			{
@@ -2258,6 +2271,10 @@ package
 				ns.prefix = "";
 				declarations.push(ns);
 			}
+			if(XML.prettyPrinting)
+			{
+				strArr.push(new Array(indentLevel).join(' '));
+			}
 			strArr.push("<");
 			if(ns.prefix)
 				strArr.push(ns.prefix+":");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d4bce998/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index ef16906..0f4b2ab 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -116,29 +116,10 @@ package
 				{
 					"get": function():* { return _xmlArray[idx]; },
 					"set": function(newValue:*):void {
-						var i:int;
-						if(newValue is XML)
-						{
-							_xmlArray[idx] = newValue;
-						}
-						else if(newValue is XMLList)
-						{
-							var len:int = newValue.length();
-							for(i=0;i<len;i++)
-							{
-								// replace the first one and add each additonal one.
-								if(i==0)
-									_xmlArray[idx] = newValue[i];
-								else
-									_xmlArray.splice(idx+i,0,newValue[i]);
-							}
-						}
-						// add indexes as necessary
-						while(idx++ < _xmlArray.length)
-						{
-							if(!this.hasOwnProperty(idx))
-								addIndex(idx);
-						}
+						if(idx >= _xmlArray.length)
+							appendChild(newValue);
+						else
+							replaceChildAt(idx,newValue);
 					},
 					enumerable: true,
 					configurable: true
@@ -149,8 +130,12 @@ package
 		COMPILE::JS
 		public function appendChild(child:XML):void
 		{
-			addIndex(_xmlArray.length);
 			_xmlArray[_xmlArray.length] = child;
+			addIndex(_xmlArray.length);
+			if(_targetObject)
+			{
+				_targetObject.appendChild(child);
+			}
 		}
 		
 		/**
@@ -565,6 +550,38 @@ package
 			if(idx >= 0 && idx < _xmlArray.length)
 				_xmlArray.splice(idx,1);
 		}
+		COMPILE::JS
+		private function replaceChildAt(idx:int,child:*):void
+		{
+			var i:int;
+			var childToReplace:XML = _xmlArray[idx];
+			if(childToReplace && _targetObject)
+			{
+				_targetObject.replaceChildAt(childToReplace.childIndex,child);
+			}
+			if(child is XML)
+			{
+				_xmlArray.splice(idx+i,0,child);
+			}
+			else if(child is XMLList)
+			{
+				var len:int = child.length();
+				for(i=0;i<len;i++)
+				{
+					// replace the first one and add each additonal one.
+					if(i==0)
+						_xmlArray[idx] = child[i];
+					else
+						_xmlArray.splice(idx+i,0,child[i]);
+				}
+			}
+			// add indexes as necessary
+			while(idx++ < _xmlArray.length)
+			{
+				if(!this.hasOwnProperty(idx))
+					addIndex(idx);
+			}
+		}
 
 		private var _targetObject:*;
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d4bce998/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 34de79a..6451996 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -56,6 +56,10 @@ limitations under the License.
                 xml1.appendChild(child);
                 trace(xml1.pop[0].toString());
                 trace(xml1.pop[1].toString());
+                var pop:XMLList = xml1.pop;
+                pop[pop.length()] = new XML('<pop><child name="Fred"/></pop>');
+                trace(pop.toString());
+                trace(xml1.toString());
             }
 		]]>
 	</fx:Script>


[48/49] git commit: [flex-asjs] [refs/heads/develop] - Added XML to main asjs build

Posted by ha...@apache.org.
Added XML to main asjs build


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/33d0c00b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/33d0c00b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/33d0c00b

Branch: refs/heads/develop
Commit: 33d0c00b204433935bbaef24b117c98b12ce7a3c
Parents: 1eec8d8
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 19:39:10 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 19:39:10 2016 +0300

----------------------------------------------------------------------
 frameworks/build.xml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33d0c00b/frameworks/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 8ba8f75..8d7b174 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -94,6 +94,7 @@
         <antcall target="Network"/>
         <antcall target="Reflection"/>
         <antcall target="Storage"/>
+        <antcall target="XML"/>
     </target>
     
     <target name="fonts">
@@ -138,6 +139,7 @@
         <ant dir="${basedir}/projects/Network" target="clean"/>
         <ant dir="${basedir}/projects/Reflection" target="clean"/>
         <ant dir="${basedir}/projects/Storage" target="clean"/>
+        <ant dir="${basedir}/projects/XML" target="clean"/>
         <ant dir="${basedir}/fontsrc" target="clean"/>
 
         <!-- delete the FlashBuilder executable directories -->
@@ -229,6 +231,9 @@
     <target name="Storage" description="Clean build of Storage.swc">
         <ant dir="${basedir}/projects/Storage"/>
     </target>
+    <target name="XML" description="Clean build of XML.swc">
+        <ant dir="${basedir}/projects/XML"/>
+    </target>
 
 	<target name="flex-config" depends="playerglobal-setswfversion" description="Copy the flex config template to flex-config.xml and inject version numbers">
 		<copy file="${basedir}/flex-config-template.xml" tofile="${basedir}/flex-config.xml" overwrite="true">


[46/49] git commit: [flex-asjs] [refs/heads/develop] - Fixed QName toString()

Posted by ha...@apache.org.
Fixed QName toString()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/62e69f50
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/62e69f50
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/62e69f50

Branch: refs/heads/develop
Commit: 62e69f50dde645d2ed614d7989916ca212bc471c
Parents: 40d5bf3
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 17:56:34 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 17:56:34 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/QName.as | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/62e69f50/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
index c6886aa..70298f9 100644
--- a/frameworks/projects/XML/src/main/flex/QName.as
+++ b/frameworks/projects/XML/src/main/flex/QName.as
@@ -100,7 +100,8 @@ package
 		COMPILE::JS
 		public function toString():String
 		{
-			return _localName;
+			var uriVal:String = _uri ? _uri : "*";
+			return uriVal + "::" + _localName;
 		}
 
 		COMPILE::JS


[40/49] git commit: [flex-asjs] [refs/heads/develop] - skip extern swc for now

Posted by ha...@apache.org.
skip extern swc for now


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/75bbdd3a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/75bbdd3a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/75bbdd3a

Branch: refs/heads/develop
Commit: 75bbdd3a340bbe23b6a4ccb1db5d605b35403b4e
Parents: e2c462a
Author: Alex Harui <ah...@apache.org>
Authored: Sat Apr 9 22:57:08 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sat Apr 9 22:57:08 2016 -0700

----------------------------------------------------------------------
 frameworks/projects/XML/build.xml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75bbdd3a/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index 6251bd9..7db690a 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -37,7 +37,9 @@
         </path>
     </target>
     
-    <target name="main" depends="clean,check-falcon-home,check-falconjx-home,more-props,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc">
+    <!--<target name="main" depends="clean,check-falcon-home,check-falconjx-home,more-props,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc">
+    </target>-->
+    <target name="main" depends="clean,check-falcon-home,check-falconjx-home,more-props,compile-asjs,copy-js,compile,test-js" description="Full build of XML.swc">
     </target>
     
     <target name="test" unless="is.jenkins">
@@ -153,7 +155,7 @@
             <load-config filename="src/main/resources/compile-asjs-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-external-library-path+=${JS.SWC}" />
+            <arg value="-external-library-path=${JS.SWC}" />
             <!-- this is not on external-library path otherwise goog.requires are not generated -->
             <arg value="-library-path+=${GCL.SWC}" />
             <arg value="-define=COMPILE::AS3,false" />


[32/49] git commit: [flex-asjs] [refs/heads/develop] - Fixed Namespace URI type

Posted by ha...@apache.org.
Fixed Namespace URI type


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fe4f9c1b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fe4f9c1b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fe4f9c1b

Branch: refs/heads/develop
Commit: fe4f9c1bf8e1c61d1726f4c6c8ba026df210a2fd
Parents: 7ed59b5
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 18 14:29:04 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 18 14:29:04 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe4f9c1b/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index a611db0..cec9faf 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -307,7 +307,7 @@ package
 			{
 				var parser:DOMParser = new DOMParser();
 				// get error namespace. It's different in different browsers.
-				var errorNS:Element = parser.parseFromString('<', 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI;
+				var errorNS:String = parser.parseFromString('<', 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI;
 
 				var doc:Document = parser.parseFromString(xml, "application/xml");
 


[13/49] git commit: [flex-asjs] [refs/heads/develop] - insert methods

Posted by ha...@apache.org.
insert methods


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fd890393
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fd890393
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fd890393

Branch: refs/heads/develop
Commit: fd890393f76088afc2499a452908cf961ed23225
Parents: cf9de31
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 22:52:04 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 22:52:04 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 65 ++++++++++++++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd890393/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index c2dfbe8..479fc11 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -961,6 +961,15 @@ package
 			return _namespaces.slice();
 		}
 		
+		private function insertChildAt(child:XML,idx:int):void{
+			if(!child)
+				return;
+			var parent:XML = child.parent();
+			if(parent)
+				parent.removeChild(child);
+			child.setParent(this);
+			_children.splice(idx,0,child);
+		}
 		/**
 		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
 		 * 
@@ -969,9 +978,32 @@ package
 		 * @return 
 		 * 
 		 */
-		public function insertChildAfter(child1:Object, child2:Object):*
+		public function insertChildAfter(child1:Object, child2:Object):XML
 		{
-			return null;
+			/*
+				When the insertChildAfter method is called on an XML object x with parameters child1 and child2, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. If (child1 == null)
+				a. Call the [[Insert]] method of x with arguments "0" and child2
+				b. Return x
+				3. Else if Type(child1) is XML
+				a. For i = 0 to x.[[Length]]-1
+				i. If x[i] is the same object as child1
+				1. Call the [[Insert]] method of x with a
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return null;
+			if(!child1)
+			{
+				insertChildAt(child2,0);
+				return child2;
+			}
+			var idx:int = _children.indexOf(child1);
+			if(idx >= 0)
+			{
+				insertChildAt(child2,idx+1);
+			}
+			return child2;
 		}
 		
 		/**
@@ -982,9 +1014,34 @@ package
 		 * @return 
 		 * 
 		 */
-		public function insertChildBefore(child1:Object, child2:Object):*
+		public function insertChildBefore(child1:Object, child2:Object):XML
 		{
-			return null;
+			/*
+				When the insertChildBefore method is called on an XML object x with parameters child1 and child2, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. If (child1 == null)
+				a. Call the [[Insert]] method of x with arguments ToString(x.[[Length]]) and child2
+				b. Return x
+				3. Else if Type(child1) is XML
+				a. For i = 0 to x.[[Length]]-1
+				i. If x[i] is the same object as child1
+				1. Call the [[Insert]] method of x with arguments ToString(i) and child2
+				2. Return x
+				4. Return			
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return null;
+			if(!child1)
+			{
+				insertChildAt(child2,_children.length);
+				return child2;
+			}
+			var idx:int = _children.indexOf(child1);
+			if(idx >= 0)
+			{
+				insertChildAt(child2,idx);
+			}
+			return child2;
 		}
 		
 		/**


[43/49] git commit: [flex-asjs] [refs/heads/develop] - First working E4X test

Posted by ha...@apache.org.
First working E4X test


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5d2d0dd4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5d2d0dd4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5d2d0dd4

Branch: refs/heads/develop
Commit: 5d2d0dd43410072734f7ae164f1a487260d471ad
Parents: ff4cf69
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 15:53:07 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 15:53:07 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/QName.as |  8 ++++---
 frameworks/projects/XML/src/main/flex/XML.as   | 23 ++++++++++++++-------
 manualtests/XMLTest/src/MyInitialView.mxml     |  5 +++--
 3 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5d2d0dd4/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
index bfd7b40..c6886aa 100644
--- a/frameworks/projects/XML/src/main/flex/QName.as
+++ b/frameworks/projects/XML/src/main/flex/QName.as
@@ -57,11 +57,13 @@ package
 				if(localNameVal)
 					_localName = localNameVal.toString();
 			}
+			else if(localNameVal)
+			{
+				_localName = localNameVal;
+			}
 			else if (qNameOrUri && qNameOrUri.toString())
 			{
-				_uri = qNameOrUri.toString();
-				if(localNameVal)
-					_localName = localNameVal;
+				_localName = qNameOrUri.toString();
 			}
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5d2d0dd4/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 86a3ed1..b2222b6 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -329,6 +329,10 @@ package
 				var node:Element = doc.childNodes[0];
 				_version = doc.xmlVersion;
 				_encoding = doc.xmlEncoding;
+				_name = new QName();
+				_name.prefix = node.prefix;
+				_name.uri = node.namespaceURI;
+				_name.localName = node.localName;
 				iterateElement(node,this);
 				normalize();
 			}
@@ -2257,16 +2261,19 @@ package
 			//attributes and namespace declarations... (15-16)
 			for(i=0;i<declarations.length;i++)
 			{
-				strArr.push(" xmlns");
-				if(declarations[i].prefix)
+				var decVal:String = escapeAttributeValue(declarations[i].uri);
+				if(decVal)
 				{
-					strArr.push(":");
-					strArr.push(declarations[i].prefix);
+					strArr.push(" xmlns");
+					if(declarations[i].prefix)
+					{
+						strArr.push(":");
+						strArr.push(declarations[i].prefix);
+					}
+					strArr.push('="');
+					strArr.push(decVal);
+					strArr.push('"');
 				}
-				strArr.push('="');
-				strArr.push(escapeAttributeValue(declarations[i].uri));
-				strArr.push('"');
-
 			}
 			for(i=0;i<_attributes.length;i++)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5d2d0dd4/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index c611565..8d2fff5 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -46,8 +46,9 @@ limitations under the License.
                 var j:int;
                 var m:int;
                 var xml1:XML = <foo baz="true"/>;
-                trace(xml1);
-                trace(xml1.baz);
+                trace(xml1.toXMLString());
+                var baz:XMLList = xml1.@baz;
+                trace(xml1.@baz.toString());
 
             }
 		]]>


[19/49] git commit: [flex-asjs] [refs/heads/develop] - Changed XML to match the new folder structure

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
new file mode 100644
index 0000000..69d94b5
--- /dev/null
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -0,0 +1,2237 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class XML
+	{
+		/*
+		 * Dealing with namespaces:
+		 * If the name is qualified, it has a prefix. Otherwise, the prefix is null.
+		 * Additionally, it has a namespaceURI. Otherwise the namespaceURI is null.
+		 * the prefix together with the namespaceURI form a QName
+		*/
+
+		static private var defaultNamespace:Namespace;
+
+		static public function setDefaultNamespace(ns:*)
+		{
+			if(!ns)
+				defaultNamespace = null;
+			else
+				ns = new Namespace(ns);
+		}
+
+		/**
+		 * [static] Determines whether XML comments are ignored when XML objects parse the source XML data.
+		 *  
+		 */
+		static public var ignoreComments:Boolean = true;
+		
+		/**
+		 * [static] Determines whether XML processing instructions are ignored when XML objects parse the source XML data.
+		 *  
+		 */
+		static public var ignoreProcessingInstructions:Boolean = true;
+		
+		/**
+		 * [static] Determines whether white space characters at the beginning and end of text nodes are ignored during parsing.
+		 *  
+		 */
+		static public var ignoreWhitespace:Boolean = true;
+		
+		static private var _prettyIndent:int = 2;
+		/**
+		 * [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true.
+		 * 
+		 */
+		static public function set prettyIndent(value:int):void
+		{
+			_prettyIndent = value;
+			_indentStr = "";
+			for(var i:int = 0; i < value; i++)
+			{
+				_indentStr = _indentStr + INDENT_CHAR;
+			}
+		}
+
+		static public function get prettyIndent():int
+		{
+			return _prettyIndent;
+		}
+
+		static private var _indentStr:String = "  ";
+		static private var INDENT_CHAR:String = " ";
+		
+		/**
+		 * [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
+		 * 
+		 */
+		static public var prettyPrinting:Boolean = true;
+		
+		static private function escapeAttributeValue(value:String):String
+		{
+			var outArr:Array = [];
+			var arr = value.split("");
+			var len:int = arr.length;
+			for(var i:int=0;i<len;i++)
+			{
+				switch(arr[i])
+				{
+					case "<":
+						outArr[i] = "&lt;";
+						break;
+					case "&":
+						outArr[i] = "&amp;";
+						break;
+					case "\u000A":
+						outArr[i] = "&#xA;";
+						break;
+					case "\u000D":
+						outArr[i] = "&#xD;";
+						break;
+					case "\u0009":
+						outArr[i] = "&#x9;";
+						break;
+					default:
+						outArr[i] = arr[i];
+						break;
+				}
+			}
+			return outArr.join("");
+		}
+
+		static private function escapeElementValue(value:String):String
+		{
+			var outArr:Array = [];
+			var arr = value.split("");
+			for(var i=0;i<arr.length;i++)
+			{
+				switch(arr[i])
+				{
+					case "<":
+						outArr[i] = "&lt;";
+						break;
+					case ">":
+						outArr[i] = "&gt;";
+						break;
+					case "&":
+						outArr[i] = "&amp;";
+						break;
+					default:
+						outArr[i] = arr[i];
+						break;
+				}
+			}
+			return outArr.join("");
+		}
+
+		static private function insertAttribute(att:Attr,parent:XML):XML()
+		{
+			var xml:XML = new XML();
+			xml.setParent(parent);
+			xml.setNodeKind("attribute");
+			xml.setName(att.name);
+			xml.setValue(att.value);
+			parent.addChild(xml);
+			return xml;
+		}
+		static private function iterateElement(node:Element,xml:XML):void
+		{
+			// add attributes
+			for(i=0;i<node.attributes.length;i++)
+			{
+				insertAttribute(node.attributes[i],xml);
+			}
+			// loop through childNodes which will be one of:
+			// text, cdata, processing instrution or comment and add them as children of the element
+			for(i=0;i<node.childNodes.length;i++)
+			{
+				var child:XML = fromNode(node.childNodes[i]);
+				xml.addChild(child);
+			}
+		}
+		/**
+		* returns an XML object from an existing node without the need to parse the XML.
+		* The new XML object is not normalized
+		*/
+		static private function fromNode(node:Element):XML
+		{
+			var xml:XML;
+			var i:int;
+			var data:* = node.nodeValue;
+			switch(node.nodeType)
+			{
+				case 1:
+					//ELEMENT_NODE
+					xml = new XML();
+					xml.setNodeKind("element");
+					iterateElement(node,xml);
+					break;
+				//case 2:break;// ATTRIBUTE_NODE (handled separately)
+				case 3:
+					//TEXT_NODE
+					xml = new XML();
+					xml.setNodeKind("text");
+					xml.setValue(data);
+					break;
+				case 4:
+					//CDATA_SECTION_NODE
+					xml = new XML();
+					xml.setNodeKind("text");
+					data = "<![CDATA[" + data + "]]>";
+					xml.setValue(data);
+					break;
+				//case 5:break;//ENTITY_REFERENCE_NODE
+				//case 6:break;//ENTITY_NODE
+				case 7:
+					//PROCESSING_INSTRUCTION_NODE
+					xml = new XML();
+					xml.setNodeKind("processing-instruction");
+					xml.setName(node.nodeName);
+					xml.setValue(data);
+					break;
+				case 8:
+					//COMMENT_NODE
+					xml = new XML();
+					xml.setNodeKind("comment");
+					xml.setValue(data);
+					break;
+				//case 9:break;//DOCUMENT_NODE
+				//case 10:break;//DOCUMENT_TYPE_NODE
+				//case 11:break;//DOCUMENT_FRAGMENT_NODE
+				//case 12:break;//NOTATION_NODE
+				default:
+					throw new TypeError("Unknown XML node type!");
+					break;
+			}
+			return xml;
+		}
+
+		static private function namespaceInArray(ns:Namespace,arr:Array,considerPrefix:Boolean=true):Boolean
+		{
+			if(!arr)
+				return false;
+			var i:int;
+			for(i=0;i<arr.length;i++)
+			{
+				if(ns.uri == arr[i].uri)
+				{
+					if(!considerPrefix)
+						return true;
+					if(ns.prefix == arr[i].prefix)
+						return true;
+				}
+			}
+			return false;
+		}
+
+		static private function trimXMLWhitespace(value:String):String
+		{
+			return value.replace(/^\s+|\s+$/gm,'');
+		}
+
+		/**
+		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @return 
+		 * 
+		 */
+		static public function defaultSettings():Object
+		{
+			return {
+			    ignoreComments : true,
+			    ignoreProcessingInstructions : true,
+			    ignoreWhitespace : true,
+			    prettyIndent : 2,
+			    prettyPrinting : true
+			}
+		}
+		
+		/**
+		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @param rest
+		 * 
+		 */
+		static public function setSettings(value:Object):void
+		{
+			if(!value)
+				return;
+				
+		    ignoreComments = value.ignoreComments === undefined ? ignoreComments : value.ignoreComments;
+		    ignoreProcessingInstructions = value.ignoreProcessingInstructions === undefined ? ignoreProcessingInstructions : value.ignoreProcessingInstructions;
+		    ignoreWhitespace = value.ignoreWhitespace === undefined ? ignoreWhitespace : value.ignoreWhitespace;
+		    prettyIndent = value.prettyIndent === undefined ? prettyIndent : value.prettyIndent;
+		    prettyPrinting = value.prettyPrinting === undefined ? prettyPrinting : value.prettyPrinting;
+		}
+		
+		/**
+		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @return 
+		 * 
+		 */
+		static public function settings():Object
+		{
+			return {
+			    ignoreComments : ignoreComments,
+			    ignoreProcessingInstructions : ignoreProcessingInstructions,
+			    ignoreWhitespace : ignoreWhitespace,
+			    prettyIndent : prettyIndent,
+			    prettyPrinting : prettyPrinting
+			}
+		}
+
+
+		public function XML(xml:String = null)
+		{
+			if(xml)
+			{
+				var parser:DOMParser = new DOMParser();
+				// get error namespace. It's different in different browsers.
+				var errorNS:Element = parser.parseFromString('<', 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI;
+
+				var doc:Document = parser.parseFromString(xml, "application/xml");
+
+				//check for errors
+				if(doc.getElementsByTagNameNS(errorNS, 'parsererror').length > 0)
+        			throw new Error('XML parse error');
+    			
+				var node:Element = doc.childNodes[0];
+				_version = doc.xmlVersion;
+				_encoding = doc.xmlEncoding;
+				iterateElement(node,this);
+				normalize();
+			}
+			//need to deal with errors https://bugzilla.mozilla.org/show_bug.cgi?id=45566
+			
+			// get rid of nodes we do not want 
+
+			//loop through the child nodes and build XML obejcts for each.
+			Object.defineProperty(this,"0",
+				{
+					get: function() { return this; },
+					set: function(newValue:*) {
+					},
+					enumerable: true,
+					configurable: true
+				}
+			);
+
+		}
+		
+		private var _children:Array;
+		private var _attributes:Array;
+		private var _processingInstructions:Array;
+		private var _parentXML:XML;
+		private var _name:*;
+		private var _value:String;
+		private var _version:String;
+		private var _encoding:String;
+		private var _appliedNamespace:Namespace;
+		private var _namespaces:Array = [];
+
+
+		/**
+		 * @private
+		 * 
+		 * Similar to appendChild, but accepts all XML types (text, comment, processing-instruction, attribute, or element)
+		 *
+		 * 	
+		 */
+		public function addChild(child:XML):void
+		{
+			if(!child)
+				return;
+			
+			child.setParent(this);
+			if(child.nodeKind() =="attribute")
+			{
+				if(!_attributes)
+					_attributes = [];
+
+				_attributes.push(child);
+
+			}
+			else
+				_children.push(child);
+			normalize();
+		}
+
+
+		/**
+		 * Adds a namespace to the set of in-scope namespaces for the XML object.
+		 *
+		 * @param ns
+		 * @return 
+		 * 	
+		 */
+		public function addNamespace(ns:Namespace):XML
+		{
+			/*
+				When the [[AddInScopeNamespace]] method of an XML object x is called with a namespace N, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", “attribute”}, return
+				2. If N.prefix != undefined
+				  a. If N.prefix == "" and x.[[Name]].uri == "", return
+				  b. Let match be null
+				  c. For each ns in x.[[InScopeNamespaces]]
+				    i. If N.prefix == ns.prefix, let match = ns
+				  d. If match is not null and match.uri is not equal to N.uri
+				    i. Remove match from x.[[InScopeNamespaces]]
+				  e. Let x.[[InScopeNamespaces]] = x.[[InScopeNamespaces]] ∪ { N }
+				  f. If x.[[Name]].[[Prefix]] == N.prefix
+				    i. Let x.[[Name]].prefix = undefined
+				  g. For each attr in x.[[Attributes]]
+				    i. If attr.[[Name]].[[Prefix]] == N.prefix, let attr.[[Name]].prefix = undefined
+				3. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return this;
+			if(ns.prefix === undefined)
+				return this;
+			if(ns.prefix == "" && name().uri == "")
+				return this;
+			var match:Namespace = null;
+			var i:int;
+			for(i=0;i<_namespaces.length;i++)
+			{
+				if(_namespaces[i].prefix == ns.prefix)
+				{
+					match = _namespaces[i];
+					break;
+				}
+			}
+			if(match)
+				_namespaces[i] = ns;
+			else
+				_namespaces.push(ns);
+
+			if(ns.prefix == name().prefix)
+				name().prefix = undefined;
+
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_attributes[i].name().prefix == ns.prefix)
+					_attributes[i].name().prefix = undefined;
+			}
+			return this;
+		}
+		
+		/**
+		 * Appends the given child to the end of the XML object's properties.
+		 *
+		 * @param child
+		 * @return 
+		 * 
+		 */
+		public function appendChild(child:XML):XML
+		{
+			/*
+				[[Insert]] (P, V)
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
+				5. Let n = 1
+				6. If Type(V) is XMLList, let n = V.[[Length]]
+				7. If n == 0, Return
+				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
+				9. Let x.[[Length]] = x.[[Length]] + n
+				10. If Type(V) is XMLList
+				  a. For j = 0 to V.[[Length-1]]
+				    i. V[j].[[Parent]] = x
+				    ii. x[i + j] = V[j]
+				11. Else
+				  a. Call the [[Replace]] method of x with arguments i and V
+				12. Return
+			*/
+			child.setParent(this);
+			
+			_children.push(child);
+			normalize();
+			return child;
+		}
+		
+		
+		/**
+		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
+		 *
+		 * @param attributeName
+		 * @return 
+		 * 
+		 */
+		public function attribute(attributeName:*):XMLList
+		{
+			var i:int;
+			if(attributeName == "*")
+				return attributes();
+
+			attributeName = toAttributeName(attributeName);
+			var list:XMLList = new XMLList();
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_atributes[i].name().matches(attributeName))
+					list.appendChild(_atributes[i]);
+			}
+			list.targetObject = this;
+			list.targetProperty = attributeName;
+			return list;
+		}
+		
+		/**
+		 * Returns a list of attribute values for the given XML object.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function attributes():XMLList
+		{
+			var list:XMLList = new XMLList();
+			for(i=0;i<_attributes.length;i++)
+				list.appendChild(_atributes[i]);
+
+			list.targetObject = this;
+			return list;
+		}
+		
+		/**
+		 * Lists the children of an XML object.
+		 *
+		 * @param propertyName
+		 * @return 
+		 * 
+		 */
+		public function child(propertyName:Object):XMLList
+		{
+			/*
+			 * 
+			When the [[Get]] method of an XML object x is called with property name P, the following steps are taken:
+			1. If ToString(ToUint32(P)) == P
+			  a. Let list = ToXMLList(x)
+			  b. Return the result of calling the [[Get]] method of list with argument P
+			2. Let n = ToXMLName(P)
+			3. Let list be a new XMLList with list.[[TargetObject]] = x and list.[[TargetProperty]] = n
+			4. If Type(n) is AttributeName
+			  a. For each a in x.[[Attributes]]
+			    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+			      1. Call the [[Append]] method of list with argument a
+			  b. Return list
+			5. For (k = 0 to x.[[Length]]-1)
+			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri)))
+			    i. Call the [[Append]] method of list with argument x[k]
+			6. Return list
+			*/
+			var i:int;
+			var list:XMLList = new XMLList();
+			if(parseInt(name,10).toString() == propertyName)
+			{
+				if(propertyName != "0")
+					return undefined;
+				list.appendChild(this);
+				list.targetObject = this;
+				return list;
+			}
+			propertyName = toXMLName(propertyName);
+			if(propertyName.isAttribute)
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(propertyName.matches(_attributes[i].name()))
+						list.append(_attributes[i]);
+				}
+			}
+			else
+			{
+				for(i=0;i<_children.length;i++)
+				{
+					if(propertyName.matches(_children[i].name()))
+						list.append(_children[i]);
+				}
+			}
+			list.targetObject = this;
+			list.targetProperty = propertyName;
+			return list;
+		}
+		
+		/**
+		 * Identifies the zero-indexed position of this XML object within the context of its parent.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function childIndex():int
+		{
+			if(!parent)
+				return -1;
+
+			return parent.getIndexOf(this);
+		}
+		
+		/**
+		 * Lists the children of the XML object in the sequence in which they appear.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function children():XMLList
+		{
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+				list.append(_children[i]);
+
+			list.targetObject = this;
+			return list;
+		}
+		
+		/**
+		 * Lists the properties of the XML object that contain XML comments.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function comments():XMLList
+		{
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "comment" && propertyName.matches(_children[i].name()))
+					list.append(_children[i]);
+			}
+			list.targetObject = this;
+			return list;
+		}
+		
+		public function concat(list:*):XMLList
+		{
+			if(list is XML)
+			{
+				var newList:XMLList = new XMLList();
+				newList.appendChild(list);
+				list = newList;
+			}
+			if(!(list is XMLList))
+				throw new TypeError("invalid type");
+
+			var retVal:XMLList = new XMLList();
+			retVal.appendChild(this);
+			var item:XML;
+			for each(item in list)
+				retVal.appendChild(item);
+				
+			return retVal;
+		}
+
+		/**
+		 * Compares the XML object against the given value parameter.
+		 *
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function contains(value:XML):Boolean
+		{
+			return this.equals(value);
+		}
+		
+		/**
+		 * Returns a copy of the given XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function copy():XML
+		{
+			/*
+				When the [[DeepCopy]] method of an XML object x is called, the following steps are taken:
+				1. Let y be a new XML object with y.[[Prototype]] = x.[[Prototype]], y.[[Class]] = x.[[Class]], y.[[Value]] = x.[[Value]], y.[[Name]] = x.[[Name]], y.[[Length]] = x.[[Length]]
+				2. For each ns in x.[[InScopeNamespaces]]
+				  a. Let ns2 be a new Namespace created as if by calling the constructor new Namespace(ns)
+				  b. Let y.[[InScopeNamespaces]] = y.[[InScopeNamespaces]] ∪ { ns2 }
+				3. Let y.[[Parent]] = null
+				4. For each a in x.[[Attributes]]
+				  a. Let b be the result of calling the [[DeepCopy]] method of a
+				  b. Let b.[[Parent]] = y
+				  c. Let y.[[Attributes]] = y.[[Attributes]] ∪ { b }
+				5. For i = 0 to x.[[Length]]-1
+				  a. Let c be the result of calling the [[DeepCopy]] method of x[i]
+				  b. Let y[i] = c
+				  c. Let c.[[Parent]] = y
+				6. Return y
+			*/
+			var i:int;
+			var xml:XML = new XML();
+			xml.setNodeKind(_nodeKind);
+			xml.setName(name());
+			xml.setValue(_value);
+			for(i-0;i<_namespaces.length;i++)
+			{
+				xml.addNamespace(new Namespace(_namespaces[i]));
+			}
+			//parent should be null by default
+			for(i=0;i<_attributes.length;i++)
+				xml.addChild(_attributes[i].copy());
+
+			for(i=0;i<_children.length;i++)
+				xml.addChild(_children[i].copy());
+			
+			return xml;
+		}
+
+		private function deleteChildAt(idx:int):void
+		{
+
+		}
+		
+		/**
+		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function descendants(name:Object = "*"):XMLList
+		{
+			/*
+				When the [[Descendants]] method of an XML object x is called with property name P, the following steps are taken:
+				1. Let n = ToXMLName(P)
+				2. Let list be a new XMLList with list.[[TargetObject]] = null
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri ))
+				      1. Call the [[Append]] method of list with argument a
+				4. For (k = 0 to x.[[Length]]-1)
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
+				    i. Call the [[Append]] method of list with argument x[k]
+				  b. Let dq be the resultsof calling the [[Descendants]] method of x[k] with argument P
+				  c. If dq.[[Length]] > 0, call the [[Append]] method of list with argument dq
+				5. Return list
+			*/
+			var i:int;
+			name = toXMLName(name);
+			var list:XMLList = new XMLList();
+			if(name.isAttribute)
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(name.matches(_attributes[i].name()))
+						list.appendChild(_attributes[i]);
+				}
+				for(i=0;i<_children.length;i++)
+				{
+					if(_children[i].nodeKind() == "element")
+					{
+						if(name.matches(_children[i].name()))
+							list.appendChild(_children[i]);
+
+						list = list.concat(_children[i].descendants());
+					} 
+				}
+			}
+			return list;
+		}
+		
+		/**
+		 * Lists the elements of an XML object. (handles E4X dot notation)
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function elements(name:Object = "*"):XMLList
+		{
+			name = toXMLName(name);
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element" && name.matches(_children[i].name()))
+					list.append(_children[i]);
+			}
+
+			list.targetObject = this;
+			list.targetProperty = name;
+			return list;
+
+			return null;
+		}
+
+		public function equals(xml:*):Boolean
+		{
+			/*
+				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
+				1. If Type(V) is not XML, return false
+				2. If x.[[Class]] is not equal to V.[[Class]], return false
+				3. If x.[[Name]] is not null
+				  a. If V.[[Name]] is null, return false
+				  b. If x.[[Name]].localName is not equal to V.[[Name]].localName, return false
+				  c. If x.[[Name]].uri is not equal to V.[[Name]].uri, return false
+				4. Else if V.[[Name]] is not null, return false
+				5. If x.[[Attributes]] does not contain the same number of items as V.[[Attributes]], return false
+				6. If x.[[Length]] is not equal to V.[[Length]], return false
+				7. If x.[[Value]] is not equal to y[[Value]], return false
+				8. For each a in x.[[Attributes]]
+				  a. If V.[[Attributes]] does not contain an attribute b, such that b.[[Name]].localName == a.[[Name]].localName, b.[[Name]].uri == a.[[Name]].uri and b.[[Value]] == a.[[Value]], return false
+				9. For i = 0 to x.[[Length]]-1
+				  a. Let r be the result of calling the [[Equals]] method of x[i] with argument V[i]
+				  b. If r == false, return false
+				10. Return true
+			*/
+			var i:int;
+			if(!(xml is XML))
+				return false;
+
+			if(xml.nodeKind() != _nodeKind)
+				return false;
+
+			if(!name().equals(xml.name()))
+				return false;
+			var selfAttrs:Array = getAttributeArray();
+			var xmlAttrs:Array = xml.getAttributeArray();
+			if(selfAttrs.length != xmlAttrs.length)
+				return false;
+			//length comparison should not be necessary because xml always has a length of 1
+			if(getValue() != xml.getValue())
+				return false;
+
+			for(i=0;i<selfAttrs.length;i++)
+			{
+				if(!xml.hasAttribute(selfAttrs[i]))
+					return false;
+			}
+			var selfChldrn:Array = getChildrenArray();
+			var xmlChildren:Array = xml.getChildrenArray();
+			if(selfChldrn.length != xmlChildren.length)
+				return false;
+
+			for(i=0;i<selfChldrn.length;i++)
+			{
+				if(!selfChldrn[i].equals(xmlChildren[i]))
+					return false;
+			}
+			return true;
+		}
+
+		public function hasAttribute(nameOrXML:*,value:String=null):Boolean
+		{
+			if(!_attributes)
+				return false;
+			var name:QName;
+			if(nameOrXML is XML)
+			{
+				name = nameOrXML.name();
+				value = nameOrXML.getValue();
+			}
+			else
+			{
+				name = new QName(nameOrXML);
+			}
+			var i:int;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(name.matches(_attributes[i].name()))
+				{
+					if(!value)
+						return true;
+					return value == _attributes[i].getValue();
+				}
+			}
+			return false;
+		}
+
+		private function getAncestorNamespaces(namespaces:Array):Array
+		{
+			//don't modify original
+			namespaces = namespaces.slice();
+			var nsIdx:int;
+			var pIdx:int;
+			if(_parentXML)
+			{
+				var parentNS:Array = _parentXML.inScopeNamespaces();
+				var len:int = parentNS.length;
+				for(pIdx=0;pIdx<len;pIdx++)
+				{
+					var curNS:Namespace = parentNS[pIdx];
+					var doInsert:Boolean = true;
+					for(nsIdx=0;nsIdx<namespaces.length;nsIdx++)
+					{
+						if(curNS.uri == namespaces[nsIdx].uri && curNS.prefix == namespaces[nsIdx].prefix)
+						{
+							doInsert = false;
+							break;
+						}
+					}
+					if(doInsert)
+						namespaces.push(curNS);
+
+				}
+				namespaces = _parentXML.getAncestorNamespaces(namespaces);
+			}
+			return namespaces;
+		}
+
+		public function getAttributeArray():Array
+		{
+			return _attributes ? _attributes.slice() : [];
+		}
+		public function getChildrenArray():Array
+		{
+			return _children ? _children.slice() : [];
+		}
+
+		public function getIndexOf(elem:XML):int
+		{
+			return _children.indexOf(elem);
+		}
+		
+		private function getURI(prefix:String):String
+		{
+			var i:int;
+			var namespaces:Array = getAncestorNamespaces(_namespaces);
+			for(i=0;i<namespaces.length;i++)
+			{
+				if(namespaces[i].prefix == prefix)
+					return namespaces[i].uri;
+			}
+			return "";
+		}
+
+		public function getValue():String
+		{
+			return _value;
+		}
+		/**
+		 * Checks to see whether the XML object contains complex content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasComplexContent():Boolean
+		{
+			/*
+				When the hasComplexContent method is called on an XML object x, the following steps are taken:
+				1. If x.[[Class]] ∈ {"attribute", "comment", "processing-instruction", "text"}, return false
+				2. For each property p in x
+				a. If p.[[Class]] == "element", return true
+				3. Return false
+			*/
+			if(_nodeKind == "attribute" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "text")
+				return false;
+			var i:int;
+			for(i=0i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					return true;
+			}
+			return false;
+		}
+
+		public function hasOwnProperty(p:*):Boolean
+		{
+			/*
+				When the [[HasProperty]] method of an XML object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P
+				  a. Return (P == "0")
+				2. Let n = ToXMLName(P)
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+				      1. Return true
+				  b. Return false
+				4. For (k = 0 to x.[[Length]]-1)
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or (x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
+				    i. Return true
+				5. Return false
+			*/
+			if(parseInt(p,10).toString() == p)
+				return p == "0";
+			var name:QName = toXMLName(p);
+			var i:int;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_attributes[i].name().matches(name))
+					return true;
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() != "element")
+					continue;
+				if(_children[i].name().matches(name))
+					return true;
+			}
+			return false;
+		}
+				
+		/**
+		 * Checks to see whether the XML object contains simple content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasSimpleContent():Boolean
+		{
+			/*
+				When the hasSimpleContent method is called on an XML object x, the following steps are taken:
+				1. If x.[[Class]] ∈ {"comment", "processing-instruction"}, return false
+				2. For each property p in x
+				a. If p.[[Class]] == "element", return false
+				3. Return true
+			*/
+			if(_nodeKind == "comment" || _nodeKind == "processing-instruction")
+				return false;
+			var i:int;
+			for(i=0i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					return false;
+			}
+			return true;
+		}
+		
+		/**
+		 * Lists the namespaces for the XML object, based on the object's parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function inScopeNamespaces():Array
+		{
+			return _namespaces.slice();
+		}
+		
+		private function insertChildAt(child:XML,idx:int):void{
+			/*
+				When the [[Insert]] method of an XML object x is called with property name P and value V, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
+				5. Let n = 1
+				6. If Type(V) is XMLList, let n = V.[[Length]]
+				7. If n == 0, Return
+				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
+				9. Let x.[[Length]] = x.[[Length]] + n
+				10. If Type(V) is XMLList
+				  a. For j = 0 to V.[[Length-1]]
+				    i. V[j].[[Parent]] = x
+				    ii. x[i + j] = V[j]
+				11. Else
+				  a. Call the [[Replace]] method of x with arguments i and V
+				12. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return;
+			if(!child)
+				return;
+			var parent:XML = child.parent();
+			if(parent)
+				parent.removeChild(child);
+			child.setParent(this);
+			_children.splice(idx,0,child);
+		}
+		/**
+		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildAfter(child1:Object, child2:Object):XML
+		{
+			/*
+				When the insertChildAfter method is called on an XML object x with parameters child1 and child2, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. If (child1 == null)
+				a. Call the [[Insert]] method of x with arguments "0" and child2
+				b. Return x
+				3. Else if Type(child1) is XML
+				a. For i = 0 to x.[[Length]]-1
+				i. If x[i] is the same object as child1
+				1. Call the [[Insert]] method of x with a
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return null;
+			if(!child1)
+			{
+				insertChildAt(child2,0);
+				return child2;
+			}
+			var idx:int = _children.indexOf(child1);
+			if(idx >= 0)
+			{
+				insertChildAt(child2,idx+1);
+			}
+			return child2;
+		}
+		
+		/**
+		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildBefore(child1:Object, child2:Object):XML
+		{
+			/*
+				When the insertChildBefore method is called on an XML object x with parameters child1 and child2, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. If (child1 == null)
+				a. Call the [[Insert]] method of x with arguments ToString(x.[[Length]]) and child2
+				b. Return x
+				3. Else if Type(child1) is XML
+				a. For i = 0 to x.[[Length]]-1
+				i. If x[i] is the same object as child1
+				1. Call the [[Insert]] method of x with arguments ToString(i) and child2
+				2. Return x
+				4. Return			
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return null;
+			if(!child1)
+			{
+				insertChildAt(child2,_children.length);
+				return child2;
+			}
+			var idx:int = _children.indexOf(child1);
+			if(idx >= 0)
+			{
+				insertChildAt(child2,idx);
+			}
+			return child2;
+		}
+		
+		/**
+		 * For XML objects, this method always returns the integer 1.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function length():int
+		{
+			return 1;
+		}
+		
+		/**
+		 * Gives the local name portion of the qualified name of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function localName():Object
+		{
+			return name().localName;
+		}
+
+		private var _name:QName;
+		
+		/**
+		 * Gives the qualified name for the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function name():Object
+		{
+			if(!_name)
+				_name = new QName();
+			return _name;
+		}
+		
+		/**
+		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
+		 * 
+		 * @param prefix
+		 * @return 
+		 * 
+		 */
+		public function namespace(prefix:String = null):*
+		{
+			/*
+				When the namespace method is called on an XML object x with zero arguments or one argument prefix, the following steps are taken:
+				1. Let y = x
+				2. Let inScopeNS = { }
+				3. While (y is not null)
+				  a. For each ns in y.[[InScopeNamespaces]]
+				    i. If there exists no n ∈ inScopeNS, such that n.prefix == ns.prefix
+				      1. Let inScopeNS = inScopeNS ∪ { ns }
+				  b. Let y = y.[[Parent]]
+				4. If prefix was not specified
+				  a. If x.[[Class]] ∈ {"text", "comment", "processing-instruction"}, return null
+				  b. Return the result of calling the [[GetNamespace]] method of x.[[Name]] with argument inScopeNS
+				5. Else
+				  a. Let prefix = ToString(prefix)
+				  b. Find a Namespace ns ∈ inScopeNS, such that ns.prefix = prefix. If no such ns exists, let ns = undefined.
+				  c. Return ns
+			*/
+			var i:int;
+			if(prefix)
+			{
+				for(i=0;i<_namespaces.length;i++)
+				{
+					if(_namespaces[i].prefix == prefix)
+						return _namespaces[i];
+				}
+				if(_parent)
+					return _parent.namespace(prefix);
+				return undefined;
+			}
+			//no prefix. get the namespace of our object
+			if(_nodeKind == "text" || _nodeKind ==  "comment" || _nodeKind ==  "processing-instruction")
+				return null;
+			return name().getNamespace(namespaceDeclarations());
+		}
+		
+		/**
+		 * Lists namespace declarations associated with the XML object in the context of its parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function namespaceDeclarations():Array
+		{
+			/*
+				When the namespaceDeclarations method is called on an XML object x, the following steps are taken:
+				1. Let a be a new Array created as if by calling the constructor, new Array()
+				2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return a
+				3. Let y = x.[[Parent]]
+				4. Let ancestorNS = { }
+				5. While (y is not null)
+				  a. For each ns in y.[[InScopeNamespaces]]
+				    i. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix
+				      1. Let ancestorNS = ancestorNS ∪ { ns }
+				  b. Let y = y.[[Parent]]
+				6. Let declaredNS = { }
+				7. For each ns in x.[[InScopeNamespaces]]
+				  a. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix and n.uri == ns.uri
+				    i. Let declaredNS = declaredNS ∪ { ns }
+				8. Let i = 0
+				9. For each ns in declaredNS
+				  a. Call the [[Put]] method of a with arguments ToString(i) and ns
+				  b. Let i = i + 1
+				10. Return a
+			*/
+			var retVal:Array = [];
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return retVal;
+			var declaredNS:Array = _namespaces.slice();
+			var parent:XML = _parent;
+			while(parent)
+			{
+				var parentNS:Array = parent.inScopeNamespaces();
+				var idx:int;
+				var pIdx:int;
+				for(pIdx=0;i<parentNS.length;pIdx++)
+				{
+					var uri:String = parentNS[pIdx].uri;
+					var prefix:String = parentNS[pIdx].prefix;
+					for(idx=0;i<declaredNS.length;idx++)
+					{
+						if(declaredNS[idx].uri == uri && declaredNS[idx].prefix == prefix)
+						{
+							declaredNS.push(parentNS[pIdx]);
+							break;
+						}
+					}
+				}
+				parent = parent.parent();
+			}
+
+			return declaredNS;
+		}
+		
+		private var _nodeKind:String = "element";
+		/**
+		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
+		 * @return 
+		 * 
+		 */
+		public function nodeKind():String
+		{
+			return _nodeKind;
+		}
+		
+		/**
+		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function normalize():XML
+		{
+			var len:int = _children.length-1;
+			var lastChild:XML;
+			for(var i:int=len;i>=0;i--)
+			{
+				var child:XML = _children[i];
+				// can we have a null child?
+
+				if(child.nodeKind() == "element")
+				{
+					child.normalize();
+				}
+				else if(child.nodeKind() == "text")
+				{
+					if(lastChild && lastChild.nodeKind() == "text")
+					{
+						child.setValue(child.text() + lastChild.text());
+						deleteChildAt(i+1);
+					}
+					if(!child.text())
+						deleteChildAt(i);
+				}
+				lastChild = child;
+			}
+			return this;
+		}
+		
+		/**
+		 * Returns the parent of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function parent():*
+		{
+			return _parent;
+		}
+		
+		/**
+		 * Inserts the provided child object into the XML element before any existing XML properties for that element.
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function prependChild(child:XML):XML
+		{
+			child.setParent(this);
+			
+			_children.unshift(child);
+
+			return child;
+		}
+		
+		/**
+		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function processingInstructions(name:String = "*"):XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Removes the given chid for this object and returns the removed child.
+		 * 
+		 * @param child
+		 * @return 
+		 * 
+		 */
+		public function removeChild(child:XML):Boolean
+		{
+			/*
+				When the [[Delete]] method of an XML object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P, throw a TypeError exception
+				NOTE this operation is reserved for future versions of E4X.
+				2. Let n = ToXMLName(P)
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+				      1. Let a.[[Parent]] = null
+				      2. Remove the attribute a from x.[[Attributes]]
+				  b. Return true
+				4. Let dp = 0
+				5. For q = 0 to x.[[Length]]-1
+				  a. If ((n.localName == "*") or (x[q].[[Class]] == "element" and x[q].[[Name]].localName == n.localName)) and ((n.uri == null) or (x[q].[[Class]] == “element” and n.uri == x[q].[[Name]].uri ))
+				    i. Let x[q].[[Parent]] = null
+				    ii. Remove the property with the name ToString(q) from x
+				    iii. Let dp = dp + 1
+				  b. Else
+				    i. If dp > 0, rename property ToString(q) of x to ToString(q – dp)
+				6. Let x.[[Length]] = x.[[Length]] - dp
+				7. Return true.
+			*/
+			var removed:XML;
+			if(!child)
+				return false;
+			if(!_attributes)
+				return false;
+
+			if(!(child is XML))
+				return removeChildByName(child);
+			
+			if(child.nodeKind() == "attribute")
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(child.equals(_attributes[i]))
+					{
+						removed = _attributes[i];
+						removed.setParent(null);
+						_attributes.splice(i,1);
+						return true;
+					}
+				}
+			}
+			var idx:int = _children.indexOf(child);
+			if(idx < 0)
+				return false;
+			removed = _children.splice(idx,1);
+			child.setParent(null);
+			return removed;
+		}
+		private function removeChildByName(name:*):Boolean
+		{
+			var i:int;
+			name = toXMLName(name);
+			child = null;
+			var removedItem:Boolean = false;
+			if(name.isAttribute)
+			{
+				if(!_attributes)
+					return false;
+
+				for(i=_attributes.length-1;i>=0;i--)
+				{
+					if(_attributes[i].name().matches(name))
+					{
+						child = _attributes[i];
+						child.setParent(null);
+						_attributes.splice(i,1);
+						removedItem = true;
+					}
+				}
+				return removedItem;
+			}
+			//QUESTION am I handling non-elements correctly?
+			if(!_children)
+				return false;
+			for(i=_children.length-1;i>=0;i--)
+			{
+				if(_children[i].name().matches(name))
+				{
+					child = _children[i];
+					child.setParent(null);
+					_children.splice(i,1);
+					removedItem = true;
+				}
+			}
+			return removedItem;
+		}
+		public function removeChildAt(index:int):void
+		{
+			/*
+				When the [[DeleteByIndex]] method of an XML object x is called with property name P, the following steps are taken:
+				1. Let i = ToUint32(P)
+				2. If ToString(i) == P
+				  a. If i is less than x.[[Length]]
+				    i. If x has a property with name P
+				      1. Let x[P].[[Parent]] = null
+				      2. Remove the property with the name P from x
+				    ii. For q = i+1 to x.[[Length]]-1
+				      1. Rename property ToString(q) of x to ToString(q – 1)
+				    iii. Let x.[[Length]] = x.[[Length]] – 1
+				  b. Return true
+				3. Else throw a TypeError exception
+			*/
+			//Do nothing for XML objects?
+			throw new Error("Cannot call delete on XML");
+		}
+
+		/**
+		 * Removes the given namespace for this object and all descendants.
+		 * 
+		 * @param ns
+		 * @return 
+		 * 
+		 */
+		public function removeNamespace(ns:*):XML
+		{
+			/*
+				Overview
+				The removeNamespace method removes the given namespace from the in scope namespaces of this object and all its descendents,
+				then returns a copy of this XML object. The removeNamespaces method will not remove a namespace from an object where it is referenced
+				by that object’s QName or the QNames of that object’s attributes.
+				Semantics
+				When the removeNamespace method is called on an XML object x with parameter namespace, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
+				2. Let ns be a Namespace object created as if by calling the function Namespace( namespace )
+				3. Let thisNS be the result of calling [[GetNamespace]] on x.[[Name]] with argument x.[[InScopeNamespaces]]
+				4. If (thisNS == ns), return x
+				5. For each a in x.[[Attributes]]
+				  a. Let aNS be the result of calling [[GetNamespace]] on a.[[Name]] with argument x.[[InScopeNamespaces]]
+				  b. If (aNS == ns), return x
+				6. If ns.prefix == undefined
+				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri, remove the namespace n from x.[[InScopeNamespaces]]
+				7. Else
+				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri and n.prefix == ns.prefix, remove the namespace n from x.[[InScopeNamespaces]]
+				8. For each property p of x
+				  a. If p.[[Class]] = "element", call the removeNamespace method of p with argument ns
+				9. Return x
+			*/
+			var i:int;
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return this;
+			if(!(ns is Namespace))
+				ns = new Namespace(ns);
+			if(ns == name().getNamespace(_namespaces))
+				return this;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(ns == _attributes[i].name().getNamespace(_namespaces))
+					return this;
+			}
+			
+			//
+			for(i=_namespaces.length-1;i>=0;i--)
+			{
+				if(_namespaces[i].uri == ns.uri && _namespaces[i].prefix == ns.prefix)
+					_namespaces.splice(i,1);
+				else if(ns.prefix == undefined && _namespaces[i].uri == ns.uri)
+					_namespaces.splice(i,1);
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					_children[i].removeNamespace(ns);
+			}
+			return this;
+		}
+		
+		/**
+		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
+		 * 
+		 * @param propertyName
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function replace(propertyName:Object, value:*):XML
+		{
+			/*
+				Semantics
+				When the replace method is called on an XML object x with parameters propertyName and value, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
+				2. If Type(value) ∉ {XML, XMLList}, let c = ToString(value)
+				3. Else let c be the result of calling the [[DeepCopy]] method of value
+				4. If ToString(ToUint32(P)) == P
+				  a. Call the [[Replace]] method of x with arguments P and c and return x
+				5. Let n be a QName object created as if by calling the function QName(P)
+				6. Let i = undefined
+				7. For k = x.[[Length]]-1 downto 0
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri )))
+				    i. If (i is not undefined), call the [[DeleteByIndex]] method of x with argument ToString(i)
+				    ii. Let i = k
+				8. If i == undefined, return x
+				9. Call the [[Replace]] method of x with arguments ToString(i) and c
+				10. Return x			
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(value === null || value === undefined)
+				return this;
+			if((value is XML) || (value is XMLList))
+				value = value.copy();
+			else
+				value = value.toString();
+
+			return null;
+		}
+
+		private function replaceChild(idx:int,v:*):void
+		{
+			/*
+				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If i is greater than or equal to x.[[Length]],
+				  a. Let P = ToString(x.[[Length]])
+				  b. Let x.[[Length]] = x.[[Length]] + 1
+				5. If Type(V) is XML and V.[[Class]] ∈ {"element", "comment", "processing-instruction", "text"}
+				  a. If V.[[Class]] is “element” and (V is x or an ancestor of x) throw an Error exception
+				  b. Let V.[[Parent]] = x
+				  c. If x has a property with name P
+				  i. Let x[P].[[Parent]] = null
+				  d. Let x[P] = V
+				6. Else if Type(V) is XMLList
+				  a. Call the [[DeleteByIndex]] method of x with argument P
+				  b. Call the [[Insert]] method of x with arguments P and V
+				7. Else
+				  a. Let s = ToString(V)
+				  b. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = s
+				  c. If x has a property with name P
+				    i. Let x[P].[[Parent]] = null
+				  d. Let the value of property P of x be t
+				8. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(idx > _children.length)
+				idx = _children.length;
+			if(v is XML && v.nodeKind() != "attribute")
+			{
+				if(v.nodeKind() == "element" && (v==this || isAncestor(v)) )
+					throw new TypeError("cannot assign parent xml as child");
+				v.setParent(this);
+				if(_children[idx])
+					_children[idx].setParent(null);
+				_children[idx] = v;
+			}
+			else if(v is XMLList)
+			{
+				//6.
+				if(_children[idx])
+					_children[idx].setParent(null);
+
+			}
+			else
+			{
+				//7. attribute?
+			}
+		}
+
+		private function isAncestor(xml:XML):Boolean
+		{
+			var p:XML = parent();
+			while(p)
+			{
+				if(p == xml)
+					return true;
+				p = p.parent();
+			}
+			return false;
+		}
+
+		public function setAttribute(attr:*,value:String):void
+		{
+			var i:int;
+			if(!_attributes)
+				_attributes = [];
+
+			if(attr is XML)
+			{
+				if(attr.nodeKind() == "attribute")
+				{
+					for(i=0;i<_attributes.length;i++)
+					{
+						if(_attributes[i].name.equals() )
+						addChild(_att)
+					}
+				}
+
+			}
+			if(attr.indexOf("xmlns") == 0)
+			{
+				//it's a namespace declaration
+				var ns:Namespace = new Namespace(value.toString());
+				if(attr.indexOf("xmlns:") == 0)// it has a prefix
+					ns.prefix = attr.split(":")[1];
+				this.addNamespace(ns);
+			}
+			else
+			{
+				//it's a regular attribute string
+
+			}
+
+		}
+		/**
+		 * Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
+		 * This is primarily used to support dot notation assignment of XML.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function setChild(elementName:*, elements:Object):void
+		{
+			
+			/*
+			 * 
+			1. If ToString(ToUint32(P)) == P, throw a TypeError exception NOTE this operation is reserved for future versions of E4X.
+			2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+			3. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"})
+			  a. Let c = ToString(V)
+			4. Else
+			  a. Let c be the result of calling the [[DeepCopy]] method of V
+			5. Let n = ToXMLName(P)
+			6. If Type(n) is AttributeName
+			  a. Call the function isXMLName (section 13.1.2.1) with argument n.[[Name]] and if the result is false, return
+			  b. If Type(c) is XMLList
+			    i. If c.[[Length]] == 0, let c be the empty string
+			    ii. Else
+			      1. Let s = ToString(c[0])
+			      2. For i = 1 to c.[[Length]]-1
+			        a. Let s be the result of concatenating s, the string " " (space) and ToString(c[i])
+			      3. Let c = s
+			  c. Else
+			    i. Let c = ToString(c)
+			  d. Let a = null
+			  e. For each j in x.[[Attributes]]
+			    i. If (n.[[Name]].localName == j.[[Name]].localName) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == j.[[Name]].uri))
+			      1. If (a == null), a = j
+			      2. Else call the [[Delete]] method of x with argument j.[[Name]]
+			  f. If a == null
+			    i. If n.[[Name]].uri == null
+			      1. Let nons be a new Namespace created as if by calling the constructor new Namespace()
+			      2. Let name be a new QName created as if by calling the constructor new QName(nons, n.[[Name]])
+			    ii. Else
+			      1. Let name be a new QName created as if by calling the constructor new QName(n.[[Name]])
+			    iii. Create a new XML object a with a.[[Name]] = name, a.[[Class]] == "attribute" and a.[[Parent]] = x
+			    iv. Let x.[[Attributes]] = x.[[Attributes]] ∪ { a }
+			    v. Let ns be the result of calling the [[GetNamespace]] method of name with no arguments
+			    vi. Call the [[AddInScopeNamespace]] method of x with argument ns
+			  g. Let a.[[Value]] = c
+			  h. Return
+			7. Let isValidName be the result of calling the function isXMLName (section 13.1.2.1) with argument n
+			8. If isValidName is false and n.localName is not equal to the string "*", return
+			9. Let i = undefined
+			10. Let primitiveAssign = (Type(c) ∉ {XML, XMLList}) and (n.localName is not equal to the string "*")
+			11. For (k = x.[[Length]]-1 downto 0)
+			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri )))
+			    i. If (i is not undefined), call the [[DeleteByIndex]] property of x with argument ToString(i)
+			    ii. Let i = k
+			12. If i == undefined
+			  a. Let i = x.[[Length]]
+			  b. If (primitiveAssign == true)
+			    i. If (n.uri == null)
+			      1. Let name be a new QName created as if by calling the constructor new QName(GetDefaultNamespace(), n)
+			    ii. Else
+			      1. Let name be a new QName created as if by calling the constructor new QName(n)
+			    iii. Create a new XML object y with y.[[Name]] = name, y.[[Class]] = "element" and y.[[Parent]] = x
+			    iv. Let ns be the result of calling [[GetNamespace]] on name with no arguments
+			    v. Call the [[Replace]] method of x with arguments ToString(i) and y
+			    vi. Call [[AddInScopeNamespace]] on y with argument ns
+			13. If (primitiveAssign == true)
+			  a. Delete all the properties of the XML object x[i]
+			  b. Let s = ToString(c)
+			  c. If s is not the empty string, call the [[Replace]] method of x[i] with arguments "0" and s
+			14. Else
+			  a. Call the [[Replace]] method of x with arguments ToString(i) and c
+			15. Return
+			*/
+			var i:int;
+			var len:int;
+			var chld:XML;
+			
+			if(elements is XML)
+			{
+				var list:XMLList = new XMLList();
+				list[0] = elements;
+				elements = list;
+			}
+			if(elements is XMLList)
+			{
+				var chldrn:XMLList = this.child(elementName);
+				var childIdx:int = children().length() -1;
+				if(chldrn.length())
+					childIdx = chldrn[0].childIndex();
+				
+				len = chldrn.length() -1;
+				for (i= len; i >= 0;  i--)
+				{
+					removeChild(chldrn[i]);
+					// remove the nodes
+					// remove the children
+					// adjust the childIndexes
+				}
+				var curChild = _children[childIdx];
+				// Now add them in.
+				len = elements.length();
+				for(i=0;i<len;i++)
+				{
+					child = elements[i];
+					if(!curChild)
+					{
+						curChild = appendChild(chld);
+					}
+					else {
+						curChild = insertChildAfter(curChild, chld);
+					}
+				}
+			}
+			//what to do if it's not XML or XMLList? Throw an error? Ignore?
+			
+		}
+
+		/**
+		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function setChildren(value:Object):XML
+		{
+			if(value is XML)
+			{
+				var list:XMLList = new XMLList();
+				list[0] = value;
+				value = list;
+			}
+			if(value is XMLList)
+			{
+				// remove all existing elements
+				var chldrn:XMLList = this.child(elementName);
+				var childIdx:int = children().length() -1;
+				if(chldrn.length())
+					childIdx = chldrn[0].childIndex();
+				
+				len = chldrn.length() -1;
+				for (i= len; i >= 0;  i--)
+				{
+					removeChild(chldrn[i]);
+					// remove the nodes
+					// remove the children
+					// adjust the childIndexes
+				}
+				var curChild = _children[childIdx];
+				// Now add them in.
+				len = value.length();
+				for(i=0;i<len;i++)
+				{
+					child = value[i];
+					if(!curChild)
+					{
+						curChild = appendChild(chld);
+					}
+					else {
+						curChild = insertChildAfter(curChild, chld);
+					}
+				}
+			}
+
+			return this;
+		}
+		
+		/**
+		 * Changes the local name of the XML object to the given name parameter.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function setLocalName(name:String):void
+		{
+			if(!_name)
+				_name = new QName();
+
+			_name.localName = name;
+		}
+		
+		/**
+		 * Sets the name of the XML object to the given qualified name or attribute name.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function setName(name:*):void
+		{
+			if(name is QName)
+				_name = name;
+			else
+				_name = new QName(name);
+		}
+		
+		/**
+		 * Sets the namespace associated with the XML object.
+		 * 
+		 * @param ns
+		 * 
+		 */
+		public function setNamespace(ns:Object):void
+		{
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
+				return;
+			var ns2:Namespace = new Namespace(ns);
+			_name = new QName(ns2,name());
+
+			if(_nodeKind == "attribute")
+			{
+				_name.isAttribute = true;
+				if(_parent == null)
+					return;
+				_parent.addNamespace(ns2);
+			}
+			if(_nodeKind == "element")
+				addNamespace(ns2);
+		}
+
+		/**
+		 * @private
+		 * 
+		 */
+		public function setNodeKind(value:String):void
+		{
+			_nodeKind = value;
+		}
+		
+		public function setParent(parent:XML):void
+		{
+			if(_parentXML)
+				_parentXML.removeChild(this);
+			_parentXML = parent;
+		}
+
+		public function setValue(value:String):void
+		{
+			_value = value;
+		}
+		
+		/**
+		 * Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function text():XMLList
+		{
+			var list:XMLList = new XMLList();
+			var i:int;
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "text")
+					list.list.appendChild(_atributes[i]);
+			}
+			list.targetObject = this;
+			return list;
+		}
+		
+		/**
+		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
+		 * 
+		 * @param k
+		 * @return 
+		 * 
+		 */
+		public function toJSON(k:String):*
+		{
+			return this.name();
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toString():String
+		{
+			// text, comment, processing-instruction, attribute, or element
+			if(_nodeKind == "text" || _nodeKind == "attribute")
+				return _value;
+			if(_nodeKind == "comment")
+				return "";
+			if(_nodeKind == "processing-instruction")
+				return "";
+			return toXMLString();
+		}
+
+		private function toAttributeName(name:*):QName
+		{
+			if(!name is QName)
+			{
+				name = name.toString();
+				if(name.indexOf("@") > -1)
+					name = name.substring(name.indexOf("@"));
+			}
+			name = toXMLName(name);
+			name.isAttribute = true;
+
+		}
+		private function toXMLName(name:*):QName
+		{
+			if(name.toString().indexOf("@") > -1)
+				return toAttributeName(name);
+
+			/*
+				Given a string s, the ToXMLName conversion function returns a QName object or AttributeName. If the first character of s is "@", ToXMLName creates an AttributeName using the ToAttributeName operator. Otherwise, it creates a QName object using the QName constructor.
+				Semantics
+				Given a String value s, ToXMLName operator converts it to a QName object or AttributeName using the following steps:
+				1. If ToString(ToUint32(s)) == ToString(s), throw a TypeError exception
+				2. If the first character of s is "@"
+				a. Let name = s.substring(1, s.length)
+				b. Return ToAttributeName(name)
+				3. Else
+				a. Return a QName object created as if by calling the constructor new QName(s)
+			*/
+			if(parseInt(name,10).toString() == name)
+				throw new TypeError("invalid element name");
+
+			if(!name is QName)
+			{
+				name = name.toString();
+				if(name.indexOf(":") >= 0)
+				{
+					// Get the QName for prefix
+					var qname:QName() = new QName();
+					qname.prefix = name.substring(0,name.indexOf(":"));
+					qname.localName = name.substring(name.lastIndexOf(":")+1);
+					//get the qname uri
+					qname.uri = getURI(qname.prefix);
+					name = qname;
+				}
+				else
+				{
+					qname = new QName(name());
+					if(!qname.uri && defaultNamespace)
+					{
+						qname = new QName(defaultNamespace);
+					}
+					qname.localName = name;
+					name = qname;
+				}
+			}
+			else
+			{
+				name  = new QName(name);
+			}
+			return name;
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toXMLString(indentLevel:int=0,ancestors:Array=[]):String
+		{
+			/*
+				Given an XML object x and an optional argument AncestorNamespaces and an optional argument IndentLevel, ToXMLString converts it to an XML encoded string s by taking the following steps:
+				1. Let s be the empty string
+				2. If IndentLevel was not provided, Let IndentLevel = 0
+				3. If (XML.prettyPrinting == true)
+				  a. For i = 0 to IndentLevel-1, let s be the result of concatenating s and the space <SP> character
+				4. If x.[[Class]] == "text",
+				  a. If (XML.prettyPrinting == true)
+				    i. Let v be the result of removing all the leading and trailing XMLWhitespace characters from x.[[Value]]
+				    ii. Return the result of concatenating s and EscapeElementValue(v)
+				  b. Else
+				    i. Return EscapeElementValue(x.[[Value]])
+				5. If x.[[Class]] == "attribute", return the result of concatenating s and EscapeAttributeValue(x.[[Value]])
+				6. If x.[[Class]] == "comment", return the result of concatenating s, the string "<!--", x.[[Value]] and the string "-->"
+				7. If x.[[Class]] == "processing-instruction", return the result of concatenating s, the string "<?", x.[[Name]].localName, the space <SP> character, x.[[Value]] and the string "?>"
+				8. If AncestorNamespaces was not provided, let AncestorNamespaces = { }
+				9. Let namespaceDeclarations = { }
+				10. For each ns in x.[[InScopeNamespaces]]
+				  a. If there is no ans ∈ AncestorNamespaces, such that ans.uri == ns.uri and ans.prefix == ns.prefix
+				    i. Let ns1 be a copy of ns
+				    ii. Let namespaceDeclarations = namespaceDeclarations ∪ { ns1 } NOTE implementations may also exclude unused namespace declarations from namespaceDeclarations
+				11. For each name in the set of names consisting of x.[[Name]] and the name of each attribute in x.[[Attributes]]
+				  a. Let namespace be a copy of the result of calling [[GetNamespace]] on name with argument (AncestorNamespaces ∪ namespaceDeclarations)
+				  b. If (namespace.prefix == undefined),
+				    i. Let namespace.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with namespace.prefix == ns2.prefix
+				    ii. Note: implementations should prefer the empty string as the implementation defined prefix if it is not already used in the set (AncestorNamespaces ∪ namespaceDeclarations)
+				    iii. Let namespaceDeclarations = namespaceDeclarations ∪ { namespace }
+				12. Let s be the result of concatenating s and the string "<"
+				13. If namespace.prefix is not the empty string,
+				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				14. Let s be the result of concatenating s and x.[[Name]].localName
+				15. Let attrAndNamespaces = x.[[Attributes]] ∪ namespaceDeclarations
+				16. For each an in attrAndNamespaces
+				  a. Let s be the result of concatenating s and the space <SP> character
+				  b. If Type(an) is XML and an.[[Class]] == "attribute"
+				    i. Let ans be a copy of the result of calling [[GetNamespace]] on a.[[Name]] with argument AncestorNamespaces
+				    ii. If (ans.prefix == undefined),
+				      1. Let ans.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with ans.prefix == ns2.prefix
+				      2. If there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations), such that ns2.uri == ans.uri and ns2.prefix == ans.prefix
+				        a. Let namespaceDeclarations = namespaceDeclarations ∪ { ans }
+				    iii. If ans.prefix is not the empty string
+				      1. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				    iv. Let s be the result of concatenating s and a.[[Name]].localName
+				  c. Else
+				    i. Let s be the result of concatenating s and the string "xmlns"
+				    ii. If (an.prefix == undefined),
+				      1. Let an.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with an.prefix == ns2.prefix
+				    iii. If an.prefix is not the empty string
+				      1. Let s be the result of concatenating s, the string ":" and an.prefix
+				  d. Let s be the result of concatenating s, the string "=" and a double-quote character (i.e. Unicode codepoint \u0022)
+				  e. If an.[[Class]] == "attribute"
+				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.[[Value]])
+				  f. Else
+				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.uri)
+				  g. Let s be the result of concatenating s and a double-quote character (i.e. Unicode codepoint \u0022)
+				17. If x.[[Length]] == 0
+				  a. Let s be the result of concatenating s and "/>"
+				  b. Return s
+				18. Let s be the result of concatenating s and the string ">"
+				19. Let indentChildren = ((x.[[Length]] > 1) or (x.[[Length]] == 1 and x[0].[[Class]] is not equal to "text"))
+				20. If (XML.prettyPrinting == true and indentChildren == true)
+				  a. Let nextIndentLevel = IndentLevel + XML.PrettyIndent.
+				21. Else
+				  a. Let nextIndentLevel = 0
+				22. For i = 0 to x.[[Length]]-1
+				  a. If (XML.prettyPrinting == true and indentChildren == true)
+				    i. Let s be the result of concatenating s and a LineTerminator
+				  b. Let child = ToXMLString (x[i], (AncestorNamespaces ∪ namespaceDeclarations), nextIndentLevel)
+				  c. Let s be the result of concatenating s and child
+				23. If (XML.prettyPrinting == true and indentChildren == true),
+				  a. Let s be the result of concatenating s and a LineTerminator
+				  b. For i = 0 to IndentLevel, let s be the result of concatenating s and a space <SP> character
+				24. Let s be the result of concatenating s and the string "</"
+				25. If namespace.prefix is not the empty string
+				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				26. Let s be the result of concatenating s, x.[[Name]].localName and the string ">"
+				27. Return s
+				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().			
+			*/
+			var i:int;
+			var ns:Namespace;
+			var strArr:Array = [];
+
+			var indentArr:Array = [];
+			for(i=0;i<indentLevel;i++)
+				indentArr.push(_indentStr);
+
+			var indent:String = indentArr.join("");
+			if(this.nodeKind() == "text")
+			{
+				if(prettyPrinting)
+				{
+					var v:String = trimXMLWhitespace(_value);
+					return indent + escapeElementValue(v);
+				}
+				return escapeElementValue(_value);
+			}
+			if(this.nodeKind() == "attribute")
+				return indent + escapeAttributeValue(_value);
+
+			if(this.nodeKind() == "comment")
+				return indent + "<!--" +  _value + "-->";
+
+			if(this.nodeKind() == "processing-instruction")
+				return indent + "<?" + name().localName + " " + _value + "?>";
+
+			// We excluded the other types, so it's a normal element
+			//TODO I'm here...
+			// step 8.
+			//ancestors
+			var declarations:Array = [];
+			for(i=0;i<_namespaces.length;i++)
+			{
+				if(!namespaceInArray(_namespaces[i],ancestors))
+					declarations.push(new Namespace(_namespaces[i]));
+			}
+			//11
+			for(i=0;i<_attributes.length)
+			{
+				ns = new Namespace(_attributes[i].name().getNamespace(ancestors.concat(declarations)));
+				if(ns.prefix === null)
+				{
+					ns.prefix = "";
+					declarations.push(ns);
+				}
+			}
+			ns = new Namespace(name().getNamespace(ancestors.concat(declarations)));
+			if(ns.prefix === null)
+			{
+				ns.prefix = "";
+				declarations.push(ns);
+			}
+			strArray.push("<");
+			if(ns.prefix)
+				strArr.push(ns.prefix+":");
+			strArray.push(name().localName);
+
+			//attributes and namespace declarations... (15-16)
+			for(i=0;i<declarations.length;i++)
+			{
+				strArray.push(" xmlns");
+				if(declarations[i].prefix)
+				{
+					strArray.push(":");
+					strArray.push(declarations[i].prefix);
+				}
+				strArray.push('="');
+				strArray.push(escapeAttributeValue(declarations[i].uri));
+				strArray.push('"');
+
+			}
+			for(i=0;i<_attributes.length;i++)
+			{
+				strArray.push(" ");
+				// the following seems to be the spec, but it does not make sense to me.
+				//var ans:Namespace = _attributes[i].name().getNamespace(ancestors);
+				var aName:QName = _attributes[i].name();
+				var ans:Namespace = aName.getNamespace(ancestors.concat(declarations));
+				if(ans.prefix)
+				{
+					strArray.push(ans.prefix);
+					strArray.push(":");
+				}
+				strArray.push(aName.localName);
+				strArray.push('="');
+				strArray.push(escapeAttributeValue(_attributes[i].getValue()));
+				strArray.push('"');
+			}
+			// now write elements or close the tag if none exist
+			if(_children.length == 0)
+			{
+				strArray.push("/>");
+				return strArray.join("");
+			}
+			strArray.push(">");
+			var indentChildren:Boolean = _children.length > 1 || (_children.length == 1 && _children[0].nodeKind() != "text");
+			var nextIndentLevel:int;
+			if(XML.prettyPrinting && indentChildren)
+				nextIndentLevel = indentLevel + prettyIndent;
+			else
+				nextIndentLevel = 0;
+			for(i=0;i<_children.length;i++)
+			{
+				//
+				if(XML.prettyPrinting && indentChildren)
+					strArray.push("\n");
+				strArray.push(_children[i].toXMLString(nextIndentLevel,ancestors.concat(declarations)));
+			}
+			if(XML.prettyPrinting && indentChildren)
+			{
+				strArray.push("\n");
+				strArray.push(new Array(indentLevel + 1).join(' '));
+			}
+			strArray.push("</");
+			if(ns.prefix)
+			{
+				strArray.push(ns.prefix);
+				strArray.push(":");
+			}
+			strArray.push(ns.localName);
+			strArray.push(">");
+
+			return strArray.join("");
+		}
+		
+		/**
+		 * Returns the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function valueOf():XML
+		{
+			return this;
+		}
+		
+	}
+}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/flex/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLClasses.as b/frameworks/projects/XML/src/main/flex/XMLClasses.as
new file mode 100644
index 0000000..6a91d82
--- /dev/null
+++ b/frameworks/projects/XML/src/main/flex/XMLClasses.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+/**
+ *  @private
+ *  This class is used to link additional classes into rpc.swc
+ *  beyond those that are found by dependency analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class XMLClasses
+{
+	COMPILE::JS
+	{
+		import XML; XML;
+		import XMLList; XMLList;
+		import QName; QName;
+	}
+}
\ No newline at end of file


[34/49] git commit: [flex-asjs] [refs/heads/develop] - underscore made it in by mistake...

Posted by ha...@apache.org.
underscore made it in by mistake...


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/916989a6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/916989a6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/916989a6

Branch: refs/heads/develop
Commit: 916989a6ef9790f4b7e07c2bd84676fe1105fcff
Parents: bd3f6c8
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 18 21:05:28 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 18 21:05:28 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/916989a6/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index d808a2a..26d185b 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -707,7 +707,6 @@ package
 			var child:XML = _children[idx];
 			child.setParent(null);
 			_children.splice(idx,1);
-				_
 		}
 		
 		/**


[02/49] git commit: [flex-asjs] [refs/heads/develop] - First commit of XML processing (non functional) Includes a shell of "JXON" classes for alternate XML processing

Posted by ha...@apache.org.
First commit of XML processing (non functional)
Includes a shell of "JXON" classes for alternate XML processing


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a50de213
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a50de213
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a50de213

Branch: refs/heads/develop
Commit: a50de213a48513d8d7eccfb02ccdefd0fc49d29c
Parents: e75e1f3
Author: Harbs <ha...@in-tools.com>
Authored: Mon Jan 4 14:05:49 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Mon Jan 4 14:05:49 2016 +0200

----------------------------------------------------------------------
 .../projects/Effects/.actionScriptProperties    |   2 +-
 frameworks/projects/XML/as/src/Namespace.as     | 134 +++
 frameworks/projects/XML/as/src/QName.as         |  89 ++
 frameworks/projects/XML/as/src/XML.as           | 986 +++++++++++++++++++
 frameworks/projects/XML/as/src/XMLClasses.as    |  35 +
 frameworks/projects/XML/as/src/XMLList.as       | 611 ++++++++++++
 .../as/src/org/apache/flex/core/xml/IJXON.as    |  29 +
 .../XML/as/src/org/apache/flex/core/xml/JXON.as | 544 ++++++++++
 .../org/apache/flex/core/xml/JXONAttribute.as   |  79 ++
 .../src/org/apache/flex/core/xml/JXONComment.as |  52 +
 .../org/apache/flex/core/xml/JXONInstruction.as |  52 +
 .../as/src/org/apache/flex/core/xml/JXONList.as |  28 +
 .../org/apache/flex/core/xml/JXONNamespace.as   |  67 ++
 .../as/src/org/apache/flex/core/xml/JXONText.as |  52 +
 frameworks/projects/XML/basic-manifest.xml      |  24 +
 frameworks/projects/XML/build.xml               | 166 ++++
 .../projects/XML/compile-as-to-js-config.xml    |  77 ++
 frameworks/projects/XML/compile-asjs-config.xml |  78 ++
 frameworks/projects/XML/compile-config.xml      |  83 ++
 frameworks/projects/XML/compile-js-config.xml   |  87 ++
 20 files changed, 3274 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/Effects/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/.actionScriptProperties b/frameworks/projects/Effects/.actionScriptProperties
index 629fa74..c89fb43 100644
--- a/frameworks/projects/Effects/.actionScriptProperties
+++ b/frameworks/projects/Effects/.actionScriptProperties
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <actionScriptProperties analytics="false" mainApplicationPath="Effects.as" projectUUID="c7b22e99-ecef-48e3-90be-f80d3bc54d5f" version="11">
-  <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/Namespace.as b/frameworks/projects/XML/as/src/Namespace.as
new file mode 100644
index 0000000..ab5e56e
--- /dev/null
+++ b/frameworks/projects/XML/as/src/Namespace.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class Namespace
+	{
+		public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
+		{
+			/*
+				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
+				1. Create a new Namespace object n
+				2. If prefixValue is not specified and uriValue is not specified
+				  a. Let n.prefix be the empty string
+				  b. Let n.uri be the empty string
+				3. Else if prefixValue is not specified
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "Namespace"
+				    i. Let n.prefix = uriValue.prefix
+				    ii. Let n.uri = uriValue.uri
+				  b. Else if Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri NOTE implementations that preserve prefixes in qualified names may also set n.prefix = uriValue.[[Prefix]]
+				  c. Else
+				    i. Let n.uri = ToString(uriValue)
+				    ii. If (n.uri is the empty string), let n.prefix be the empty string
+				    iii. Else n.prefix = undefined
+				4. Else
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri
+				  b. Else
+				    i. Let n.uri = ToString(uriValue)
+				  c. If n.uri is the empty string
+				    i. If prefixValue is undefined or ToString(prefixValue) is the empty string
+				      1. Let n.prefix be the empty string
+				    ii. Else throw a TypeError exception
+				  d. Else if prefixValue is undefined, let n.prefix = undefined
+				  e. Else if isXMLName(prefixValue) == false
+				  i. Let n.prefix = undefined
+				  f. Else let n.prefix = ToString(prefixValue)
+				5. Return n
+			*/
+			if(!uriValue && prefixOrUri) //we don't have a prefix defined
+			{
+				var uriVal:Object = uriValue ? uriValue : prefixOrUri;
+				if(uriVal is Namespace)
+				{
+					_prefix = (uriVal as Namespace).prefix;
+					_uri = (uriVal as Namespace).uri;
+				}
+				else if(uriVal is QName)
+				{
+					if((uriVal as QName).uri)
+						_uri = (uriVal as QName).uri;
+				}
+				else {
+					_uri = uriVal.toString();
+					if(_uri == "")
+						_prefix = "";
+				}
+			}
+			else if(uriValue)
+			{
+				// something is specified as the URI otherwise fall through and leave both the prefix and uri blank
+				if(uriValue is QName)
+				{
+					if((uriValue as QName).uri)
+						_uri = (uriValue as QName).uri;
+				}
+				else {
+					_uri = uriValue.toString();
+				}
+
+				if(!_uri)
+				{
+					if(!prefixOrUri)
+						_prefix = "";
+					else
+						throw new TypeError("invalid prefix");
+				}
+				else
+					_prefix = prefixOrUri.toString();
+
+			}
+		}
+
+		private var _uri:String = "";
+		public function get uri():String
+		{
+			return _uri;
+		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _prefix:String;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		public function toString():String
+		{
+			return uri;
+		}
+
+		public function valueOf():Object
+		{
+			return this;
+		}
+	}
+}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
new file mode 100644
index 0000000..23a303a
--- /dev/null
+++ b/frameworks/projects/XML/as/src/QName.as
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class QName
+	{
+		public function QName(qNameOrUri:*=null,localNameVal:*=null)
+		{
+			/*
+				When the QName constructor is called with a one argument Name or two arguments Namespace and Name the following steps are taken:
+				1. If (Type(Name) is Object and Name.[[Class]] == "QName")
+				  a. If (Namespace is not specified), return a copy of Name
+				  b. Else let Name = Name.localName
+				2. If (Name is undefined or not specified)
+				  a. Let Name = “”
+				3. Else let Name = ToString(Name)
+				4. If (Namespace is undefined or not specified)
+				  a. If Name = "*"
+				    i. Let Namespace = null
+				  b. Else
+				    i. Let Namespace = GetDefaultNamespace()
+				5. Let q be a new QName with q.localName = Name
+				6. If Namespace == null
+				  a. Let q.uri = null NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to undefined
+				7. Else
+				  a. Let Namespace be a new Namespace created as if by calling the constructor new Namespace(Namespace)
+				  b. Let q.uri = Namespace.uri NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to Namespace.prefix
+				8. Return q
+			*/
+			if(qNameOrUri is QName)
+			{
+				_uri = qNameOrUri.uri;
+				_localName = qNameOrUri.localName;
+			}
+			else if(qNameOrUri is Namespace)
+			{
+				_uri = (qNameOrUri as Namespace).uri;
+				if(localNameVal)
+					_localName = localNameVal.toString();
+			}
+			else if (qNameOrUri.toString())
+			{
+				_uri = qNameOrUri;
+				if(localName)
+					_localName = localName;
+			}
+		}
+
+		private var _uri:String;
+		public function get uri():String
+		{
+			return _uri;
+		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _localName:String;
+		public function get localName():String
+		{
+			return _localName;
+		}
+		public function set localName(value:String):void
+		{
+			_localName = value;
+		}
+	}
+}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
new file mode 100644
index 0000000..e7bc294
--- /dev/null
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -0,0 +1,986 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class XML
+	{
+		/*
+		 * Dealing with namespaces:
+		 * If the name is qualified, it has a prefix. Otherwise, the prefix is null.
+		 * Additionally, it has a namespaceURI. Otherwise the namespaceURI is null.
+		 * the prefix together with the namespaceURI form a QName
+		*/
+
+		/**
+		 * [static] Determines whether XML comments are ignored when XML objects parse the source XML data.
+		 *  
+		 */
+		static public var ignoreComments:Boolean = true;
+		
+		/**
+		 * [static] Determines whether XML processing instructions are ignored when XML objects parse the source XML data.
+		 *  
+		 */
+		static public var ignoreProcessingInstructions:Boolean = true;
+		
+		/**
+		 * [static] Determines whether white space characters at the beginning and end of text nodes are ignored during parsing.
+		 *  
+		 */
+		static public var ignoreWhitespace:Boolean = true;
+		
+		/**
+		 * [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true.
+		 * 
+		 */
+		static public var prettyIndent:int = 2;
+		
+		/**
+		 * [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
+		 * 
+		 */
+		static public var prettyPrinting:Boolean = true;
+		
+		static private function fromNode(node:Element):XML
+		{
+			// returns an XML object from an existing node without the need to parse the XML.
+			
+		}
+
+		public function XML(xml:String)
+		{
+			var parser:DOMParser = new DOMParser();
+			_parentDocument = parser.parseFromString(xml, "application/xml");
+			_node = _parentDocument.childNodes[0];
+			//need to deal with errors https://bugzilla.mozilla.org/show_bug.cgi?id=45566
+			
+			// get rid of nodes we do not want 
+
+			//loop through the child nodes and build XML obejcts for each.
+
+		}
+		
+		private var _doc:Document;
+		private var _children:Array;
+		private var _attributes:Array;
+		private var _processingInstructions:Array;
+		private var _collection:HTMLCollection;
+		private var _nodeList:NodeList;
+		private var _parentDocument:Document;
+		private var _node:Element;
+		private var _parentXML:XML;
+		private var _name:*;
+		private var _value:String;
+
+
+		public function getNode():Element
+		{
+			return _node;
+		}
+		
+		public function getDocument():Document
+		{
+			return _parentDocument;
+		}
+
+		public function setDocument(doc:Document)
+		{
+			if(_parentDocument != doc)
+			{
+				if(_node.parentElement)
+					_node.parentElement.removeChild(_node);
+				//I think just using importNode on the top level node with deep set to true if enough.
+				if(doc)
+					_node = doc.importNode(_node,true);
+				_parentDocument = doc;
+			}
+		}
+		/**
+		 * Adds a namespace to the set of in-scope namespaces for the XML object.
+		 *
+		 * @param ns
+		 * @return 
+		 * 	
+		 */
+		public function addNamespace(ns:Object):XML
+		{
+			/*
+				When the [[AddInScopeNamespace]] method of an XML object x is called with a namespace N, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", “attribute”}, return
+				2. If N.prefix != undefined
+				  a. If N.prefix == "" and x.[[Name]].uri == "", return
+				  b. Let match be null
+				  c. For each ns in x.[[InScopeNamespaces]]
+				    i. If N.prefix == ns.prefix, let match = ns
+				  d. If match is not null and match.uri is not equal to N.uri
+				    i. Remove match from x.[[InScopeNamespaces]]
+				  e. Let x.[[InScopeNamespaces]] = x.[[InScopeNamespaces]] ∪ { N }
+				  f. If x.[[Name]].[[Prefix]] == N.prefix
+				    i. Let x.[[Name]].prefix = undefined
+				  g. For each attr in x.[[Attributes]]
+				    i. If attr.[[Name]].[[Prefix]] == N.prefix, let attr.[[Name]].prefix = undefined
+				3. Return
+			*/
+			return null;
+		}
+		
+		/**
+		 * Appends the given child to the end of the XML object's properties.
+		 *
+		 * @param child
+		 * @return 
+		 * 
+		 */
+		public function appendChild(child:XML):XML
+		{
+			/*
+				[[Insert]] (P, V)
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
+				5. Let n = 1
+				6. If Type(V) is XMLList, let n = V.[[Length]]
+				7. If n == 0, Return
+				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
+				9. Let x.[[Length]] = x.[[Length]] + n
+				10. If Type(V) is XMLList
+				  a. For j = 0 to V.[[Length-1]]
+				    i. V[j].[[Parent]] = x
+				    ii. x[i + j] = V[j]
+				11. Else
+				  a. Call the [[Replace]] method of x with arguments i and V
+				12. Return
+			*/
+			child.setDocument(_parentDocument);
+			child.setParent(this);
+			
+			_children.push(child);
+			_node.appendChild(child.getNode());
+
+			return child;
+		}
+		
+		
+		/**
+		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
+		 *
+		 * @param attributeName
+		 * @return 
+		 * 
+		 */
+		public function attribute(attributeName:*):XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns a list of attribute values for the given XML object.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function attributes():XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Lists the children of an XML object.
+		 *
+		 * @param propertyName
+		 * @return 
+		 * 
+		 */
+		public function child(propertyName:Object):XMLList
+		{
+			/*
+			 * 
+			1. If ToString(ToUint32(P)) == P
+			  a. Let list = ToXMLList(x)
+			  b. Return the result of calling the [[Get]] method of list with argument P
+			2. Let n = ToXMLName(P)
+			3. Let list be a new XMLList with list.[[TargetObject]] = x and list.[[TargetProperty]] = n
+			4. If Type(n) is AttributeName
+			  a. For each a in x.[[Attributes]]
+			    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+			      1. Call the [[Append]] method of list with argument a
+			  b. Return list
+			5. For (k = 0 to x.[[Length]]-1)
+			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri)))
+			    i. Call the [[Append]] method of list with argument x[k]
+			6. Return list
+			*/
+			return null;
+		}
+		
+		/**
+		 * Identifies the zero-indexed position of this XML object within the context of its parent.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function childIndex():int
+		{
+			return -1;
+		}
+		
+		/**
+		 * Lists the children of the XML object in the sequence in which they appear.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function children():XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Lists the properties of the XML object that contain XML comments.
+		 *
+		 * @return 
+		 * 
+		 */
+		public function comments():XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Compares the XML object against the given value parameter.
+		 *
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function contains(value:XML):Boolean
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns a copy of the given XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function copy():XML
+		{
+			/*
+				When the [[DeepCopy]] method of an XML object x is called, the following steps are taken:
+				1. Let y be a new XML object with y.[[Prototype]] = x.[[Prototype]], y.[[Class]] = x.[[Class]], y.[[Value]] = x.[[Value]], y.[[Name]] = x.[[Name]], y.[[Length]] = x.[[Length]]
+				2. For each ns in x.[[InScopeNamespaces]]
+				  a. Let ns2 be a new Namespace created as if by calling the constructor new Namespace(ns)
+				  b. Let y.[[InScopeNamespaces]] = y.[[InScopeNamespaces]] ∪ { ns2 }
+				3. Let y.[[Parent]] = null
+				4. For each a in x.[[Attributes]]
+				  a. Let b be the result of calling the [[DeepCopy]] method of a
+				  b. Let b.[[Parent]] = y
+				  c. Let y.[[Attributes]] = y.[[Attributes]] ∪ { b }
+				5. For i = 0 to x.[[Length]]-1
+				  a. Let c be the result of calling the [[DeepCopy]] method of x[i]
+				  b. Let y[i] = c
+				  c. Let c.[[Parent]] = y
+				6. Return y
+			*/
+			return null;
+		}
+		
+		/**
+		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @return 
+		 * 
+		 */
+		static public function defaultSettings():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function descendants(name:Object = *):XMLList
+		{
+			/*
+				When the [[Descendants]] method of an XML object x is called with property name P, the following steps are taken:
+				1. Let n = ToXMLName(P)
+				2. Let list be a new XMLList with list.[[TargetObject]] = null
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri ))
+				      1. Call the [[Append]] method of list with argument a
+				4. For (k = 0 to x.[[Length]]-1)
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
+				    i. Call the [[Append]] method of list with argument x[k]
+				  b. Let dq be the resultsof calling the [[Descendants]] method of x[k] with argument P
+				  c. If dq.[[Length]] > 0, call the [[Append]] method of list with argument dq
+				5. Return list
+			*/
+			return null;
+		}
+		
+		/**
+		 * Lists the elements of an XML object.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function elements(name:Object = *):XMLList
+		{
+			return null;
+		}
+
+		public function equals(xml:XML):Boolean
+		{
+			/*
+				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
+				1. If Type(V) is not XML, return false
+				2. If x.[[Class]] is not equal to V.[[Class]], return false
+				3. If x.[[Name]] is not null
+				  a. If V.[[Name]] is null, return false
+				  b. If x.[[Name]].localName is not equal to V.[[Name]].localName, return false
+				  c. If x.[[Name]].uri is not equal to V.[[Name]].uri, return false
+				4. Else if V.[[Name]] is not null, return false
+				5. If x.[[Attributes]] does not contain the same number of items as V.[[Attributes]], return false
+				6. If x.[[Length]] is not equal to V.[[Length]], return false
+				7. If x.[[Value]] is not equal to y[[Value]], return false
+				8. For each a in x.[[Attributes]]
+				  a. If V.[[Attributes]] does not contain an attribute b, such that b.[[Name]].localName == a.[[Name]].localName, b.[[Name]].uri == a.[[Name]].uri and b.[[Value]] == a.[[Value]], return false
+				9. For i = 0 to x.[[Length]]-1
+				  a. Let r be the result of calling the [[Equals]] method of x[i] with argument V[i]
+				  b. If r == false, return false
+				10. Return true
+			*/
+		}
+		
+		/**
+		 * Checks to see whether the XML object contains complex content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasComplexContent():Boolean
+		{
+			return false
+		}
+
+		public function hasOwnProperty():Boolean
+		{
+			/*
+				When the [[HasProperty]] method of an XML object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P
+				  a. Return (P == "0")
+				2. Let n = ToXMLName(P)
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+				      1. Return true
+				  b. Return false
+				4. For (k = 0 to x.[[Length]]-1)
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or (x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
+				    i. Return true
+				5. Return false
+			*/
+		}
+				
+		/**
+		 * Checks to see whether the XML object contains simple content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasSimpleContent():Boolean
+		{
+			return false;
+		}
+		
+		/**
+		 * Lists the namespaces for the XML object, based on the object's parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function inScopeNamespaces():Array
+		{
+			return null;
+		}
+		
+		/**
+		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildAfter(child1:Object, child2:Object):*
+		{
+			return null;
+		}
+		
+		/**
+		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildBefore(child1:Object, child2:Object):*
+		{
+			return null;
+		}
+		
+		/**
+		 * For XML objects, this method always returns the integer 1.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function length():int
+		{
+			return 1;
+		}
+		
+		/**
+		 * Gives the local name portion of the qualified name of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function localName():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * Gives the qualified name for the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function name():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
+		 * 
+		 * @param prefix
+		 * @return 
+		 * 
+		 */
+		public function namespace(prefix:String = null):*
+		{
+			return null;
+		}
+		
+		/**
+		 * Lists namespace declarations associated with the XML object in the context of its parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function namespaceDeclarations():Array
+		{
+			return null;
+		}
+		
+		private var _nodeKind:String;
+		/**
+		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
+		 * @return 
+		 * 
+		 */
+		public function nodeKind():String
+		{
+			return null;
+		}
+		
+		/**
+		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function normalize():XML
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns the parent of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function parent():*
+		{
+			return null;
+		}
+		
+		/**
+		 * Inserts the provided child object into the XML element before any existing XML properties for that element.
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function prependChild(child:XML):XML
+		{
+			child.setDocument(_parentDocument);
+			child.setParent(this);
+			
+			_children.unshift(child);
+			if(_node.childNodes.length)
+				_node.insertBefore(child.getNode(), _node.childNodes[0]);
+			else
+				_node.appendChild(child.getNode());
+			
+			return child;
+		}
+		
+		/**
+		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function processingInstructions(name:String = "*"):XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Removes the given chid for this object and returns the removed child.
+		 * 
+		 * @param child
+		 * @return 
+		 * 
+		 */
+		public function removeChild(child:XML):Boolean
+		{
+			/*
+				When the [[Delete]] method of an XML object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P, throw a TypeError exception
+				NOTE this operation is reserved for future versions of E4X.
+				2. Let n = ToXMLName(P)
+				3. If Type(n) is AttributeName
+				  a. For each a in x.[[Attributes]]
+				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
+				      1. Let a.[[Parent]] = null
+				      2. Remove the attribute a from x.[[Attributes]]
+				  b. Return true
+				4. Let dp = 0
+				5. For q = 0 to x.[[Length]]-1
+				  a. If ((n.localName == "*") or (x[q].[[Class]] == "element" and x[q].[[Name]].localName == n.localName)) and ((n.uri == null) or (x[q].[[Class]] == “element” and n.uri == x[q].[[Name]].uri ))
+				    i. Let x[q].[[Parent]] = null
+				    ii. Remove the property with the name ToString(q) from x
+				    iii. Let dp = dp + 1
+				  b. Else
+				    i. If dp > 0, rename property ToString(q) of x to ToString(q – dp)
+				6. Let x.[[Length]] = x.[[Length]] - dp
+				7. Return true.
+			*/
+			child.setParent(null);
+			
+			var removed:XML;
+			var idx:int = child.childIndex;
+			removed = _children.splice(idx,1);
+			var n:Element = removed.getNode();
+			n.parentElement.removeChild(n);
+			return removed;
+		}
+
+		public function removeChildAt(index:int):void
+		{
+			/*
+				When the [[DeleteByIndex]] method of an XML object x is called with property name P, the following steps are taken:
+				1. Let i = ToUint32(P)
+				2. If ToString(i) == P
+				  a. If i is less than x.[[Length]]
+				    i. If x has a property with name P
+				      1. Let x[P].[[Parent]] = null
+				      2. Remove the property with the name P from x
+				    ii. For q = i+1 to x.[[Length]]-1
+				      1. Rename property ToString(q) of x to ToString(q – 1)
+				    iii. Let x.[[Length]] = x.[[Length]] – 1
+				  b. Return true
+				3. Else throw a TypeError exception
+			*/
+		}
+
+		/**
+		 * Removes the given namespace for this object and all descendants.
+		 * 
+		 * @param ns
+		 * @return 
+		 * 
+		 */
+		public function removeNamespace(ns:Namespace):XML
+		{
+			return null;
+		}
+		
+		/**
+		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
+		 * 
+		 * @param propertyName
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function replace(propertyName:Object, value:XML):XML
+		{
+			/*
+				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If i is greater than or equal to x.[[Length]],
+				  a. Let P = ToString(x.[[Length]])
+				  b. Let x.[[Length]] = x.[[Length]] + 1
+				5. If Type(V) is XML and V.[[Class]] ∈ {"element", "comment", "processing-instruction", "text"}
+				  a. If V.[[Class]] is “element” and (V is x or an ancestor of x) throw an Error exception
+				  b. Let V.[[Parent]] = x
+				  c. If x has a property with name P
+				    i. Let x[P].[[Parent]] = null
+				  d. Let x[P] = V
+				6. Else if Type(V) is XMLList
+				  a. Call the [[DeleteByIndex]] method of x with argument P
+				  b. Call the [[Insert]] method of x with arguments P and V
+				7. Else
+				  a. Let s = ToString(V)
+				  b. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = s
+				  c. If x has a property with name P
+				    i. Let x[P].[[Parent]] = null
+				  d. Let the value of property P of x be t
+				8. Return			
+			*/
+			return null;
+		}
+
+		/**
+		 * Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
+		 * This is primarily used to support dot notation assignment of XML.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function setChild(elementName:*, elements:Object):void
+		{
+			
+			/*
+			 * 
+			1. If ToString(ToUint32(P)) == P, throw a TypeError exception NOTE this operation is reserved for future versions of E4X.
+			2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+			3. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"})
+			  a. Let c = ToString(V)
+			4. Else
+			  a. Let c be the result of calling the [[DeepCopy]] method of V
+			5. Let n = ToXMLName(P)
+			6. If Type(n) is AttributeName
+			  a. Call the function isXMLName (section 13.1.2.1) with argument n.[[Name]] and if the result is false, return
+			  b. If Type(c) is XMLList
+			    i. If c.[[Length]] == 0, let c be the empty string
+			    ii. Else
+			      1. Let s = ToString(c[0])
+			      2. For i = 1 to c.[[Length]]-1
+			        a. Let s be the result of concatenating s, the string " " (space) and ToString(c[i])
+			      3. Let c = s
+			  c. Else
+			    i. Let c = ToString(c)
+			  d. Let a = null
+			  e. For each j in x.[[Attributes]]
+			    i. If (n.[[Name]].localName == j.[[Name]].localName) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == j.[[Name]].uri))
+			      1. If (a == null), a = j
+			      2. Else call the [[Delete]] method of x with argument j.[[Name]]
+			  f. If a == null
+			    i. If n.[[Name]].uri == null
+			      1. Let nons be a new Namespace created as if by calling the constructor new Namespace()
+			      2. Let name be a new QName created as if by calling the constructor new QName(nons, n.[[Name]])
+			    ii. Else
+			      1. Let name be a new QName created as if by calling the constructor new QName(n.[[Name]])
+			    iii. Create a new XML object a with a.[[Name]] = name, a.[[Class]] == "attribute" and a.[[Parent]] = x
+			    iv. Let x.[[Attributes]] = x.[[Attributes]] ∪ { a }
+			    v. Let ns be the result of calling the [[GetNamespace]] method of name with no arguments
+			    vi. Call the [[AddInScopeNamespace]] method of x with argument ns
+			  g. Let a.[[Value]] = c
+			  h. Return
+			7. Let isValidName be the result of calling the function isXMLName (section 13.1.2.1) with argument n
+			8. If isValidName is false and n.localName is not equal to the string "*", return
+			9. Let i = undefined
+			10. Let primitiveAssign = (Type(c) ∉ {XML, XMLList}) and (n.localName is not equal to the string "*")
+			11. For (k = x.[[Length]]-1 downto 0)
+			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri )))
+			    i. If (i is not undefined), call the [[DeleteByIndex]] property of x with argument ToString(i)
+			    ii. Let i = k
+			12. If i == undefined
+			  a. Let i = x.[[Length]]
+			  b. If (primitiveAssign == true)
+			    i. If (n.uri == null)
+			      1. Let name be a new QName created as if by calling the constructor new QName(GetDefaultNamespace(), n)
+			    ii. Else
+			      1. Let name be a new QName created as if by calling the constructor new QName(n)
+			    iii. Create a new XML object y with y.[[Name]] = name, y.[[Class]] = "element" and y.[[Parent]] = x
+			    iv. Let ns be the result of calling [[GetNamespace]] on name with no arguments
+			    v. Call the [[Replace]] method of x with arguments ToString(i) and y
+			    vi. Call [[AddInScopeNamespace]] on y with argument ns
+			13. If (primitiveAssign == true)
+			  a. Delete all the properties of the XML object x[i]
+			  b. Let s = ToString(c)
+			  c. If s is not the empty string, call the [[Replace]] method of x[i] with arguments "0" and s
+			14. Else
+			  a. Call the [[Replace]] method of x with arguments ToString(i) and c
+			15. Return
+			*/
+			var i:int;
+			var len:int;
+			var chld:XML;
+			
+			if(elements is XML)
+			{
+				var list:XMLList = new XMLList();
+				list[0] = elements;
+				elements = list;
+			}
+			if(elements is XMLList)
+			{
+				var chldrn:XMLList = this.child(elementName);
+				var childIdx:int = children().length() -1;
+				if(chldrn.length())
+					childIdx = chldrn[0].childIndex();
+				
+				len = chldrn.length() -1;
+				for (i= len; i >= 0;  i--)
+				{
+					// remove the nodes
+					// remove the children
+					// adjust the childIndexes
+				}
+				var curChild = _children[childIdx];
+				// Now add them in.
+				for each(chld in elements)
+				{
+				
+					if(!curChild)
+					{
+						curChild = appendChild(chld);
+					}
+					else {
+						curChild = insertChildAfter(curChild, chld);
+					}
+				}
+			}
+			//what to do if it's not XML or XMLList? Throw an error? Ignore?
+			
+		}
+
+		/**
+		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function setChildren(value:Object):XML
+		{
+			if(value is XML)
+			{
+				var list:XMLList = new XMLList();
+				list[0] = value;
+				value = list;
+			}
+			if(elements is XMLList)
+			{
+				// remove all existing elements
+				var chldrn:XMLList = this.child(elementName);
+				var childIdx:int = children().length() -1;
+				if(chldrn.length())
+					childIdx = chldrn[0].childIndex();
+				
+				len = chldrn.length() -1;
+				for (i= len; i >= 0;  i--)
+				{
+					// remove the nodes
+					// remove the children
+					// adjust the childIndexes
+				}
+				var curChild = _children[childIdx];
+				// Now add them in.
+				for each(chld in elements)
+				{
+					
+					if(!curChild)
+					{
+						curChild = appendChild(chld);
+					}
+					else {
+						curChild = insertChildAfter(curChild, chld);
+					}
+				}
+			}
+
+			return this;
+		}
+		
+		/**
+		 * Changes the local name of the XML object to the given name parameter.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function setLocalName(name:String):void
+		{
+			
+		}
+		
+		/**
+		 * Sets the name of the XML object to the given qualified name or attribute name.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function setName(name:String):void
+		{
+			
+		}
+		
+		/**
+		 * Sets the namespace associated with the XML object.
+		 * 
+		 * @param ns
+		 * 
+		 */
+		public function setNamespace(ns:Namespace):void
+		{
+			
+		}
+		
+		public function setParent(parent:XML):void
+		{
+			_parentXML = parent;
+		}
+		
+		/**
+		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @param rest
+		 * 
+		 */
+		static public function setSettings(... rest):void
+		{
+
+		}
+		
+		/**
+		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @return 
+		 * 
+		 */
+		static public function settings():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function text():XMLList
+		{
+			return null;
+		}
+		
+		/**
+		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
+		 * 
+		 * @param k
+		 * @return 
+		 * 
+		 */
+		public function toJSON(k:String):*
+		{
+			return this.name();
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toString():String
+		{
+			// text, comment, processing-instruction, attribute, or element
+			if(_nodeKind == "text" || _nodeKind == "attribute")
+				return _value;
+			if(_nodeKind == "comment")
+				return "";
+			if(_nodeKind == "processing-instruction")
+				return "";
+			return toXMLString();
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toXMLString():String
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function valueOf():XML
+		{
+			return this;
+		}
+		
+		private function removeAllNodeChildren():void
+		{
+			var lastChild = _node.lastChild;
+			while(lastChild)
+			{
+				_node.removeChild(lastChild);
+				lastChild = _node.lastChild;
+			}
+		}
+	}
+}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLClasses.as b/frameworks/projects/XML/as/src/XMLClasses.as
new file mode 100644
index 0000000..6a91d82
--- /dev/null
+++ b/frameworks/projects/XML/as/src/XMLClasses.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+/**
+ *  @private
+ *  This class is used to link additional classes into rpc.swc
+ *  beyond those that are found by dependency analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class XMLClasses
+{
+	COMPILE::JS
+	{
+		import XML; XML;
+		import XMLList; XMLList;
+		import QName; QName;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
new file mode 100644
index 0000000..f1dd61d
--- /dev/null
+++ b/frameworks/projects/XML/as/src/XMLList.as
@@ -0,0 +1,611 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class XMLList
+	{
+		public function XMLList()
+		{
+			addIndex(0);
+		}
+		private var _xmlArray:Array = [];
+		/*
+			9.2.1.2 [[Put]] (P, V)
+			Overview
+			The XMLList type overrides the internal [[Put]] method defined by the Object type. The XMLList [[Put]] method is used to modify or replace an XML object within the XMLList and the context of its parent. In addition, when the XMLList contains a single property with an XML object, the [[Put]] method is used to modify, replace, and insert properties or XML attributes of that value by name. The input argument P identifies which portion of the XMLList and associated XML objects will be affected and may be a numeric property name, an unqualified name for an XML attribute (distinguished from XML valued property names by a leading “@” symbol) or set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes or the properties wildcard “*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes
  in no namespace. The input argument V may be a value of type XML, XMLList or any value that can be converted to a String with ToString().
+			NOTE Unlike the internal Object [[Put]] method, the internal XMLList [[Put]] method is never used for modifying the set of methods associated with XMLList objects.
+			Semantics
+			When the [[Put]] method of an XMLList object x is called with property name P and value V, the following steps are taken:
+			1. Let i = ToUint32(P)
+			2. If ToString(i) == P
+			  a. If x.[[TargetObject]] is not null
+			    i. Let r be the result of calling the [[ResolveValue]] method of x.[[TargetObject]]
+			    ii. If r == null, return
+			  b. Else let r = null
+			  c. If i is greater than or equal to x.[[Length]]
+			    i. If Type(r) is XMLList
+			      1. If r.[[Length]] is not equal to 1, return
+			      2. Else let r = r[0]
+			    ii. If r.[[Class]] is not equal to "element", return
+			    iii. Create a new XML object y with y.[[Parent]] = r, y.[[Name]] = x.[[TargetProperty]], y.[[Attributes]] = {}, y.[[Length]] = 0
+			    iv. If Type(x.[[TargetProperty]]) is AttributeName
+			      1. Let attributeExists be the result of calling the [[Get]] method of r with argument y.[[Name]]
+			      2. If (attributeExists.[[Length]] > 0), return
+			      3. Let y.[[Class]] = "attribute"
+			    v. Else if x.[[TargetProperty]] == null or x.[[TargetProperty]].localName == "*"
+			      1. Let y.[[Name]] = null
+			      2. Let y.[[Class]] = "text"
+			    vi. Else let y.[[Class]] = "element"
+			    vii. Let i = x.[[Length]]
+			    viii. If (y.[[Class]] is not equal to "attribute")
+			      1. If r is not null
+			        a. If (i > 0)
+			          i. Let j = 0
+			          ii. While (j < r.[[Length]]-1) and (r[j] is not the same object as x[i-1])
+			            1. Let j = j + 1
+			        b. Else
+			          i. Let j = r.[[Length]]-1
+			        c. Call the [[Insert]] method of r with arguments ToString(j+1) and y
+			      2. If Type(V) is XML, let y.[[Name]] = V.[[Name]]
+			      3. Else if Type(V) is XMLList, let y.[[Name]] = V.[[TargetProperty]]
+			    ix. Call the [[Append]] method of x with argument y
+			  d. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"}), let V = ToString(V)
+			  e. If x[i].[[Class]] == "attribute"
+			    i. Let z = ToAttributeName(x[i].[[Name]])
+			    ii. Call the [[Put]] method of x[i].[[Parent]] with arguments z and V
+			    iii. Let attr be the result of calling [[Get]] on x[i].[[Parent]] with argument z
+			    iv. Let x[i] = attr[0]
+			  f. Else if Type(V) is XMLList
+			    i. Create a shallow copy c of V
+			    ii. Let parent = x[i].[[Parent]]
+			    iii. If parent is not null
+			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
+			      2. Call the [[Replace]] method of parent with arguments q and c
+			      3. For j = 0 to c.[[Length]]-1
+			        a. Let c[j] = parent[ToUint32(q)+j]
+			    iv. If c.[[Length]] == 0
+			      1. For j = i + 1 to x.[[Length]] – 1, rename property j of x to ToString(j-1)
+			    v. Else
+			      1. For j = x.[[Length]]-1 downto i + 1, rename property j of x to ToString(j + c.[[Length]] - 1)
+			    vi. For j = 0 to c.[[Length]]-1, let x[i + j] = c[j]
+			    vii. Let x.[[Length]] = x.[[Length]] + c.[[Length]] - 1
+			  g. Else if (Type(V) is XML) or (x[i].[[Class]] ∈ {"text", "comment", "processing-instruction"})
+			    i. Let parent = x[i].[[Parent]]
+			    ii. If parent is not null
+			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
+			      2. Call the [[Replace]] method of parent with arguments q and V
+			      3. Let V = parent[q]
+			    iii. If Type(V) is String
+			      1. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = V
+			      2. Let x[i] = t
+			    iv. Else
+			      1. Let x[i] = V
+			  h. Else
+			    i. Call the [[Put]] method of x[i] with arguments "*" and V
+			3. Else if x.[[Length]] is less than or equal to 1
+			  a. If x.[[Length]] == 0
+			    i. Let r be the result of calling the [[ResolveValue]] method of x
+			    ii. If (r == null) or (r.[[Length]] is not equal to 1), return
+			    iii. Call the [[Append]] method of x with argument r
+			  b. Call the [[Put]] method of x[0] with arguments P and V
+			4. Return
+		*/
+		private function addIndex(idx:int):void
+		{
+			var idxStr:String = "" + idx;
+			Object.defineProperty(this,idxStr,
+				{
+					get: function() { return _xmlArray[idx]; },
+					set: function(newValue:*) {
+						var i:int;
+						if(newValue is XML)
+						{
+							_xmlArray[idx] = newValue;
+						}
+						else if(newValue is XMLList)
+						{
+							var len:int = newValue.length();
+							for(i=0;i<len;i++)
+							{
+								// replace the first one and add each additonal one.
+								if(i==0)
+									_xmlArray[idx] = newValue[i];
+								else
+									_xmlArray.splice(idx+i,0,newValue[i]);
+							}
+						}
+						// add indexes as necessary
+						while(idx++ < _xmlArray.length)
+						{
+							if(!this.hasOwnProperty(idx))
+								addIndex(idx);
+						}
+					},
+					enumerable: true,
+					configurable: true
+				}
+			);
+		}
+		
+		public function appendChild(child:XML):void
+		{
+			addIndex(_xmlArray.length);
+			_xmlArray[_xmlArray.length] = child;
+		}
+		
+		/**
+		 * Calls the attribute() method of each XML object and returns an XMLList object of the results.
+		 * 
+		 * @param attributeName
+		 * @return 
+		 * 
+		 */
+		public function attribute(attributeName:*):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].attribute(attributeName);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the attributes() method of each XML object and returns an XMLList object of attributes for each XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function attributes():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].attributes();
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the child() method of each XML object and returns an XMLList object that contains the results in order.
+		 * 
+		 * @param propertyName
+		 * @return 
+		 * 
+		 */
+		public function child(propertyName:Object):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].child(propertyName);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the children() method of each XML object and returns an XMLList object that contains the results.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function children():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].children();
+				if(list.length)
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		/**
+		 * Calls the comments() method of each XML object and returns an XMLList of comments.
+		 * @return 
+		 * 
+		 */
+		public function comments():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].comments();
+				if(list.length)
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		public function concat(list:XMLList):XMLList
+		{
+			var retVal:XMLList = this.copy();
+			var item:XML;
+			for each(item in list)
+				retVal.appendChild(item);
+				
+			return retVal;
+		}
+		
+		/**
+		 * Checks whether the XMLList object contains an XML object that is equal to the given value parameter.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function contains(value:XML):Boolean
+		{
+			
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				if(this[i].contains(value))
+					return true;
+			}
+			return false;
+		}
+		
+		/**
+		 * Returns a copy of the given XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function copy():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+				retVal[i] = this[i].copy();
+			
+			return retVal;
+		}
+		
+		/**
+		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function descendants(name:Object = *):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].descendants(name);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		/**
+		 * Calls the elements() method of each XML object.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function elements(name:Object = *):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].elements(name);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		public function hasComplexContent():Boolean
+		{
+			//what to do with multiple nodes? If anything is complex, we return true.
+			if(this.length() == 0)
+				return false;
+			var len:int = this.length();
+			for (var i:int=1;i<len;i++)
+			{
+				if(this[i].hasComplexContent())
+					return true;
+			}
+			return false;
+		}
+
+		public function hasOwnProperty(propertyName:*):Boolean
+		{
+			/*
+				Overview
+				The XMLList type overrides the internal [[HasProperty]] method defined by the Object type. The XMLList [[HasProperty]] method is used to determine whether this XMLList object contains an XML element or attribute by its ordinal position or whether any of the objects contained in this XMLList object contains an XML element or attribute by its name. The input argument P may be a numeric property name, an unqualified name for an XML attribute (distinguished from the name of XML elements by a leading “@” symbol) or a set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes, the properties wildcard “*” or the attributes wildcard “@*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes in no namespace.
+				Semantics
+				When the [[HasProperty]] method of an XMLList object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P
+				a. Return (ToUint32(P) < x.[[Length]])
+				2. For i = 0 to x.[[Length]]-1
+				a. If x[i].[[Class]] == "element" and the result of calling the [[HasProperty]] method of x[i] with argument P == true, return true
+				3. Return false			
+			*/
+			if(parseInt(propertyName,10).toString() == propertyName)
+			{
+				return parseInt(propertyName,10) < this.length();
+			}
+			var len:int = this.length();
+			for (var i:int=1;i<len;i++)
+			{
+				if(this[i].hasOwnProperty(propertyName))
+					return true;
+			}
+			return false;
+		}
+		
+		/**
+		 * Checks whether the XMLList object contains simple content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasSimpleContent():Boolean
+		{
+			//what to do with multiple nodes? If anything is complex, we return false.
+			if(this.length() == 0)
+				return true;
+			var len:int = this.length();
+			for (var i:int=1;i<len;i++)
+			{
+				if(this[i].hasComplexContent())
+					return false;
+			}
+			return true;
+		}
+		
+		/**
+		 * Returns the number of items in the XMLList.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function length():int
+		{
+			return _xmlArray.length;
+		}
+		
+		/**
+		 * Merges adjacent text nodes and eliminates empty text nodes for each of the following:
+		 * all text nodes in the XMLList, all the XML objects contained in the XMLList, and the descendants of all the XML objects in the XMLList.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function normalize():XMLList
+		{
+			//TODO: Figure out what to do here.
+		}
+		
+		/**
+		 * Returns the parent of the XMLList object if all items in the XMLList object have the same parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function parent():Object
+		{
+			if(this.length() == 0)
+				return null;
+			var retVal = this[0].parent;
+			var len:int = this.length();
+			for (var i:int=1;i<len;i++)
+			{
+				if(this[i].parent != retVal)
+					return null;
+			}
+			return retVal;
+		}
+		
+		/**
+		 * If a name parameter is provided, lists all the children of the XMLList object that contain processing instructions with that name.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function processingInstructions(name:String = "*"):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			if(!name)
+				return retVal;
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				if(this[i].nodeKind() != "processing-instruction")
+					continue;
+				if(name == "*")
+				{
+					retVal.appendChild(this[i]);
+				}
+				else if(name == this[i].localName)
+					retVal.appendChild(this[i]);
+			}
+			return retVal;
+		}
+
+		public function removeChild(child:*):void
+		{
+			var i:int;
+			var len:int;
+			if(child is XMLList)
+			{
+				len = child.length();
+				for(i=0;i<len;i++)
+				{
+					removeChild(child[i]);
+				}
+			}
+			else if(child is XML)
+			{
+				len = _xmlArray.length-1;
+				for(i=len; i >= 0; i--)
+				{
+					if(_xmlArray[i] == child)
+					{
+						_xmlArray.splice(i,1);
+					}
+				}
+			}
+		}
+
+		public function removeChildAt(idx:int):void
+		{
+			if(idx >= 0 && idx < _xmlArray.length)
+				_xmlArray.splice(idx,1);
+		}
+
+		private var _targetObject:*;
+		/**
+		 * @private
+		 * 
+		 * Internally used to store an associated XML or XMLList object which will be effected by operations
+		 */
+		public function set targetObject(value:*):void
+		{
+			_targetObject = value;
+		}
+		public function get targetObject():*
+		{
+			return _targetObject;
+		}
+
+		private var _targetProperty:*;
+		/**
+		 * @private
+		 * 
+		 * The name of a property that may be created in the targetObject when objects are added to an empty XMLList.
+		 */
+		public function set targetProperty(value:*):void
+		{
+			_targetProperty = value;
+		}
+		public function get targetProperty():*
+		{
+			return _targetProperty;
+		}
+		
+		/**
+		 * Calls the text() method of each XML object and returns an XMLList object that contains the results.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function text():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = this[i].text();
+				if(list.length())
+					retVal.concat(list);
+			}
+			return retVal;
+		}
+
+		/**
+		 * Returns the string representation of this object, formatted according to locale-specific conventions.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toLocaleString():String
+		{
+			var retVal:Array = [];
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = this[i].toLocaleString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns a string representation of all the XML objects in an XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toString():String
+		{
+			var retVal:Array = [];
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = this[i].toString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns a string representation of all the XML objects in an XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toXMLString():String
+		{
+			var retVal:Array = [];
+			var len:int = this.length();
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = this[i].toXMLString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns the XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function valueOf():XMLList
+		{
+			return this;
+		}
+	}
+}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
new file mode 100644
index 0000000..14b85ea
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/IJXON.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public interface IJXON
+	{
+		function isText():Boolean;
+		function toString():String;
+		function children():JXONList;
+		function attributes():JXONList;
+		function get nodeKind():String
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
new file mode 100644
index 0000000..c4ae7d8
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXON.as
@@ -0,0 +1,544 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXON implements IJXON
+	{
+		public function JXON(xml:String)
+		{
+			
+		}
+		public function isText():Boolean
+		{
+			return false;
+		}
+		
+
+		private var _appliedNamespace:JXONNamespace;
+
+		public function get appliedNamespace():JXONNamespace
+		{
+			return _appliedNamespace;
+		}
+
+		public function set appliedNamespace(value:JXONNamespace):void
+		{
+			_appliedNamespace = value;
+		}
+		
+		private var _namespaces:Array;
+		private var _uriLookup:Object;
+		private function get uriLookup():Object{
+			if(!_uriLookup)
+				_uriLookup = {};
+			return _uriLookup;
+		}
+		private var _prefixLookup:Object
+		private function get prefixLookup():Object{
+			if(!_prefixLookup)
+				_prefixLookup = {};
+			return _prefixLookup;
+		}
+
+		/**
+		 * Adds a namespace to the set of in-scope namespaces for the XML object.
+		 *  
+		 * @param ns
+		 * 
+		 */
+		public function addNamespace(ns:JXONNamespace):void
+		{
+			//throw an error?
+			if(prefixLookup[ns.prefix])
+				return;
+			
+			if(uriLookup[ns.uri])
+				return;
+			
+			prefixLookup[ns.prefix] = ns;
+			uriLookup[ns.uri] = ns;
+			_namespaces.push(ns);
+		}
+		
+		/**
+		 * Appends the given child to the end of the XML object's properties.
+		 *  
+		 * @param child
+		 * @return 
+		 * 
+		 */
+		public function appendChild(child:IJXON):IJXON
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
+		 * 
+		 * @param attributeName
+		 * @return 
+		 * 
+		 */
+		public function attribute(attributeName:*):JXONList
+		{
+			return null;
+		}
+		
+		private var _attributes:Array;
+
+		/**
+		 * Returns a list of attribute values for the given XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get attributes():JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Lists the children of an XML object with a specific property name.
+		 *  
+		 * @param propertyName
+		 * @return 
+		 * 
+		 */
+		public function child(propertyName:Object):JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Identifies the zero-indexed position of this XML object within the context of its parent.
+		 *  
+		 * @return 
+		 * 
+		 */
+		public function childIndex():int
+		{
+			//TODO
+			return 0;
+		}
+		
+		private var _children:JXONList;
+		
+		/**
+		 * Lists the children of the XML object in the sequence in which they appear.
+		 *  
+		 * @return 
+		 * 
+		 */
+		public function get children():JXONList
+		{
+			return _children;
+		}
+		
+		//comments():XMLList include?
+		//Lists the properties of the XML object that contain XML comments.
+		
+		/**
+		 * Compares the XML object against the given value parameter.
+		 *  
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function contains(value:JXON):Boolean
+		{
+			//TODO
+			return true;
+		}
+		
+		/**
+		 * Returns a copy of the given XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function copy():JXON
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns an object with the following properties set to the default values: 
+		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @return 
+		 * 
+		 */
+		static public function defaultSettings():Object
+		{
+			return {};
+		}
+		
+		/**
+		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
+		 *  
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function descendants(name:Object = null):JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Lists the elements of an XML object.
+		 *  
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function elements(name:Object = null):JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * filters XML content based on logic in the callback function
+		 * @param callback
+		 * @param thisObject
+		 * @return 
+		 * 
+		 */
+		public function filter(callback:Function, thisObject:* = null):JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Checks to see whether the XML object contains complex content.
+		 *  
+		 * @return 
+		 * 
+		 */
+		public function hasComplexContent():Boolean
+		{
+			return true;
+		}
+		
+		/**
+		 * Checks to see whether the XML object contains simple content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasSimpleContent():Boolean
+		{
+			return true;
+		}
+		
+		/**
+		 * Lists the namespaces for the XML object, based on the object's parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function inScopeNamespaces():Array
+		{
+			return null;
+		}
+		
+		/**
+		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildAfter(child1:Object, child2:Object):*
+		{
+			
+		}
+		
+		/**
+		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
+		 * 
+		 * @param child1
+		 * @param child2
+		 * @return 
+		 * 
+		 */
+		public function insertChildBefore(child1:Object, child2:Object):*
+		{
+			
+		}
+		
+		/**
+		 * For XML objects, this method always returns the integer 1.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get length():int
+		{
+			return 1;
+		}
+		
+		/**
+		 * Gives the local name portion of the qualified name of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get localName():Object
+		{
+			return null;
+		}
+		/**
+		 * Changes the local name of the XML object to the given name parameter.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function set localName(name:String):void
+		{
+			
+		}
+		/**
+		 * Gives the qualified name for the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get name():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * Sets the name of the XML object to the given qualified name or attribute name.
+		 * 
+		 * @param name
+		 * 
+		 */
+		public function set name(name:String):void
+		{
+			
+		}
+		
+		/**
+		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
+		 * @param prefix
+		 * @return 
+		 * 
+		 */
+		public function xmlNamespace(prefix:String = null):*
+		{
+			
+		}
+		
+		/**
+		 * Lists namespace declarations associated with the XML object in the context of its parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get namespaceDeclarations():Array
+		{
+			return null;
+		}
+		
+		/**
+		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get nodeKind():String
+		{
+			return "element";
+		}
+		
+		/**
+		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function normalize():JXON
+		{
+			return null;
+		}
+		
+		private var _parent:*;
+
+		public function set parent(value:*):void
+		{
+			_parent = value;
+		}
+
+		/**
+		 * Returns the parent of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get parent():*
+		{
+			return _parent;
+		}
+		
+		/**
+		 * Inserts a copy of the provided child object into the XML element before any existing XML properties for that element.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function prependChild(value:Object):JXON
+		{
+			return null;
+		}
+		
+		/**
+		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function processingInstructions(name:String = ""):JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Removes the given namespace for this object and all descendants.
+		 * 
+		 * @param ns
+		 * @return 
+		 * 
+		 */
+		public function removeNamespace(ns:Namespace):JXON
+		{
+			return null;
+		}
+		
+		/**
+		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
+		 * 
+		 * @param propertyName
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function replace(propertyName:Object, value:JXON):JXON
+		{
+			return null;
+		}
+		
+		/**
+		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function setChildren(value:JXONList):JXON
+		{
+			return null;
+		}
+		
+		
+		/**
+		 * Sets the namespace associated with the XML object.
+		 * 
+		 * @param ns
+		 * 
+		 */
+		public function setNamespace(ns:JXONNamespace):void
+		{
+			
+		}
+		
+		/**
+		 * Sets values for the following XML properties:
+		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @param rest
+		 * 
+		 */
+		static public function setSettings(... rest):void
+		{
+			
+		}
+		
+		/**
+		 * Retrieves the following properties:
+		 * ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @return 
+		 * 
+		 */
+		static public function getSettings():Object
+		{
+			return null;
+		}
+		
+		/**
+		 * Returns an XMLNodeList object of all XML properties of the XML object that represent XML text nodes.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function get text():JXONList
+		{
+			return null;
+		}
+		
+		/**
+		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
+		 * 
+		 * @param k
+		 * @return 
+		 * 
+		 */
+		public function toJSON(k:String):*
+		{
+			
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toString():String
+		{
+			return "";
+		}
+		
+		/**
+		 * Returns a string representation of the XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toXMLString():String
+		{
+			return "";
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
new file mode 100644
index 0000000..5ed9ce0
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONAttribute.as
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONAttribute implements IJXON
+	{
+		public function JXONAttribute(name:String="",value:String="")
+		{
+			_name = name;
+			_value = value;
+		}
+		
+		private var _name:String;
+
+		public function get name():String
+		{
+			return _name;
+		}
+
+		public function set name(value:String):void
+		{
+			_name = value;
+		}
+		
+		private var _value:String;
+
+		public function get value():String
+		{
+			return _value;
+		}
+
+		public function set value(value:String):void
+		{
+			_value = value;
+		}
+
+
+		public function isText():Boolean
+		{
+			return false;
+		}
+		
+		public function toString():String
+		{
+			return null;
+		}
+		
+		public function children():JXONList
+		{
+			return null;
+		}
+		
+		public function attributes():JXONList
+		{
+			return null;
+		}
+		
+		public function get nodeKind():String
+		{
+			return "attribute";
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
new file mode 100644
index 0000000..649cb5c
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONComment.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONComment implements IJXON
+	{
+		public function JXONComment()
+		{
+		}
+		
+		public function isText():Boolean
+		{
+			return false;
+		}
+		
+		public function toString():String
+		{
+			return null;
+		}
+		
+		public function children():JXONList
+		{
+			return null;
+		}
+		
+		public function attributes():JXONList
+		{
+			return null;
+		}
+		
+		public function get nodeKind():String
+		{
+			return "comment";
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
new file mode 100644
index 0000000..27738d3
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONInstruction.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONInstruction implements IJXON
+	{
+		public function JXONInstruction()
+		{
+		}
+		
+		public function isText():Boolean
+		{
+			return false;
+		}
+		
+		public function toString():String
+		{
+			return null;
+		}
+		
+		public function children():JXONList
+		{
+			return null;
+		}
+		
+		public function attributes():JXONList
+		{
+			return null;
+		}
+		
+		public function get nodeKind():String
+		{
+			return "processing-instruction";
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
new file mode 100644
index 0000000..2fd1bd1
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONList.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONList extends Array
+	{
+		public function JXONList(...parameters)
+		{
+			super(parameters);
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
new file mode 100644
index 0000000..23eb15e
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONNamespace.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONNamespace
+	{
+		
+		/**
+		 * Constructor
+		 * 
+		 * @param prefix
+		 * @param uri
+		 * 
+		 *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.5.0
+		 * 
+		 */
+		public function JXONNamespace(prefix:String,uri:String)
+		{
+			_prefix = prefix;
+			_uri = uri;
+		}
+		
+		private var _prefix:String;
+
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+		
+		private var _uri:String;
+
+		public function get uri():String
+		{
+			return _uri;
+		}
+
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
new file mode 100644
index 0000000..d108edc
--- /dev/null
+++ b/frameworks/projects/XML/as/src/org/apache/flex/core/xml/JXONText.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core.xml
+{
+	public class JXONText implements IJXON
+	{
+		public function JXONText()
+		{
+		}
+		
+		public function isText():Boolean
+		{
+			return true;
+		}
+		
+		public function toString():String
+		{
+			return null;
+		}
+		
+		public function children():JXONList
+		{
+			return null;
+		}
+		
+		public function attributes():JXONList
+		{
+			return null;
+		}
+		
+		public function get nodeKind():String
+		{
+			return "text";
+		}
+	}
+}
\ No newline at end of file


[12/49] git commit: [flex-asjs] [refs/heads/develop] - hasComplexContent(), hasOwnProperty(), hasSimpleContent()

Posted by ha...@apache.org.
hasComplexContent(),hasOwnProperty(),hasSimpleContent()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cf9de31c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cf9de31c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cf9de31c

Branch: refs/heads/develop
Commit: cf9de31cff3124407239f832f3913142680d7439
Parents: f6aee89
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 17:01:19 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 17:01:19 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 53 ++++++++++++++++++++++++++++--
 1 file changed, 50 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cf9de31c/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index e14f8f0..c2dfbe8 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -870,10 +870,25 @@ package
 		 */
 		public function hasComplexContent():Boolean
 		{
-			return false
+			/*
+				When the hasComplexContent method is called on an XML object x, the following steps are taken:
+				1. If x.[[Class]] ∈ {"attribute", "comment", "processing-instruction", "text"}, return false
+				2. For each property p in x
+				a. If p.[[Class]] == "element", return true
+				3. Return false
+			*/
+			if(_nodeKind == "attribute" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "text")
+				return false;
+			var i:int;
+			for(i=0i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					return true;
+			}
+			return false;
 		}
 
-		public function hasOwnProperty():Boolean
+		public function hasOwnProperty(p:*):Boolean
 		{
 			/*
 				When the [[HasProperty]] method of an XML object x is called with property name P, the following steps are taken:
@@ -890,6 +905,23 @@ package
 				    i. Return true
 				5. Return false
 			*/
+			if(parseInt(p,10).toString() == p)
+				return p == "0";
+			var name:QName = toXMLName(p);
+			var i:int;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_attributes[i].name().matches(name))
+					return true;
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() != "element")
+					continue;
+				if(_children[i].name().matches(name))
+					return true;
+			}
+			return false;
 		}
 				
 		/**
@@ -900,7 +932,22 @@ package
 		 */
 		public function hasSimpleContent():Boolean
 		{
-			return false;
+			/*
+				When the hasSimpleContent method is called on an XML object x, the following steps are taken:
+				1. If x.[[Class]] ∈ {"comment", "processing-instruction"}, return false
+				2. For each property p in x
+				a. If p.[[Class]] == "element", return false
+				3. Return true
+			*/
+			if(_nodeKind == "comment" || _nodeKind == "processing-instruction")
+				return false;
+			var i:int;
+			for(i=0i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					return false;
+			}
+			return true;
 		}
 		
 		/**


[35/49] git commit: [flex-asjs] [refs/heads/develop] - add flag to XML cross-compile:

Posted by ha...@apache.org.
add flag to XML cross-compile:


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1ffb32f5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1ffb32f5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1ffb32f5

Branch: refs/heads/develop
Commit: 1ffb32f53c63f3d31ee2cb8fefa5f26ae1482f5c
Parents: 916989a
Author: Alex Harui <ah...@apache.org>
Authored: Fri Feb 19 10:53:32 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Feb 19 10:53:32 2016 -0800

----------------------------------------------------------------------
 frameworks/projects/XML/build.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1ffb32f5/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index dd46000..6251bd9 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -109,6 +109,7 @@
             <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
             <arg value="+flexlib=${FLEX_HOME}/frameworks" />
             <arg value="-js-output-type=FLEXJS" />
+            <arg value="-compiler.strict-xml=true" />
             <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
             <arg value="-output=${basedir}/target/generated-sources/flexjs" />
             <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />


[04/49] git commit: [flex-asjs] [refs/heads/develop] - Added some more XML methods

Posted by ha...@apache.org.
Added some more XML methods


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dc52078e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dc52078e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dc52078e

Branch: refs/heads/develop
Commit: dc52078ee510a2cb3e1fc1e15d9835ad5cb4b176
Parents: 09c5c4f
Author: Harbs <ha...@in-tools.com>
Authored: Wed Feb 3 17:56:22 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Feb 3 17:56:22 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/QName.as |  10 ++
 frameworks/projects/XML/as/src/XML.as   | 147 ++++++++++++++++++++-------
 2 files changed, 120 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc52078e/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
index a3a1244..d24b7a7 100644
--- a/frameworks/projects/XML/as/src/QName.as
+++ b/frameworks/projects/XML/as/src/QName.as
@@ -104,6 +104,16 @@ package
 		{
 			return this.uri == name.uri && this.prefix == name.prefix && this.localName == name.localName;
 		}
+		public function matches(name:QName):Boolean
+		{
+			if(this.uri == "*" || name.uri == "*")
+				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
+
+			if(this.localName == "*" || name.localName == "*")
+				return this.uri == name.uri;
+
+			return this.uri == name.uri && this.localName == name.localName;
+		}
 		private var _isAttribute:Boolean;
 		public function get isAttribute():Boolean
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc52078e/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index f1aa656..aad27ce 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -230,6 +230,57 @@ package
 			return value.replace(/^\s+|\s+$/gm,'');
 		}
 
+		/**
+		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @return 
+		 * 
+		 */
+		static public function defaultSettings():Object
+		{
+			return {
+			    ignoreComments : true,
+			    ignoreProcessingInstructions : true,
+			    ignoreWhitespace : true,
+			    prettyIndent : 2,
+			    prettyPrinting : true
+			}
+		}
+		
+		/**
+		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * @param rest
+		 * 
+		 */
+		static public function setSettings(value:Object):void
+		{
+			if(!value)
+				return;
+				
+		    ignoreComments = value.ignoreComments === undefined ? ignoreComments : value.ignoreComments;
+		    ignoreProcessingInstructions = value.ignoreProcessingInstructions === undefined ? ignoreProcessingInstructions : value.ignoreProcessingInstructions;
+		    ignoreWhitespace = value.ignoreWhitespace === undefined ? ignoreWhitespace : value.ignoreWhitespace;
+		    prettyIndent = value.prettyIndent === undefined ? prettyIndent : value.prettyIndent;
+		    prettyPrinting = value.prettyPrinting === undefined ? prettyPrinting : value.prettyPrinting;
+		}
+		
+		/**
+		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
+		 * 
+		 * @return 
+		 * 
+		 */
+		static public function settings():Object
+		{
+			return {
+			    ignoreComments : ignoreComments,
+			    ignoreProcessingInstructions : ignoreProcessingInstructions,
+			    ignoreWhitespace : ignoreWhitespace,
+			    prettyIndent : prettyIndent,
+			    prettyPrinting : prettyPrinting
+			}
+		}
+
+
 		public function XML(xml:String = null)
 		{
 			if(xml != "")
@@ -401,11 +452,14 @@ package
 		public function attribute(attributeName:*):XMLList
 		{
 			var i:int;
+			if(attributeName == "*")
+				return attributes();
+
 			attributeName = toAttributeName(attributeName);
 			var list:XMLList = new XMLList();
 			for(i=0;i<_attributes.length;i++)
 			{
-				if(_atributes[i].name().equals(attributeName))
+				if(_atributes[i].name().matches(attributeName))
 					list.appendChild(_atributes[i]);
 			}
 			list.targetObject = this;
@@ -421,7 +475,12 @@ package
 		 */
 		public function attributes():XMLList
 		{
-			return null;
+			var list:XMLList = new XMLList();
+			for(i=0;i<_attributes.length;i++)
+				list.appendChild(_atributes[i]);
+
+			list.targetObject = this;
+			return list;
 		}
 		
 		/**
@@ -435,6 +494,7 @@ package
 		{
 			/*
 			 * 
+			When the [[Get]] method of an XML object x is called with property name P, the following steps are taken:
 			1. If ToString(ToUint32(P)) == P
 			  a. Let list = ToXMLList(x)
 			  b. Return the result of calling the [[Get]] method of list with argument P
@@ -450,7 +510,36 @@ package
 			    i. Call the [[Append]] method of list with argument x[k]
 			6. Return list
 			*/
-			return null;
+			var i:int;
+			var list:XMLList = new XMLList();
+			if(parseInt(name,10).toString() == propertyName)
+			{
+				if(propertyName != "0")
+					return undefined;
+				list.appendChild(this);
+				list.targetObject = this;
+				return list;
+			}
+			propertyName = toXMLName(propertyName);
+			if(propertyName.isAttribute)
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(propertyName.matches(_attributes[i].name()))
+						list.append(_attributes[i]);
+				}
+			}
+			else
+			{
+				for(i=0;i<_children.length;i++)
+				{
+					if(propertyName.matches(_children[i].name()))
+						list.append(_children[i]);
+				}
+			}
+			list.targetObject = this;
+			list.targetProperty = propertyName;
+			return list;
 		}
 		
 		/**
@@ -475,7 +564,15 @@ package
 		 */
 		public function children():XMLList
 		{
-			return null;
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				//TODO filter out non-elements
+				if(propertyName.matches(_children[i].name()))
+					list.append(_children[i]);
+			}
+			list.targetObject = this;
+			return list;
 		}
 		
 		/**
@@ -486,7 +583,14 @@ package
 		 */
 		public function comments():XMLList
 		{
-			return null;
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "comment" && propertyName.matches(_children[i].name()))
+					list.append(_children[i]);
+			}
+			list.targetObject = this;
+			return list;
 		}
 		
 		/**
@@ -498,7 +602,7 @@ package
 		 */
 		public function contains(value:XML):Boolean
 		{
-			return null;
+			return this.equals(value);
 		}
 		
 		/**
@@ -530,16 +634,6 @@ package
 		}
 		
 		/**
-		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * @return 
-		 * 
-		 */
-		static public function defaultSettings():Object
-		{
-			return null;
-		}
-		
-		/**
 		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
 		 * 
 		 * @param name
@@ -1246,27 +1340,6 @@ package
 		}
 		
 		/**
-		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * @param rest
-		 * 
-		 */
-		static public function setSettings(... rest):void
-		{
-
-		}
-		
-		/**
-		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @return 
-		 * 
-		 */
-		static public function settings():Object
-		{
-			return null;
-		}
-		
-		/**
 		 * Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
 		 * 
 		 * @return 


[44/49] git commit: [flex-asjs] [refs/heads/develop] - Tweaked the test a bit to have nicer output

Posted by ha...@apache.org.
Tweaked the test a bit to have nicer output


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/90c70cea
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/90c70cea
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/90c70cea

Branch: refs/heads/develop
Commit: 90c70cea45047fd630a0bd7d916c75ef94dc230e
Parents: 5d2d0dd
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 16:03:46 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 16:03:46 2016 +0300

----------------------------------------------------------------------
 manualtests/XMLTest/src/MyInitialView.mxml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/90c70cea/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 8d2fff5..e57a0fc 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -47,8 +47,9 @@ limitations under the License.
                 var m:int;
                 var xml1:XML = <foo baz="true"/>;
                 trace(xml1.toXMLString());
+                trace(xml1.toXMLString() == '<foo baz="true"/>');
                 var baz:XMLList = xml1.@baz;
-                trace(xml1.@baz.toString());
+                trace("baz: " + xml1.@baz.toString() + " //true");
 
             }
 		]]>


[03/49] git commit: [flex-asjs] [refs/heads/develop] - more...

Posted by ha...@apache.org.
more...


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/09c5c4fd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/09c5c4fd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/09c5c4fd

Branch: refs/heads/develop
Commit: 09c5c4fd23c0ca086d1551919185507afb995095
Parents: a50de21
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 2 14:15:25 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 2 14:15:25 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/QName.as   |  31 ++
 frameworks/projects/XML/as/src/XML.as     | 653 ++++++++++++++++++++++---
 frameworks/projects/XML/as/src/XMLList.as |  14 +-
 3 files changed, 629 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/09c5c4fd/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
index 23a303a..a3a1244 100644
--- a/frameworks/projects/XML/as/src/QName.as
+++ b/frameworks/projects/XML/as/src/QName.as
@@ -53,6 +53,7 @@ package
 			else if(qNameOrUri is Namespace)
 			{
 				_uri = (qNameOrUri as Namespace).uri;
+				_prefix = (qNameOrUri as Namespace).prefix;
 				if(localNameVal)
 					_localName = localNameVal.toString();
 			}
@@ -83,6 +84,36 @@ package
 		{
 			_localName = value;
 		}
+
+		private var _prefix:String;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		public function toString():String
+		{
+			return _localName;
+		}
+
+		public function equals(name:QName):Boolean
+		{
+			return this.uri == name.uri && this.prefix == name.prefix && this.localName == name.localName;
+		}
+		private var _isAttribute:Boolean;
+		public function get isAttribute():Boolean
+		{
+			return _isAttribute;
+		}
+		public function set isAttribute(value:Boolean):void
+		{
+			_isAttribute = value;
+		}
+
 	}
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/09c5c4fd/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index e7bc294..f1aa656 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -29,6 +29,16 @@ package
 		 * the prefix together with the namespaceURI form a QName
 		*/
 
+		static private var defaultNamespace:Namespace;
+
+		static public function setDefaultNamespace(ns:*)
+		{
+			if(!ns)
+				defaultNamespace = null;
+			else
+				ns = new Namespace(ns);
+		}
+
 		/**
 		 * [static] Determines whether XML comments are ignored when XML objects parse the source XML data.
 		 *  
@@ -47,11 +57,28 @@ package
 		 */
 		static public var ignoreWhitespace:Boolean = true;
 		
+		static private var _prettyIndent:int = 2;
 		/**
 		 * [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true.
 		 * 
 		 */
-		static public var prettyIndent:int = 2;
+		static public function set prettyIndent(value:int):void
+		{
+			_prettyIndent = value;
+			_indentStr = "";
+			for(var i:int = 0; i < value; i++)
+			{
+				_indentStr = _indentStr + INDENT_CHAR;
+			}
+		}
+
+		static public function get prettyIndent():int
+		{
+			return _prettyIndent;
+		}
+
+		static private var _indentStr:String = "  ";
+		static private var INDENT_CHAR:String = " ";
 		
 		/**
 		 * [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
@@ -59,17 +86,170 @@ package
 		 */
 		static public var prettyPrinting:Boolean = true;
 		
+		static private function escapeAttributeValue(value:String):String
+		{
+			var outArr:Array = [];
+			var arr = value.split("");
+			var len:int = arr.length;
+			for(var i:int=0;i<len;i++)
+			{
+				switch(arr[i])
+				{
+					case "<":
+						outArr[i] = "&lt;";
+						break;
+					case "&":
+						outArr[i] = "&amp;";
+						break;
+					case "\u000A":
+						outArr[i] = "&#xA;";
+						break;
+					case "\u000D":
+						outArr[i] = "&#xD;";
+						break;
+					case "\u0009":
+						outArr[i] = "&#x9;";
+						break;
+					default:
+						outArr[i] = arr[i];
+						break;
+				}
+			}
+			return outArr.join("");
+		}
+
+		static private function escapeElementValue(value:String):String
+		{
+			var outArr:Array = [];
+			var arr = value.split("");
+			for(var i=0;i<arr.length;i++)
+			{
+				switch(arr[i])
+				{
+					case "<":
+						outArr[i] = "&lt;";
+						break;
+					case ">":
+						outArr[i] = "&gt;";
+						break;
+					case "&":
+						outArr[i] = "&amp;";
+						break;
+					default:
+						outArr[i] = arr[i];
+						break;
+				}
+			}
+			return outArr.join("");
+		}
+
+		static private function insertAttribute(att:Attr,parent:XML):XML()
+		{
+			var xml:XML = new XML();
+			xml.setParent(parent);
+			xml.setNodeKind("attribute");
+			xml.setName(att.name);
+			xml.setValue(att.value);
+			parent.
+			return xml;
+		}
+		static private function iterateElement(node:Element,xml:XML):void
+		{
+			// add attributes
+			for(i=0;i<node.attributes.length;i++)
+			{
+				insertAttribute(node.attributes[i],xml);
+			}
+			// loop through childNodes which will be one of:
+			// text, cdata, processing instrution or comment and add them as children of the element
+			for(i=0;i<node.childNodes.length;i++)
+			{
+				var child:XML = fromNode(node.childNodes[i]);
+				xml.addChild(child);
+			}
+		}
+		/**
+		* returns an XML object from an existing node without the need to parse the XML.
+		* The new XML object is not normalized
+		*/
 		static private function fromNode(node:Element):XML
 		{
-			// returns an XML object from an existing node without the need to parse the XML.
-			
+			var xml:XML;
+			var i:int;
+			var data:* = node.nodeValue;
+			switch(node.nodeType)
+			{
+				case 1:
+					//ELEMENT_NODE
+					xml = new XML();
+					xml.setNodeKind("element");
+					iterateElement(node,xml);
+					break;
+				//case 2:break;// ATTRIBUTE_NODE (handled separately)
+				case 3:
+					//TEXT_NODE
+					xml = new XML();
+					xml.setNodeKind("text");
+					xml.setValue(data);
+					break;
+				case 4:
+					//CDATA_SECTION_NODE
+					xml = new XML();
+					xml.setNodeKind("text");
+					data = "<![CDATA[" + data + "]]>";
+					xml.setValue(data);
+					break;
+				//case 5:break;//ENTITY_REFERENCE_NODE
+				//case 6:break;//ENTITY_NODE
+				case 7:
+					//PROCESSING_INSTRUCTION_NODE
+					xml = new XML();
+					xml.setNodeKind("processing-instruction");
+					xml.setName(node.nodeName);
+					xml.setValue(data);
+					break;
+				case 8:
+					//COMMENT_NODE
+					xml = new XML();
+					xml.setNodeKind("comment");
+					xml.setValue(data);
+					break;
+				//case 9:break;//DOCUMENT_NODE
+				//case 10:break;//DOCUMENT_TYPE_NODE
+				//case 11:break;//DOCUMENT_FRAGMENT_NODE
+				//case 12:break;//NOTATION_NODE
+				default:
+					throw new TypeError("Unknown XML node type!");
+					break;
+			}
+			return xml;
+		}
+
+		static private function trimXMLWhitespace(value:String):String
+		{
+			return value.replace(/^\s+|\s+$/gm,'');
 		}
 
-		public function XML(xml:String)
+		public function XML(xml:String = null)
 		{
-			var parser:DOMParser = new DOMParser();
-			_parentDocument = parser.parseFromString(xml, "application/xml");
-			_node = _parentDocument.childNodes[0];
+			if(xml != "")
+			{
+				var parser:DOMParser = new DOMParser();
+				// get error namespace. It's different in different browsers.
+				var errorNS:Element = parser.parseFromString('<', 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI;
+
+				var doc:Document = parser.parseFromString(xml, "application/xml");
+
+				//check for errors
+				if(doc.getElementsByTagNameNS(errorNS, 'parsererror').length > 0)
+        			throw new Error('XML parse error');
+    			
+				var node:Element = doc.childNodes[0];
+				_version = doc.xmlVersion;
+				_encoding = doc.xmlEncoding;
+				iterateElement(node,this);
+				normalize();
+			}
 			//need to deal with errors https://bugzilla.mozilla.org/show_bug.cgi?id=45566
 			
 			// get rid of nodes we do not want 
@@ -78,41 +258,45 @@ package
 
 		}
 		
-		private var _doc:Document;
 		private var _children:Array;
 		private var _attributes:Array;
 		private var _processingInstructions:Array;
-		private var _collection:HTMLCollection;
-		private var _nodeList:NodeList;
-		private var _parentDocument:Document;
-		private var _node:Element;
 		private var _parentXML:XML;
 		private var _name:*;
 		private var _value:String;
+		private var _version:String;
+		private var _encoding:String;
+		private var _appliedNamespace:Namespace;
+		private var _namespaces:Array = [];
 
 
-		public function getNode():Element
-		{
-			return _node;
-		}
-		
-		public function getDocument():Document
-		{
-			return _parentDocument;
-		}
-
-		public function setDocument(doc:Document)
+		/**
+		 * @private
+		 * 
+		 * Similar to appendChild, but accepts all XML types (text, comment, processing-instruction, attribute, or element)
+		 *
+		 * 	
+		 */
+		public function addChild(child:XML):void
 		{
-			if(_parentDocument != doc)
+			if(!child)
+				return;
+			
+			child.setParent(this);
+			if(child.nodeKind() =="attribute")
 			{
-				if(_node.parentElement)
-					_node.parentElement.removeChild(_node);
-				//I think just using importNode on the top level node with deep set to true if enough.
-				if(doc)
-					_node = doc.importNode(_node,true);
-				_parentDocument = doc;
+				if(!_attributes)
+					_attributes = [];
+
+				_attributes.push(child);
+
 			}
+			else
+				_children.push(child);
+			normalize();
 		}
+
+
 		/**
 		 * Adds a namespace to the set of in-scope namespaces for the XML object.
 		 *
@@ -120,7 +304,7 @@ package
 		 * @return 
 		 * 	
 		 */
-		public function addNamespace(ns:Object):XML
+		public function addNamespace(ns:Namespace):XML
 		{
 			/*
 				When the [[AddInScopeNamespace]] method of an XML object x is called with a namespace N, the following steps are taken:
@@ -139,7 +323,36 @@ package
 				    i. If attr.[[Name]].[[Prefix]] == N.prefix, let attr.[[Name]].prefix = undefined
 				3. Return
 			*/
-			return null;
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return this;
+			if(ns.prefix === undefined)
+				return this;
+			if(ns.prefix == "" && _name.uri == "")
+				return this;
+			var match:Namespace = null;
+			var i:int;
+			for(i=0;i<_namespaces.length;i++)
+			{
+				if(_namespaces[i].prefix == ns.prefix)
+				{
+					match = _namespaces[i];
+					break;
+				}
+			}
+			if(match)
+				_namespaces[i] = ns;
+			else
+				_namespaces.push(ns);
+
+			if(ns.prefix == _name.prefix)
+				_name.prefix = undefined;
+
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_attributes[i].name().prefix == ns.prefix)
+					_attributes[i].name().prefix = undefined;
+			}
+			return this;
 		}
 		
 		/**
@@ -170,12 +383,10 @@ package
 				  a. Call the [[Replace]] method of x with arguments i and V
 				12. Return
 			*/
-			child.setDocument(_parentDocument);
 			child.setParent(this);
 			
 			_children.push(child);
-			_node.appendChild(child.getNode());
-
+			normalize();
 			return child;
 		}
 		
@@ -189,7 +400,17 @@ package
 		 */
 		public function attribute(attributeName:*):XMLList
 		{
-			return null;
+			var i:int;
+			attributeName = toAttributeName(attributeName);
+			var list:XMLList = new XMLList();
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(_atributes[i].name().equals(attributeName))
+					list.appendChild(_atributes[i]);
+			}
+			list.targetObject = this;
+			list.targetProperty = attributeName;
+			return list;
 		}
 		
 		/**
@@ -240,7 +461,10 @@ package
 		 */
 		public function childIndex():int
 		{
-			return -1;
+			if(!parent)
+				return -1;
+
+			return parent.getIndexOf(this);
 		}
 		
 		/**
@@ -376,7 +600,54 @@ package
 				10. Return true
 			*/
 		}
+
+		private function getAncestorNamespaces(namespaces:Array):Array
+		{
+			//don't modify original
+			namespaces = namespaces.slice();
+			var nsIdx:int;
+			var pIdx:int;
+			if(_parentXML)
+			{
+				var parentNS:Array = _parentXML.inScopeNamespaces();
+				var len:int = parentNS.length;
+				for(pIdx=0;pIdx<len;pIdx++)
+				{
+					var curNS:Namespace = parentNS[pIdx];
+					var doInsert:Boolean = true;
+					for(nsIdx=0;nsIdx<namespaces.length;nsIdx++)
+					{
+						if(curNS.uri == namespaces[nsIdx].uri && curNS.prefix == namespaces[nsIdx].prefix)
+						{
+							doInsert = false;
+							break;
+						}
+					}
+					if(doInsert)
+						namespaces.push(curNS);
+
+				}
+				namespaces = _parentXML.getAncestorNamespaces(namespaces);
+			}
+			return namespaces;
+		}
+
+		public function getIndexOf(elem:XML):int
+		{
+			return _children.indexOf(elem);
+		}
 		
+		private function getURI(prefix:String):String
+		{
+			var i:int;
+			var namespaces:Array = getAncestorNamespaces(_namespaces);
+			for(i=0;i<namespaces.length;i++)
+			{
+				if(namespaces[i].prefix == prefix)
+					return namespaces[i].uri;
+			}
+			return "";
+		}
 		/**
 		 * Checks to see whether the XML object contains complex content.
 		 * 
@@ -476,6 +747,8 @@ package
 		{
 			return null;
 		}
+
+		private var _name:QName;
 		
 		/**
 		 * Gives the qualified name for the XML object.
@@ -485,6 +758,7 @@ package
 		 */
 		public function name():Object
 		{
+			return _name;
 			return null;
 		}
 		
@@ -511,7 +785,7 @@ package
 			return null;
 		}
 		
-		private var _nodeKind:String;
+		private var _nodeKind:String = "element";
 		/**
 		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
 		 * @return 
@@ -519,7 +793,7 @@ package
 		 */
 		public function nodeKind():String
 		{
-			return null;
+			return _nodeKind;
 		}
 		
 		/**
@@ -530,7 +804,31 @@ package
 		 */
 		public function normalize():XML
 		{
-			return null;
+			var len:int = this._children.length-1;
+			var lastChild:XML;
+			for(var i:int=len;i>=0;i--)
+			{
+				var child:XML = this.child(i)[0];
+				// can we have a null child?
+
+				if(child.nodeKind() == "element")
+				{
+					child.normalize();
+				}
+				else if(child.nodeKind() == "text")
+				{
+					if(lastChild && lastChild.nodeKind() == "text")
+					{
+						child.setValue(child.text() + lastChild.text());
+						this.removeChildAt(i+1);
+					}
+					if(!child.text())
+						this.removeChildAt(i);
+				}
+				lastChild = child;
+			}
+			for(i=0;i<)
+			return this;
 		}
 		
 		/**
@@ -552,15 +850,10 @@ package
 		 */
 		public function prependChild(child:XML):XML
 		{
-			child.setDocument(_parentDocument);
 			child.setParent(this);
 			
 			_children.unshift(child);
-			if(_node.childNodes.length)
-				_node.insertBefore(child.getNode(), _node.childNodes[0]);
-			else
-				_node.appendChild(child.getNode());
-			
+
 			return child;
 		}
 		
@@ -607,13 +900,11 @@ package
 				6. Let x.[[Length]] = x.[[Length]] - dp
 				7. Return true.
 			*/
-			child.setParent(null);
-			
+			if(child.nodeKind())
 			var removed:XML;
-			var idx:int = child.childIndex;
+			var idx:int = _children.indexOf(child);
 			removed = _children.splice(idx,1);
-			var n:Element = removed.getNode();
-			n.parentElement.removeChild(n);
+			child.setParent(null);
 			return removed;
 		}
 
@@ -685,6 +976,39 @@ package
 			return null;
 		}
 
+		public function setAttribute(attr:*,value:String):void
+		{
+			var i:int;
+			if(!_attributes)
+				_attributes = [];
+
+			if(attr is XML)
+			{
+				if(attr.nodeKind() == "attribute")
+				{
+					for(i=0;i<_attributes.length;i++)
+					{
+						if(_attributes[i].name.equals() )
+						addChild(_att)
+					}
+				}
+
+			}
+			if(attr.indexOf("xmlns") == 0)
+			{
+				//it's a namespace declaration
+				var ns:Namespace = new Namespace(value.toString());
+				if(attr.indexOf("xmlns:") == 0)// it has a prefix
+					ns.prefix = attr.split(":")[1];
+				this.addNamespace(ns);
+			}
+			else
+			{
+				//it's a regular attribute string
+
+			}
+
+		}
 		/**
 		 * Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
 		 * This is primarily used to support dot notation assignment of XML.
@@ -858,7 +1182,10 @@ package
 		 */
 		public function setLocalName(name:String):void
 		{
-			
+			if(!_name)
+				_name = new QName();
+
+			_name.localName = name;
 		}
 		
 		/**
@@ -867,9 +1194,12 @@ package
 		 * @param name
 		 * 
 		 */
-		public function setName(name:String):void
+		public function setName(name:*):void
 		{
-			
+			if(name is QName)
+				_name = name;
+			else
+				_name = new QName(name);
 		}
 		
 		/**
@@ -878,15 +1208,42 @@ package
 		 * @param ns
 		 * 
 		 */
-		public function setNamespace(ns:Namespace):void
+		public function setNamespace(ns:Object):void
 		{
-			
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
+				return;
+			var ns2:Namespace = new Namespace(ns);
+			_name = new QName(ns2,_name);
+
+			if(_nodeKind == "attribute")
+			{
+				_name.isAttribute = true;
+				if(_parent == null)
+					return;
+				_parent.addNamespace(ns2);
+			}
+			if(_nodeKind == "element")
+				addNamespace(ns2);
+		}
+
+		/**
+		 * @private
+		 * 
+		 */
+		public function setNodeKind(value:String):void
+		{
+			_nodeKind = value;
 		}
 		
 		public function setParent(parent:XML):void
 		{
 			_parentXML = parent;
 		}
+
+		public function setValue(value:String):void
+		{
+			_value = value;
+		}
 		
 		/**
 		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
@@ -949,6 +1306,68 @@ package
 				return "";
 			return toXMLString();
 		}
+
+		private function toAttributeName(name:*):QName
+		{
+			if(!name is QName)
+			{
+				name = name.toString();
+				if(name.indexOf("@") > -1)
+					name = name.substring(name.indexOf("@"));
+			}
+			name = toXMLName(name);
+			name.isAttribute = true;
+
+		}
+		private function toXMLName(name:*):QName
+		{
+			if(name.toString().indexOf("@") > -1)
+				return toAttributeName(name);
+
+			/*
+				Given a string s, the ToXMLName conversion function returns a QName object or AttributeName. If the first character of s is "@", ToXMLName creates an AttributeName using the ToAttributeName operator. Otherwise, it creates a QName object using the QName constructor.
+				Semantics
+				Given a String value s, ToXMLName operator converts it to a QName object or AttributeName using the following steps:
+				1. If ToString(ToUint32(s)) == ToString(s), throw a TypeError exception
+				2. If the first character of s is "@"
+				a. Let name = s.substring(1, s.length)
+				b. Return ToAttributeName(name)
+				3. Else
+				a. Return a QName object created as if by calling the constructor new QName(s)
+			*/
+			if(parseInt(name,10).toString() == name)
+				throw new TypeError("invalid element name");
+
+			if(!name is QName)
+			{
+				name = name.toString();
+				if(name.indexOf(":") >= 0)
+				{
+					// Get the QName for prefix
+					var qname:QName() = new QName();
+					qname.prefix = name.substring(0,name.indexOf(":"));
+					qname.localName = name.substring(name.lastIndexOf(":")+1);
+					//get the qname uri
+					qname.uri = getURI(qname.prefix);
+					name = qname;
+				}
+				else
+				{
+					qname = new QName(_name);
+					if(!qname.uri && defaultNamespace)
+					{
+						qname = new QName(defaultNamespace);
+					}
+					qname.localName = name;
+					name = qname;
+				}
+			}
+			else
+			{
+				name  = new QName(name);
+			}
+			return name;
+		}
 		
 		/**
 		 * Returns a string representation of the XML object.
@@ -956,9 +1375,118 @@ package
 		 * @return 
 		 * 
 		 */
-		public function toXMLString():String
+		public function toXMLString(indentLevel:int=0):String
 		{
-			return null;
+			/*
+				Given an XML object x and an optional argument AncestorNamespaces and an optional argument IndentLevel, ToXMLString converts it to an XML encoded string s by taking the following steps:
+				1. Let s be the empty string
+				2. If IndentLevel was not provided, Let IndentLevel = 0
+				3. If (XML.prettyPrinting == true)
+				  a. For i = 0 to IndentLevel-1, let s be the result of concatenating s and the space <SP> character
+				4. If x.[[Class]] == "text",
+				  a. If (XML.prettyPrinting == true)
+				    i. Let v be the result of removing all the leading and trailing XMLWhitespace characters from x.[[Value]]
+				    ii. Return the result of concatenating s and EscapeElementValue(v)
+				  b. Else
+				    i. Return EscapeElementValue(x.[[Value]])
+				5. If x.[[Class]] == "attribute", return the result of concatenating s and EscapeAttributeValue(x.[[Value]])
+				6. If x.[[Class]] == "comment", return the result of concatenating s, the string "<!--", x.[[Value]] and the string "-->"
+				7. If x.[[Class]] == "processing-instruction", return the result of concatenating s, the string "<?", x.[[Name]].localName, the space <SP> character, x.[[Value]] and the string "?>"
+				8. If AncestorNamespaces was not provided, let AncestorNamespaces = { }
+				9. Let namespaceDeclarations = { }
+				10. For each ns in x.[[InScopeNamespaces]]
+				  a. If there is no ans ∈ AncestorNamespaces, such that ans.uri == ns.uri and ans.prefix == ns.prefix
+				    i. Let ns1 be a copy of ns
+				    ii. Let namespaceDeclarations = namespaceDeclarations ∪ { ns1 } NOTE implementations may also exclude unused namespace declarations from namespaceDeclarations
+				11. For each name in the set of names consisting of x.[[Name]] and the name of each attribute in x.[[Attributes]]
+				  a. Let namespace be a copy of the result of calling [[GetNamespace]] on name with argument (AncestorNamespaces ∪ namespaceDeclarations)
+				  b. If (namespace.prefix == undefined),
+				    i. Let namespace.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with namespace.prefix == ns2.prefix
+				    ii. Note: implementations should prefer the empty string as the implementation defined prefix if it is not already used in the set (AncestorNamespaces ∪ namespaceDeclarations)
+				    iii. Let namespaceDeclarations = namespaceDeclarations ∪ { namespace }
+				12. Let s be the result of concatenating s and the string "<"
+				13. If namespace.prefix is not the empty string,
+				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				14. Let s be the result of concatenating s and x.[[Name]].localName
+				15. Let attrAndNamespaces = x.[[Attributes]] ∪ namespaceDeclarations
+				16. For each an in attrAndNamespaces
+				  a. Let s be the result of concatenating s and the space <SP> character
+				  b. If Type(an) is XML and an.[[Class]] == "attribute"
+				    i. Let ans be a copy of the result of calling [[GetNamespace]] on a.[[Name]] with argument AncestorNamespaces
+				    ii. If (ans.prefix == undefined),
+				      1. Let ans.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with ans.prefix == ns2.prefix
+				      2. If there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations), such that ns2.uri == ans.uri and ns2.prefix == ans.prefix
+				        a. Let namespaceDeclarations = namespaceDeclarations ∪ { ans }
+				    iii. If ans.prefix is not the empty string
+				      1. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				    iv. Let s be the result of concatenating s and a.[[Name]].localName
+				  c. Else
+				    i. Let s be the result of concatenating s and the string "xmlns"
+				    ii. If (an.prefix == undefined),
+				      1. Let an.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with an.prefix == ns2.prefix
+				    iii. If an.prefix is not the empty string
+				      1. Let s be the result of concatenating s, the string ":" and an.prefix
+				  d. Let s be the result of concatenating s, the string "=" and a double-quote character (i.e. Unicode codepoint \u0022)
+				  e. If an.[[Class]] == "attribute"
+				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.[[Value]])
+				  f. Else
+				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.uri)
+				  g. Let s be the result of concatenating s and a double-quote character (i.e. Unicode codepoint \u0022)
+				17. If x.[[Length]] == 0
+				  a. Let s be the result of concatenating s and "/>"
+				  b. Return s
+				18. Let s be the result of concatenating s and the string ">"
+				19. Let indentChildren = ((x.[[Length]] > 1) or (x.[[Length]] == 1 and x[0].[[Class]] is not equal to "text"))
+				20. If (XML.prettyPrinting == true and indentChildren == true)
+				  a. Let nextIndentLevel = IndentLevel + XML.PrettyIndent.
+				21. Else
+				  a. Let nextIndentLevel = 0
+				22. For i = 0 to x.[[Length]]-1
+				  a. If (XML.prettyPrinting == true and indentChildren == true)
+				    i. Let s be the result of concatenating s and a LineTerminator
+				  b. Let child = ToXMLString (x[i], (AncestorNamespaces ∪ namespaceDeclarations), nextIndentLevel)
+				  c. Let s be the result of concatenating s and child
+				23. If (XML.prettyPrinting == true and indentChildren == true),
+				  a. Let s be the result of concatenating s and a LineTerminator
+				  b. For i = 0 to IndentLevel, let s be the result of concatenating s and a space <SP> character
+				24. Let s be the result of concatenating s and the string "</"
+				25. If namespace.prefix is not the empty string
+				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
+				26. Let s be the result of concatenating s, x.[[Name]].localName and the string ">"
+				27. Return s
+				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().			
+			*/
+			var i:int;
+			var strArr:Array = [];
+
+			var indentArr:Array = [];
+			for(i=0;i<indentLevel;i++)
+				indentArr.push(_indentStr);
+
+			var indent:String = indentArr.join("");
+			if(this.nodeKind() == "text")
+			{
+				if(prettyPrinting)
+				{
+					var v:String = trimXMLWhitespace(_value);
+					return indent + escapeElementValue(v);
+				}
+				return escapeElementValue(_value);
+			}
+			if(this.nodeKind() == "attribute")
+				return indent + escapeAttributeValue(_value);
+
+			if(this.nodeKind() == "comment")
+				return indent + "<!--" +  _value + "-->";
+
+			if(this.nodeKind() == "processing-instruction")
+				return indent + "<?" + _name.localName + " " + _value + "?>";
+
+			// We excluded the other types, so it's a normal element
+			//TODO I'm here...
+			// step 8.
+
+			return strArray.join("");
 		}
 		
 		/**
@@ -972,15 +1500,6 @@ package
 			return this;
 		}
 		
-		private function removeAllNodeChildren():void
-		{
-			var lastChild = _node.lastChild;
-			while(lastChild)
-			{
-				_node.removeChild(lastChild);
-				lastChild = _node.lastChild;
-			}
-		}
 	}
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/09c5c4fd/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
index f1dd61d..8eae698 100644
--- a/frameworks/projects/XML/as/src/XMLList.as
+++ b/frameworks/projects/XML/as/src/XMLList.as
@@ -26,6 +26,16 @@ package
 		{
 			addIndex(0);
 		}
+		private var _targetObject:XML;
+		public function set targetObject(value:XML):void
+		{
+			_targetObject = value;
+		}
+		private var _targetProperty:QName;
+		public function set targetProperty(value:QName):void
+		{
+			_targetProperty = value;
+		}
 		private var _xmlArray:Array = [];
 		/*
 			9.2.1.2 [[Put]] (P, V)
@@ -421,13 +431,13 @@ package
 		public function parent():Object
 		{
 			if(this.length() == 0)
-				return null;
+				return undefined;
 			var retVal = this[0].parent;
 			var len:int = this.length();
 			for (var i:int=1;i<len;i++)
 			{
 				if(this[i].parent != retVal)
-					return null;
+					return undefined;
 			}
 			return retVal;
 		}


[42/49] git commit: [flex-asjs] [refs/heads/develop] - XML issues

Posted by ha...@apache.org.
XML issues


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ff4cf692
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ff4cf692
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ff4cf692

Branch: refs/heads/develop
Commit: ff4cf69200035ff5139310ec635b4d35b7df238a
Parents: a5ea916
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 13:29:35 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 13:29:35 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/QName.as | 8 ++++----
 frameworks/projects/XML/src/main/flex/XML.as   | 3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ff4cf692/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
index 5ed6d42..bfd7b40 100644
--- a/frameworks/projects/XML/src/main/flex/QName.as
+++ b/frameworks/projects/XML/src/main/flex/QName.as
@@ -57,11 +57,11 @@ package
 				if(localNameVal)
 					_localName = localNameVal.toString();
 			}
-			else if (qNameOrUri.toString())
+			else if (qNameOrUri && qNameOrUri.toString())
 			{
-				_uri = qNameOrUri;
-				if(localName)
-					_localName = localName;
+				_uri = qNameOrUri.toString();
+				if(localNameVal)
+					_localName = localNameVal;
 			}
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ff4cf692/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 720a6b0..86a3ed1 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -313,6 +313,7 @@ package
 		COMPILE::JS
 		public function XML(xml:String = null)
 		{
+			_children = [];
 			if(xml)
 			{
 				var parser:DOMParser = new DOMParser();
@@ -807,8 +808,6 @@ package
 			list.targetObject = this;
 			list.targetProperty = name;
 			return list;
-
-			return null;
 		}
 
 		COMPILE::JS


[06/49] git commit: [flex-asjs] [refs/heads/develop] - fixed name normalization

Posted by ha...@apache.org.
fixed name normalization


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/94281aef
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/94281aef
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/94281aef

Branch: refs/heads/develop
Commit: 94281aefe6f08d5eb8afb3dafdeb2c6419521974
Parents: 3c3a161
Author: Harbs <ha...@in-tools.com>
Authored: Wed Feb 3 22:53:24 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Feb 3 22:53:24 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/94281aef/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index a59fcf8..dc99ff9 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -378,7 +378,7 @@ package
 				return this;
 			if(ns.prefix === undefined)
 				return this;
-			if(ns.prefix == "" && _name.uri == "")
+			if(ns.prefix == "" && name().uri == "")
 				return this;
 			var match:Namespace = null;
 			var i:int;
@@ -395,8 +395,8 @@ package
 			else
 				_namespaces.push(ns);
 
-			if(ns.prefix == _name.prefix)
-				_name.prefix = undefined;
+			if(ns.prefix == name().prefix)
+				name().prefix = undefined;
 
 			for(i=0;i<_attributes.length;i++)
 			{
@@ -860,7 +860,7 @@ package
 		 */
 		public function localName():Object
 		{
-			return null;
+			return name().localName;
 		}
 
 		private var _name:QName;
@@ -873,8 +873,9 @@ package
 		 */
 		public function name():Object
 		{
+			if(!_name)
+				_name = new QName();
 			return _name;
-			return null;
 		}
 		
 		/**
@@ -919,11 +920,11 @@ package
 		 */
 		public function normalize():XML
 		{
-			var len:int = this._children.length-1;
+			var len:int = _children.length-1;
 			var lastChild:XML;
 			for(var i:int=len;i>=0;i--)
 			{
-				var child:XML = this.child(i)[0];
+				var child:XML = _children[i];
 				// can we have a null child?
 
 				if(child.nodeKind() == "element")
@@ -942,7 +943,6 @@ package
 				}
 				lastChild = child;
 			}
-			for(i=0;i<)
 			return this;
 		}
 		
@@ -1328,7 +1328,7 @@ package
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
 				return;
 			var ns2:Namespace = new Namespace(ns);
-			_name = new QName(ns2,_name);
+			_name = new QName(ns2,name());
 
 			if(_nodeKind == "attribute")
 			{
@@ -1447,7 +1447,7 @@ package
 				}
 				else
 				{
-					qname = new QName(_name);
+					qname = new QName(name());
 					if(!qname.uri && defaultNamespace)
 					{
 						qname = new QName(defaultNamespace);
@@ -1574,7 +1574,7 @@ package
 				return indent + "<!--" +  _value + "-->";
 
 			if(this.nodeKind() == "processing-instruction")
-				return indent + "<?" + _name.localName + " " + _value + "?>";
+				return indent + "<?" + name().localName + " " + _value + "?>";
 
 			// We excluded the other types, so it's a normal element
 			//TODO I'm here...


[21/49] git commit: [flex-asjs] [refs/heads/develop] - Changed XML to match the new folder structure

Posted by ha...@apache.org.
Changed XML to match the new folder structure


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a487152a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a487152a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a487152a

Branch: refs/heads/develop
Commit: a487152af84f18ff28ea803806c5859cfe056f1e
Parents: 2877639
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 11 11:23:01 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 11 11:23:01 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/Namespace.as     |  134 --
 frameworks/projects/XML/as/src/QName.as         |  162 --
 frameworks/projects/XML/as/src/XML.as           | 2237 ------------------
 frameworks/projects/XML/as/src/XMLClasses.as    |   35 -
 frameworks/projects/XML/as/src/XMLList.as       |  657 -----
 .../as/src/org/apache/flex/core/xml/IJXON.as    |   29 -
 .../XML/as/src/org/apache/flex/core/xml/JXON.as |  544 -----
 .../org/apache/flex/core/xml/JXONAttribute.as   |   79 -
 .../src/org/apache/flex/core/xml/JXONComment.as |   52 -
 .../org/apache/flex/core/xml/JXONInstruction.as |   52 -
 .../as/src/org/apache/flex/core/xml/JXONList.as |   28 -
 .../org/apache/flex/core/xml/JXONNamespace.as   |   67 -
 .../as/src/org/apache/flex/core/xml/JXONText.as |   52 -
 frameworks/projects/XML/basic-manifest.xml      |   24 -
 .../projects/XML/compile-as-to-js-config.xml    |   77 -
 frameworks/projects/XML/compile-asjs-config.xml |   78 -
 frameworks/projects/XML/compile-config.xml      |   83 -
 frameworks/projects/XML/compile-js-config.xml   |   87 -
 .../projects/XML/src/main/flex/Namespace.as     |  134 ++
 frameworks/projects/XML/src/main/flex/QName.as  |  162 ++
 frameworks/projects/XML/src/main/flex/XML.as    | 2237 ++++++++++++++++++
 .../projects/XML/src/main/flex/XMLClasses.as    |   35 +
 .../projects/XML/src/main/flex/XMLList.as       |  657 +++++
 .../XML/src/main/resources/basic-manifest.xml   |   24 +
 .../main/resources/compile-as-to-js-config.xml  |   77 +
 .../src/main/resources/compile-asjs-config.xml  |   78 +
 .../XML/src/main/resources/compile-config.xml   |   83 +
 .../src/main/resources/compile-js-config.xml    |   87 +
 28 files changed, 3574 insertions(+), 4477 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/Namespace.as b/frameworks/projects/XML/as/src/Namespace.as
deleted file mode 100644
index 95bb405..0000000
--- a/frameworks/projects/XML/as/src/Namespace.as
+++ /dev/null
@@ -1,134 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
-package
-{
-	public class Namespace
-	{
-		public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
-		{
-			/*
-				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
-				1. Create a new Namespace object n
-				2. If prefixValue is not specified and uriValue is not specified
-				  a. Let n.prefix be the empty string
-				  b. Let n.uri be the empty string
-				3. Else if prefixValue is not specified
-				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "Namespace"
-				    i. Let n.prefix = uriValue.prefix
-				    ii. Let n.uri = uriValue.uri
-				  b. Else if Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
-				    i. Let n.uri = uriValue.uri NOTE implementations that preserve prefixes in qualified names may also set n.prefix = uriValue.[[Prefix]]
-				  c. Else
-				    i. Let n.uri = ToString(uriValue)
-				    ii. If (n.uri is the empty string), let n.prefix be the empty string
-				    iii. Else n.prefix = undefined
-				4. Else
-				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
-				    i. Let n.uri = uriValue.uri
-				  b. Else
-				    i. Let n.uri = ToString(uriValue)
-				  c. If n.uri is the empty string
-				    i. If prefixValue is undefined or ToString(prefixValue) is the empty string
-				      1. Let n.prefix be the empty string
-				    ii. Else throw a TypeError exception
-				  d. Else if prefixValue is undefined, let n.prefix = undefined
-				  e. Else if isXMLName(prefixValue) == false
-				  i. Let n.prefix = undefined
-				  f. Else let n.prefix = ToString(prefixValue)
-				5. Return n
-			*/
-			if(!uriValue && prefixOrUri) //we don't have a prefix defined
-			{
-				var uriVal:Object = uriValue ? uriValue : prefixOrUri;
-				if(uriVal is Namespace)
-				{
-					_prefix = (uriVal as Namespace).prefix;
-					_uri = (uriVal as Namespace).uri;
-				}
-				else if(uriVal is QName)
-				{
-					if((uriVal as QName).uri)
-						_uri = (uriVal as QName).uri;
-				}
-				else {
-					_uri = uriVal.toString();
-					if(_uri == "")
-						_prefix = "";
-				}
-			}
-			else if(uriValue)
-			{
-				// something is specified as the URI otherwise fall through and leave both the prefix and uri blank
-				if(uriValue is QName)
-				{
-					if((uriValue as QName).uri)
-						_uri = (uriValue as QName).uri;
-				}
-				else {
-					_uri = uriValue.toString();
-				}
-
-				if(!_uri)
-				{
-					if(!prefixOrUri)
-						_prefix = "";
-					else
-						throw new TypeError("invalid prefix");
-				}
-				else
-					_prefix = prefixOrUri.toString();
-
-			}
-		}
-
-		private var _uri:String = "";
-		public function get uri():String
-		{
-			return _uri;
-		}
-		public function set uri(value:String):void
-		{
-			_uri = value;
-		}
-		
-		private var _prefix:String = null;
-		public function get prefix():String
-		{
-			return _prefix;
-		}
-		public function set prefix(value:String):void
-		{
-			_prefix = value;
-		}
-
-		public function toString():String
-		{
-			return uri;
-		}
-
-		public function valueOf():Object
-		{
-			return this;
-		}
-	}
-}
-}
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
deleted file mode 100644
index 5232bbe..0000000
--- a/frameworks/projects/XML/as/src/QName.as
+++ /dev/null
@@ -1,162 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
-package
-{
-	public class QName
-	{
-		public function QName(qNameOrUri:*=null,localNameVal:*=null)
-		{
-			/*
-				When the QName constructor is called with a one argument Name or two arguments Namespace and Name the following steps are taken:
-				1. If (Type(Name) is Object and Name.[[Class]] == "QName")
-				  a. If (Namespace is not specified), return a copy of Name
-				  b. Else let Name = Name.localName
-				2. If (Name is undefined or not specified)
-				  a. Let Name = “”
-				3. Else let Name = ToString(Name)
-				4. If (Namespace is undefined or not specified)
-				  a. If Name = "*"
-				    i. Let Namespace = null
-				  b. Else
-				    i. Let Namespace = GetDefaultNamespace()
-				5. Let q be a new QName with q.localName = Name
-				6. If Namespace == null
-				  a. Let q.uri = null NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to undefined
-				7. Else
-				  a. Let Namespace be a new Namespace created as if by calling the constructor new Namespace(Namespace)
-				  b. Let q.uri = Namespace.uri NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to Namespace.prefix
-				8. Return q
-			*/
-			if(qNameOrUri is QName)
-			{
-				_uri = qNameOrUri.uri;
-				_localName = qNameOrUri.localName;
-				_prefix = qNameOrUri.prefix;
-			}
-			else if(qNameOrUri is Namespace)
-			{
-				_uri = (qNameOrUri as Namespace).uri;
-				_prefix = (qNameOrUri as Namespace).prefix;
-				if(localNameVal)
-					_localName = localNameVal.toString();
-			}
-			else if (qNameOrUri.toString())
-			{
-				_uri = qNameOrUri;
-				if(localName)
-					_localName = localName;
-			}
-		}
-
-		private var _uri:String;
-		public function get uri():String
-		{
-			return _uri;
-		}
-		public function set uri(value:String):void
-		{
-			_uri = value;
-		}
-		
-		private var _localName:String;
-		public function get localName():String
-		{
-			return _localName;
-		}
-		public function set localName(value:String):void
-		{
-			_localName = value;
-		}
-
-		private var _prefix:String;
-		public function get prefix():String
-		{
-			return _prefix;
-		}
-		public function set prefix(value:String):void
-		{
-			_prefix = value;
-		}
-
-		public function toString():String
-		{
-			return _localName;
-		}
-
-		public function equals(name:QName):Boolean
-		{
-			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
-		}
-		public function matches(name:QName):Boolean
-		{
-			if(this.uri == "*" || name.uri == "*")
-				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
-
-			if(this.localName == "*" || name.localName == "*")
-				return this.uri == name.uri;
-
-			return this.uri == name.uri && this.localName == name.localName;
-		}
-		private var _isAttribute:Boolean;
-		public function get isAttribute():Boolean
-		{
-			return _isAttribute;
-		}
-		public function set isAttribute(value:Boolean):void
-		{
-			_isAttribute = value;
-		}
-
-		public function getNamespace(namespaces:Array=null):Namespace
-		{
-			/*
-				When the [[GetNamespace]] method of a QName q is called with no arguments or one argument InScopeNamespaces, the following steps are taken:
-				1. If q.uri is null, throw a TypeError exception NOTE the exception above should never occur due to the way [[GetNamespace]] is called in this specification
-				2. If InScopeNamespaces was not specified, let InScopeNamespaces = { }
-				3. Find a Namespace ns in InScopeNamespaces, such that ns.uri == q.uri. If more than one such Namespace ns exists, the implementation may choose one of the matching Namespaces arbitrarily. NOTE implementations that preserve prefixes in qualified names may additionally constrain ns, such that ns.prefix == q.[[Prefix]]
-				4. If no such namespace ns exists
-				a. Let ns be a new namespace created as if by calling the constructor new Namespace(q.uri) NOTE implementations that preserve prefixes and qualified names may create the new namespaces as if by calling the constructor Namespace(q.[[Prefix]], q.uri)
-				5. Return ns
-			*/
-			var i:int;
-			var possibleMatch:Namespace;
-			if(!namespaces)
-				namespaces = [];
-			for(i=0;i<namespaces.length;i++)
-			{
-				if(namespaces[i].uri == _uri)
-				{
-					possibleMatch = namespaces[i];
-					if(namespaces[i].prefix == _prefix)
-						return namespaces[i];
-				}
-			}
-			if(possibleMatch)
-				return possibleMatch;
-			if(!_prefix)
-				return new Namespace(_uri);
-			return new Namespace(_prefix,_uri);
-		}
-
-	}
-}
-}
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
deleted file mode 100644
index 69d94b5..0000000
--- a/frameworks/projects/XML/as/src/XML.as
+++ /dev/null
@@ -1,2237 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
-package
-{
-	public class XML
-	{
-		/*
-		 * Dealing with namespaces:
-		 * If the name is qualified, it has a prefix. Otherwise, the prefix is null.
-		 * Additionally, it has a namespaceURI. Otherwise the namespaceURI is null.
-		 * the prefix together with the namespaceURI form a QName
-		*/
-
-		static private var defaultNamespace:Namespace;
-
-		static public function setDefaultNamespace(ns:*)
-		{
-			if(!ns)
-				defaultNamespace = null;
-			else
-				ns = new Namespace(ns);
-		}
-
-		/**
-		 * [static] Determines whether XML comments are ignored when XML objects parse the source XML data.
-		 *  
-		 */
-		static public var ignoreComments:Boolean = true;
-		
-		/**
-		 * [static] Determines whether XML processing instructions are ignored when XML objects parse the source XML data.
-		 *  
-		 */
-		static public var ignoreProcessingInstructions:Boolean = true;
-		
-		/**
-		 * [static] Determines whether white space characters at the beginning and end of text nodes are ignored during parsing.
-		 *  
-		 */
-		static public var ignoreWhitespace:Boolean = true;
-		
-		static private var _prettyIndent:int = 2;
-		/**
-		 * [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true.
-		 * 
-		 */
-		static public function set prettyIndent(value:int):void
-		{
-			_prettyIndent = value;
-			_indentStr = "";
-			for(var i:int = 0; i < value; i++)
-			{
-				_indentStr = _indentStr + INDENT_CHAR;
-			}
-		}
-
-		static public function get prettyIndent():int
-		{
-			return _prettyIndent;
-		}
-
-		static private var _indentStr:String = "  ";
-		static private var INDENT_CHAR:String = " ";
-		
-		/**
-		 * [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
-		 * 
-		 */
-		static public var prettyPrinting:Boolean = true;
-		
-		static private function escapeAttributeValue(value:String):String
-		{
-			var outArr:Array = [];
-			var arr = value.split("");
-			var len:int = arr.length;
-			for(var i:int=0;i<len;i++)
-			{
-				switch(arr[i])
-				{
-					case "<":
-						outArr[i] = "&lt;";
-						break;
-					case "&":
-						outArr[i] = "&amp;";
-						break;
-					case "\u000A":
-						outArr[i] = "&#xA;";
-						break;
-					case "\u000D":
-						outArr[i] = "&#xD;";
-						break;
-					case "\u0009":
-						outArr[i] = "&#x9;";
-						break;
-					default:
-						outArr[i] = arr[i];
-						break;
-				}
-			}
-			return outArr.join("");
-		}
-
-		static private function escapeElementValue(value:String):String
-		{
-			var outArr:Array = [];
-			var arr = value.split("");
-			for(var i=0;i<arr.length;i++)
-			{
-				switch(arr[i])
-				{
-					case "<":
-						outArr[i] = "&lt;";
-						break;
-					case ">":
-						outArr[i] = "&gt;";
-						break;
-					case "&":
-						outArr[i] = "&amp;";
-						break;
-					default:
-						outArr[i] = arr[i];
-						break;
-				}
-			}
-			return outArr.join("");
-		}
-
-		static private function insertAttribute(att:Attr,parent:XML):XML()
-		{
-			var xml:XML = new XML();
-			xml.setParent(parent);
-			xml.setNodeKind("attribute");
-			xml.setName(att.name);
-			xml.setValue(att.value);
-			parent.addChild(xml);
-			return xml;
-		}
-		static private function iterateElement(node:Element,xml:XML):void
-		{
-			// add attributes
-			for(i=0;i<node.attributes.length;i++)
-			{
-				insertAttribute(node.attributes[i],xml);
-			}
-			// loop through childNodes which will be one of:
-			// text, cdata, processing instrution or comment and add them as children of the element
-			for(i=0;i<node.childNodes.length;i++)
-			{
-				var child:XML = fromNode(node.childNodes[i]);
-				xml.addChild(child);
-			}
-		}
-		/**
-		* returns an XML object from an existing node without the need to parse the XML.
-		* The new XML object is not normalized
-		*/
-		static private function fromNode(node:Element):XML
-		{
-			var xml:XML;
-			var i:int;
-			var data:* = node.nodeValue;
-			switch(node.nodeType)
-			{
-				case 1:
-					//ELEMENT_NODE
-					xml = new XML();
-					xml.setNodeKind("element");
-					iterateElement(node,xml);
-					break;
-				//case 2:break;// ATTRIBUTE_NODE (handled separately)
-				case 3:
-					//TEXT_NODE
-					xml = new XML();
-					xml.setNodeKind("text");
-					xml.setValue(data);
-					break;
-				case 4:
-					//CDATA_SECTION_NODE
-					xml = new XML();
-					xml.setNodeKind("text");
-					data = "<![CDATA[" + data + "]]>";
-					xml.setValue(data);
-					break;
-				//case 5:break;//ENTITY_REFERENCE_NODE
-				//case 6:break;//ENTITY_NODE
-				case 7:
-					//PROCESSING_INSTRUCTION_NODE
-					xml = new XML();
-					xml.setNodeKind("processing-instruction");
-					xml.setName(node.nodeName);
-					xml.setValue(data);
-					break;
-				case 8:
-					//COMMENT_NODE
-					xml = new XML();
-					xml.setNodeKind("comment");
-					xml.setValue(data);
-					break;
-				//case 9:break;//DOCUMENT_NODE
-				//case 10:break;//DOCUMENT_TYPE_NODE
-				//case 11:break;//DOCUMENT_FRAGMENT_NODE
-				//case 12:break;//NOTATION_NODE
-				default:
-					throw new TypeError("Unknown XML node type!");
-					break;
-			}
-			return xml;
-		}
-
-		static private function namespaceInArray(ns:Namespace,arr:Array,considerPrefix:Boolean=true):Boolean
-		{
-			if(!arr)
-				return false;
-			var i:int;
-			for(i=0;i<arr.length;i++)
-			{
-				if(ns.uri == arr[i].uri)
-				{
-					if(!considerPrefix)
-						return true;
-					if(ns.prefix == arr[i].prefix)
-						return true;
-				}
-			}
-			return false;
-		}
-
-		static private function trimXMLWhitespace(value:String):String
-		{
-			return value.replace(/^\s+|\s+$/gm,'');
-		}
-
-		/**
-		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * @return 
-		 * 
-		 */
-		static public function defaultSettings():Object
-		{
-			return {
-			    ignoreComments : true,
-			    ignoreProcessingInstructions : true,
-			    ignoreWhitespace : true,
-			    prettyIndent : 2,
-			    prettyPrinting : true
-			}
-		}
-		
-		/**
-		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * @param rest
-		 * 
-		 */
-		static public function setSettings(value:Object):void
-		{
-			if(!value)
-				return;
-				
-		    ignoreComments = value.ignoreComments === undefined ? ignoreComments : value.ignoreComments;
-		    ignoreProcessingInstructions = value.ignoreProcessingInstructions === undefined ? ignoreProcessingInstructions : value.ignoreProcessingInstructions;
-		    ignoreWhitespace = value.ignoreWhitespace === undefined ? ignoreWhitespace : value.ignoreWhitespace;
-		    prettyIndent = value.prettyIndent === undefined ? prettyIndent : value.prettyIndent;
-		    prettyPrinting = value.prettyPrinting === undefined ? prettyPrinting : value.prettyPrinting;
-		}
-		
-		/**
-		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @return 
-		 * 
-		 */
-		static public function settings():Object
-		{
-			return {
-			    ignoreComments : ignoreComments,
-			    ignoreProcessingInstructions : ignoreProcessingInstructions,
-			    ignoreWhitespace : ignoreWhitespace,
-			    prettyIndent : prettyIndent,
-			    prettyPrinting : prettyPrinting
-			}
-		}
-
-
-		public function XML(xml:String = null)
-		{
-			if(xml)
-			{
-				var parser:DOMParser = new DOMParser();
-				// get error namespace. It's different in different browsers.
-				var errorNS:Element = parser.parseFromString('<', 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI;
-
-				var doc:Document = parser.parseFromString(xml, "application/xml");
-
-				//check for errors
-				if(doc.getElementsByTagNameNS(errorNS, 'parsererror').length > 0)
-        			throw new Error('XML parse error');
-    			
-				var node:Element = doc.childNodes[0];
-				_version = doc.xmlVersion;
-				_encoding = doc.xmlEncoding;
-				iterateElement(node,this);
-				normalize();
-			}
-			//need to deal with errors https://bugzilla.mozilla.org/show_bug.cgi?id=45566
-			
-			// get rid of nodes we do not want 
-
-			//loop through the child nodes and build XML obejcts for each.
-			Object.defineProperty(this,"0",
-				{
-					get: function() { return this; },
-					set: function(newValue:*) {
-					},
-					enumerable: true,
-					configurable: true
-				}
-			);
-
-		}
-		
-		private var _children:Array;
-		private var _attributes:Array;
-		private var _processingInstructions:Array;
-		private var _parentXML:XML;
-		private var _name:*;
-		private var _value:String;
-		private var _version:String;
-		private var _encoding:String;
-		private var _appliedNamespace:Namespace;
-		private var _namespaces:Array = [];
-
-
-		/**
-		 * @private
-		 * 
-		 * Similar to appendChild, but accepts all XML types (text, comment, processing-instruction, attribute, or element)
-		 *
-		 * 	
-		 */
-		public function addChild(child:XML):void
-		{
-			if(!child)
-				return;
-			
-			child.setParent(this);
-			if(child.nodeKind() =="attribute")
-			{
-				if(!_attributes)
-					_attributes = [];
-
-				_attributes.push(child);
-
-			}
-			else
-				_children.push(child);
-			normalize();
-		}
-
-
-		/**
-		 * Adds a namespace to the set of in-scope namespaces for the XML object.
-		 *
-		 * @param ns
-		 * @return 
-		 * 	
-		 */
-		public function addNamespace(ns:Namespace):XML
-		{
-			/*
-				When the [[AddInScopeNamespace]] method of an XML object x is called with a namespace N, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", “attribute”}, return
-				2. If N.prefix != undefined
-				  a. If N.prefix == "" and x.[[Name]].uri == "", return
-				  b. Let match be null
-				  c. For each ns in x.[[InScopeNamespaces]]
-				    i. If N.prefix == ns.prefix, let match = ns
-				  d. If match is not null and match.uri is not equal to N.uri
-				    i. Remove match from x.[[InScopeNamespaces]]
-				  e. Let x.[[InScopeNamespaces]] = x.[[InScopeNamespaces]] ∪ { N }
-				  f. If x.[[Name]].[[Prefix]] == N.prefix
-				    i. Let x.[[Name]].prefix = undefined
-				  g. For each attr in x.[[Attributes]]
-				    i. If attr.[[Name]].[[Prefix]] == N.prefix, let attr.[[Name]].prefix = undefined
-				3. Return
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
-				return this;
-			if(ns.prefix === undefined)
-				return this;
-			if(ns.prefix == "" && name().uri == "")
-				return this;
-			var match:Namespace = null;
-			var i:int;
-			for(i=0;i<_namespaces.length;i++)
-			{
-				if(_namespaces[i].prefix == ns.prefix)
-				{
-					match = _namespaces[i];
-					break;
-				}
-			}
-			if(match)
-				_namespaces[i] = ns;
-			else
-				_namespaces.push(ns);
-
-			if(ns.prefix == name().prefix)
-				name().prefix = undefined;
-
-			for(i=0;i<_attributes.length;i++)
-			{
-				if(_attributes[i].name().prefix == ns.prefix)
-					_attributes[i].name().prefix = undefined;
-			}
-			return this;
-		}
-		
-		/**
-		 * Appends the given child to the end of the XML object's properties.
-		 *
-		 * @param child
-		 * @return 
-		 * 
-		 */
-		public function appendChild(child:XML):XML
-		{
-			/*
-				[[Insert]] (P, V)
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. Let i = ToUint32(P)
-				3. If (ToString(i) is not equal to P), throw a TypeError exception
-				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
-				5. Let n = 1
-				6. If Type(V) is XMLList, let n = V.[[Length]]
-				7. If n == 0, Return
-				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
-				9. Let x.[[Length]] = x.[[Length]] + n
-				10. If Type(V) is XMLList
-				  a. For j = 0 to V.[[Length-1]]
-				    i. V[j].[[Parent]] = x
-				    ii. x[i + j] = V[j]
-				11. Else
-				  a. Call the [[Replace]] method of x with arguments i and V
-				12. Return
-			*/
-			child.setParent(this);
-			
-			_children.push(child);
-			normalize();
-			return child;
-		}
-		
-		
-		/**
-		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
-		 *
-		 * @param attributeName
-		 * @return 
-		 * 
-		 */
-		public function attribute(attributeName:*):XMLList
-		{
-			var i:int;
-			if(attributeName == "*")
-				return attributes();
-
-			attributeName = toAttributeName(attributeName);
-			var list:XMLList = new XMLList();
-			for(i=0;i<_attributes.length;i++)
-			{
-				if(_atributes[i].name().matches(attributeName))
-					list.appendChild(_atributes[i]);
-			}
-			list.targetObject = this;
-			list.targetProperty = attributeName;
-			return list;
-		}
-		
-		/**
-		 * Returns a list of attribute values for the given XML object.
-		 *
-		 * @return 
-		 * 
-		 */
-		public function attributes():XMLList
-		{
-			var list:XMLList = new XMLList();
-			for(i=0;i<_attributes.length;i++)
-				list.appendChild(_atributes[i]);
-
-			list.targetObject = this;
-			return list;
-		}
-		
-		/**
-		 * Lists the children of an XML object.
-		 *
-		 * @param propertyName
-		 * @return 
-		 * 
-		 */
-		public function child(propertyName:Object):XMLList
-		{
-			/*
-			 * 
-			When the [[Get]] method of an XML object x is called with property name P, the following steps are taken:
-			1. If ToString(ToUint32(P)) == P
-			  a. Let list = ToXMLList(x)
-			  b. Return the result of calling the [[Get]] method of list with argument P
-			2. Let n = ToXMLName(P)
-			3. Let list be a new XMLList with list.[[TargetObject]] = x and list.[[TargetProperty]] = n
-			4. If Type(n) is AttributeName
-			  a. For each a in x.[[Attributes]]
-			    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
-			      1. Call the [[Append]] method of list with argument a
-			  b. Return list
-			5. For (k = 0 to x.[[Length]]-1)
-			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri)))
-			    i. Call the [[Append]] method of list with argument x[k]
-			6. Return list
-			*/
-			var i:int;
-			var list:XMLList = new XMLList();
-			if(parseInt(name,10).toString() == propertyName)
-			{
-				if(propertyName != "0")
-					return undefined;
-				list.appendChild(this);
-				list.targetObject = this;
-				return list;
-			}
-			propertyName = toXMLName(propertyName);
-			if(propertyName.isAttribute)
-			{
-				for(i=0;i<_attributes.length;i++)
-				{
-					if(propertyName.matches(_attributes[i].name()))
-						list.append(_attributes[i]);
-				}
-			}
-			else
-			{
-				for(i=0;i<_children.length;i++)
-				{
-					if(propertyName.matches(_children[i].name()))
-						list.append(_children[i]);
-				}
-			}
-			list.targetObject = this;
-			list.targetProperty = propertyName;
-			return list;
-		}
-		
-		/**
-		 * Identifies the zero-indexed position of this XML object within the context of its parent.
-		 *
-		 * @return 
-		 * 
-		 */
-		public function childIndex():int
-		{
-			if(!parent)
-				return -1;
-
-			return parent.getIndexOf(this);
-		}
-		
-		/**
-		 * Lists the children of the XML object in the sequence in which they appear.
-		 *
-		 * @return 
-		 * 
-		 */
-		public function children():XMLList
-		{
-			var list:XMLList = new XMLList();
-			for(i=0;i<_children.length;i++)
-				list.append(_children[i]);
-
-			list.targetObject = this;
-			return list;
-		}
-		
-		/**
-		 * Lists the properties of the XML object that contain XML comments.
-		 *
-		 * @return 
-		 * 
-		 */
-		public function comments():XMLList
-		{
-			var list:XMLList = new XMLList();
-			for(i=0;i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "comment" && propertyName.matches(_children[i].name()))
-					list.append(_children[i]);
-			}
-			list.targetObject = this;
-			return list;
-		}
-		
-		public function concat(list:*):XMLList
-		{
-			if(list is XML)
-			{
-				var newList:XMLList = new XMLList();
-				newList.appendChild(list);
-				list = newList;
-			}
-			if(!(list is XMLList))
-				throw new TypeError("invalid type");
-
-			var retVal:XMLList = new XMLList();
-			retVal.appendChild(this);
-			var item:XML;
-			for each(item in list)
-				retVal.appendChild(item);
-				
-			return retVal;
-		}
-
-		/**
-		 * Compares the XML object against the given value parameter.
-		 *
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function contains(value:XML):Boolean
-		{
-			return this.equals(value);
-		}
-		
-		/**
-		 * Returns a copy of the given XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function copy():XML
-		{
-			/*
-				When the [[DeepCopy]] method of an XML object x is called, the following steps are taken:
-				1. Let y be a new XML object with y.[[Prototype]] = x.[[Prototype]], y.[[Class]] = x.[[Class]], y.[[Value]] = x.[[Value]], y.[[Name]] = x.[[Name]], y.[[Length]] = x.[[Length]]
-				2. For each ns in x.[[InScopeNamespaces]]
-				  a. Let ns2 be a new Namespace created as if by calling the constructor new Namespace(ns)
-				  b. Let y.[[InScopeNamespaces]] = y.[[InScopeNamespaces]] ∪ { ns2 }
-				3. Let y.[[Parent]] = null
-				4. For each a in x.[[Attributes]]
-				  a. Let b be the result of calling the [[DeepCopy]] method of a
-				  b. Let b.[[Parent]] = y
-				  c. Let y.[[Attributes]] = y.[[Attributes]] ∪ { b }
-				5. For i = 0 to x.[[Length]]-1
-				  a. Let c be the result of calling the [[DeepCopy]] method of x[i]
-				  b. Let y[i] = c
-				  c. Let c.[[Parent]] = y
-				6. Return y
-			*/
-			var i:int;
-			var xml:XML = new XML();
-			xml.setNodeKind(_nodeKind);
-			xml.setName(name());
-			xml.setValue(_value);
-			for(i-0;i<_namespaces.length;i++)
-			{
-				xml.addNamespace(new Namespace(_namespaces[i]));
-			}
-			//parent should be null by default
-			for(i=0;i<_attributes.length;i++)
-				xml.addChild(_attributes[i].copy());
-
-			for(i=0;i<_children.length;i++)
-				xml.addChild(_children[i].copy());
-			
-			return xml;
-		}
-
-		private function deleteChildAt(idx:int):void
-		{
-
-		}
-		
-		/**
-		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function descendants(name:Object = "*"):XMLList
-		{
-			/*
-				When the [[Descendants]] method of an XML object x is called with property name P, the following steps are taken:
-				1. Let n = ToXMLName(P)
-				2. Let list be a new XMLList with list.[[TargetObject]] = null
-				3. If Type(n) is AttributeName
-				  a. For each a in x.[[Attributes]]
-				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri ))
-				      1. Call the [[Append]] method of list with argument a
-				4. For (k = 0 to x.[[Length]]-1)
-				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
-				    i. Call the [[Append]] method of list with argument x[k]
-				  b. Let dq be the resultsof calling the [[Descendants]] method of x[k] with argument P
-				  c. If dq.[[Length]] > 0, call the [[Append]] method of list with argument dq
-				5. Return list
-			*/
-			var i:int;
-			name = toXMLName(name);
-			var list:XMLList = new XMLList();
-			if(name.isAttribute)
-			{
-				for(i=0;i<_attributes.length;i++)
-				{
-					if(name.matches(_attributes[i].name()))
-						list.appendChild(_attributes[i]);
-				}
-				for(i=0;i<_children.length;i++)
-				{
-					if(_children[i].nodeKind() == "element")
-					{
-						if(name.matches(_children[i].name()))
-							list.appendChild(_children[i]);
-
-						list = list.concat(_children[i].descendants());
-					} 
-				}
-			}
-			return list;
-		}
-		
-		/**
-		 * Lists the elements of an XML object. (handles E4X dot notation)
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function elements(name:Object = "*"):XMLList
-		{
-			name = toXMLName(name);
-			var list:XMLList = new XMLList();
-			for(i=0;i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "element" && name.matches(_children[i].name()))
-					list.append(_children[i]);
-			}
-
-			list.targetObject = this;
-			list.targetProperty = name;
-			return list;
-
-			return null;
-		}
-
-		public function equals(xml:*):Boolean
-		{
-			/*
-				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
-				1. If Type(V) is not XML, return false
-				2. If x.[[Class]] is not equal to V.[[Class]], return false
-				3. If x.[[Name]] is not null
-				  a. If V.[[Name]] is null, return false
-				  b. If x.[[Name]].localName is not equal to V.[[Name]].localName, return false
-				  c. If x.[[Name]].uri is not equal to V.[[Name]].uri, return false
-				4. Else if V.[[Name]] is not null, return false
-				5. If x.[[Attributes]] does not contain the same number of items as V.[[Attributes]], return false
-				6. If x.[[Length]] is not equal to V.[[Length]], return false
-				7. If x.[[Value]] is not equal to y[[Value]], return false
-				8. For each a in x.[[Attributes]]
-				  a. If V.[[Attributes]] does not contain an attribute b, such that b.[[Name]].localName == a.[[Name]].localName, b.[[Name]].uri == a.[[Name]].uri and b.[[Value]] == a.[[Value]], return false
-				9. For i = 0 to x.[[Length]]-1
-				  a. Let r be the result of calling the [[Equals]] method of x[i] with argument V[i]
-				  b. If r == false, return false
-				10. Return true
-			*/
-			var i:int;
-			if(!(xml is XML))
-				return false;
-
-			if(xml.nodeKind() != _nodeKind)
-				return false;
-
-			if(!name().equals(xml.name()))
-				return false;
-			var selfAttrs:Array = getAttributeArray();
-			var xmlAttrs:Array = xml.getAttributeArray();
-			if(selfAttrs.length != xmlAttrs.length)
-				return false;
-			//length comparison should not be necessary because xml always has a length of 1
-			if(getValue() != xml.getValue())
-				return false;
-
-			for(i=0;i<selfAttrs.length;i++)
-			{
-				if(!xml.hasAttribute(selfAttrs[i]))
-					return false;
-			}
-			var selfChldrn:Array = getChildrenArray();
-			var xmlChildren:Array = xml.getChildrenArray();
-			if(selfChldrn.length != xmlChildren.length)
-				return false;
-
-			for(i=0;i<selfChldrn.length;i++)
-			{
-				if(!selfChldrn[i].equals(xmlChildren[i]))
-					return false;
-			}
-			return true;
-		}
-
-		public function hasAttribute(nameOrXML:*,value:String=null):Boolean
-		{
-			if(!_attributes)
-				return false;
-			var name:QName;
-			if(nameOrXML is XML)
-			{
-				name = nameOrXML.name();
-				value = nameOrXML.getValue();
-			}
-			else
-			{
-				name = new QName(nameOrXML);
-			}
-			var i:int;
-			for(i=0;i<_attributes.length;i++)
-			{
-				if(name.matches(_attributes[i].name()))
-				{
-					if(!value)
-						return true;
-					return value == _attributes[i].getValue();
-				}
-			}
-			return false;
-		}
-
-		private function getAncestorNamespaces(namespaces:Array):Array
-		{
-			//don't modify original
-			namespaces = namespaces.slice();
-			var nsIdx:int;
-			var pIdx:int;
-			if(_parentXML)
-			{
-				var parentNS:Array = _parentXML.inScopeNamespaces();
-				var len:int = parentNS.length;
-				for(pIdx=0;pIdx<len;pIdx++)
-				{
-					var curNS:Namespace = parentNS[pIdx];
-					var doInsert:Boolean = true;
-					for(nsIdx=0;nsIdx<namespaces.length;nsIdx++)
-					{
-						if(curNS.uri == namespaces[nsIdx].uri && curNS.prefix == namespaces[nsIdx].prefix)
-						{
-							doInsert = false;
-							break;
-						}
-					}
-					if(doInsert)
-						namespaces.push(curNS);
-
-				}
-				namespaces = _parentXML.getAncestorNamespaces(namespaces);
-			}
-			return namespaces;
-		}
-
-		public function getAttributeArray():Array
-		{
-			return _attributes ? _attributes.slice() : [];
-		}
-		public function getChildrenArray():Array
-		{
-			return _children ? _children.slice() : [];
-		}
-
-		public function getIndexOf(elem:XML):int
-		{
-			return _children.indexOf(elem);
-		}
-		
-		private function getURI(prefix:String):String
-		{
-			var i:int;
-			var namespaces:Array = getAncestorNamespaces(_namespaces);
-			for(i=0;i<namespaces.length;i++)
-			{
-				if(namespaces[i].prefix == prefix)
-					return namespaces[i].uri;
-			}
-			return "";
-		}
-
-		public function getValue():String
-		{
-			return _value;
-		}
-		/**
-		 * Checks to see whether the XML object contains complex content.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function hasComplexContent():Boolean
-		{
-			/*
-				When the hasComplexContent method is called on an XML object x, the following steps are taken:
-				1. If x.[[Class]] ∈ {"attribute", "comment", "processing-instruction", "text"}, return false
-				2. For each property p in x
-				a. If p.[[Class]] == "element", return true
-				3. Return false
-			*/
-			if(_nodeKind == "attribute" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "text")
-				return false;
-			var i:int;
-			for(i=0i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "element")
-					return true;
-			}
-			return false;
-		}
-
-		public function hasOwnProperty(p:*):Boolean
-		{
-			/*
-				When the [[HasProperty]] method of an XML object x is called with property name P, the following steps are taken:
-				1. If ToString(ToUint32(P)) == P
-				  a. Return (P == "0")
-				2. Let n = ToXMLName(P)
-				3. If Type(n) is AttributeName
-				  a. For each a in x.[[Attributes]]
-				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
-				      1. Return true
-				  b. Return false
-				4. For (k = 0 to x.[[Length]]-1)
-				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName == n.localName))) and ((n.uri == null) or (x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri)))
-				    i. Return true
-				5. Return false
-			*/
-			if(parseInt(p,10).toString() == p)
-				return p == "0";
-			var name:QName = toXMLName(p);
-			var i:int;
-			for(i=0;i<_attributes.length;i++)
-			{
-				if(_attributes[i].name().matches(name))
-					return true;
-			}
-			for(i=0;i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() != "element")
-					continue;
-				if(_children[i].name().matches(name))
-					return true;
-			}
-			return false;
-		}
-				
-		/**
-		 * Checks to see whether the XML object contains simple content.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function hasSimpleContent():Boolean
-		{
-			/*
-				When the hasSimpleContent method is called on an XML object x, the following steps are taken:
-				1. If x.[[Class]] ∈ {"comment", "processing-instruction"}, return false
-				2. For each property p in x
-				a. If p.[[Class]] == "element", return false
-				3. Return true
-			*/
-			if(_nodeKind == "comment" || _nodeKind == "processing-instruction")
-				return false;
-			var i:int;
-			for(i=0i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "element")
-					return false;
-			}
-			return true;
-		}
-		
-		/**
-		 * Lists the namespaces for the XML object, based on the object's parent.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function inScopeNamespaces():Array
-		{
-			return _namespaces.slice();
-		}
-		
-		private function insertChildAt(child:XML,idx:int):void{
-			/*
-				When the [[Insert]] method of an XML object x is called with property name P and value V, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. Let i = ToUint32(P)
-				3. If (ToString(i) is not equal to P), throw a TypeError exception
-				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
-				5. Let n = 1
-				6. If Type(V) is XMLList, let n = V.[[Length]]
-				7. If n == 0, Return
-				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
-				9. Let x.[[Length]] = x.[[Length]] + n
-				10. If Type(V) is XMLList
-				  a. For j = 0 to V.[[Length-1]]
-				    i. V[j].[[Parent]] = x
-				    ii. x[i + j] = V[j]
-				11. Else
-				  a. Call the [[Replace]] method of x with arguments i and V
-				12. Return
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
-				return;
-			if(!child)
-				return;
-			var parent:XML = child.parent();
-			if(parent)
-				parent.removeChild(child);
-			child.setParent(this);
-			_children.splice(idx,0,child);
-		}
-		/**
-		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
-		 * 
-		 * @param child1
-		 * @param child2
-		 * @return 
-		 * 
-		 */
-		public function insertChildAfter(child1:Object, child2:Object):XML
-		{
-			/*
-				When the insertChildAfter method is called on an XML object x with parameters child1 and child2, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. If (child1 == null)
-				a. Call the [[Insert]] method of x with arguments "0" and child2
-				b. Return x
-				3. Else if Type(child1) is XML
-				a. For i = 0 to x.[[Length]]-1
-				i. If x[i] is the same object as child1
-				1. Call the [[Insert]] method of x with a
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
-				return null;
-			if(!child1)
-			{
-				insertChildAt(child2,0);
-				return child2;
-			}
-			var idx:int = _children.indexOf(child1);
-			if(idx >= 0)
-			{
-				insertChildAt(child2,idx+1);
-			}
-			return child2;
-		}
-		
-		/**
-		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
-		 * 
-		 * @param child1
-		 * @param child2
-		 * @return 
-		 * 
-		 */
-		public function insertChildBefore(child1:Object, child2:Object):XML
-		{
-			/*
-				When the insertChildBefore method is called on an XML object x with parameters child1 and child2, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. If (child1 == null)
-				a. Call the [[Insert]] method of x with arguments ToString(x.[[Length]]) and child2
-				b. Return x
-				3. Else if Type(child1) is XML
-				a. For i = 0 to x.[[Length]]-1
-				i. If x[i] is the same object as child1
-				1. Call the [[Insert]] method of x with arguments ToString(i) and child2
-				2. Return x
-				4. Return			
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
-				return null;
-			if(!child1)
-			{
-				insertChildAt(child2,_children.length);
-				return child2;
-			}
-			var idx:int = _children.indexOf(child1);
-			if(idx >= 0)
-			{
-				insertChildAt(child2,idx);
-			}
-			return child2;
-		}
-		
-		/**
-		 * For XML objects, this method always returns the integer 1.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function length():int
-		{
-			return 1;
-		}
-		
-		/**
-		 * Gives the local name portion of the qualified name of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function localName():Object
-		{
-			return name().localName;
-		}
-
-		private var _name:QName;
-		
-		/**
-		 * Gives the qualified name for the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function name():Object
-		{
-			if(!_name)
-				_name = new QName();
-			return _name;
-		}
-		
-		/**
-		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
-		 * 
-		 * @param prefix
-		 * @return 
-		 * 
-		 */
-		public function namespace(prefix:String = null):*
-		{
-			/*
-				When the namespace method is called on an XML object x with zero arguments or one argument prefix, the following steps are taken:
-				1. Let y = x
-				2. Let inScopeNS = { }
-				3. While (y is not null)
-				  a. For each ns in y.[[InScopeNamespaces]]
-				    i. If there exists no n ∈ inScopeNS, such that n.prefix == ns.prefix
-				      1. Let inScopeNS = inScopeNS ∪ { ns }
-				  b. Let y = y.[[Parent]]
-				4. If prefix was not specified
-				  a. If x.[[Class]] ∈ {"text", "comment", "processing-instruction"}, return null
-				  b. Return the result of calling the [[GetNamespace]] method of x.[[Name]] with argument inScopeNS
-				5. Else
-				  a. Let prefix = ToString(prefix)
-				  b. Find a Namespace ns ∈ inScopeNS, such that ns.prefix = prefix. If no such ns exists, let ns = undefined.
-				  c. Return ns
-			*/
-			var i:int;
-			if(prefix)
-			{
-				for(i=0;i<_namespaces.length;i++)
-				{
-					if(_namespaces[i].prefix == prefix)
-						return _namespaces[i];
-				}
-				if(_parent)
-					return _parent.namespace(prefix);
-				return undefined;
-			}
-			//no prefix. get the namespace of our object
-			if(_nodeKind == "text" || _nodeKind ==  "comment" || _nodeKind ==  "processing-instruction")
-				return null;
-			return name().getNamespace(namespaceDeclarations());
-		}
-		
-		/**
-		 * Lists namespace declarations associated with the XML object in the context of its parent.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function namespaceDeclarations():Array
-		{
-			/*
-				When the namespaceDeclarations method is called on an XML object x, the following steps are taken:
-				1. Let a be a new Array created as if by calling the constructor, new Array()
-				2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return a
-				3. Let y = x.[[Parent]]
-				4. Let ancestorNS = { }
-				5. While (y is not null)
-				  a. For each ns in y.[[InScopeNamespaces]]
-				    i. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix
-				      1. Let ancestorNS = ancestorNS ∪ { ns }
-				  b. Let y = y.[[Parent]]
-				6. Let declaredNS = { }
-				7. For each ns in x.[[InScopeNamespaces]]
-				  a. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix and n.uri == ns.uri
-				    i. Let declaredNS = declaredNS ∪ { ns }
-				8. Let i = 0
-				9. For each ns in declaredNS
-				  a. Call the [[Put]] method of a with arguments ToString(i) and ns
-				  b. Let i = i + 1
-				10. Return a
-			*/
-			var retVal:Array = [];
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
-				return retVal;
-			var declaredNS:Array = _namespaces.slice();
-			var parent:XML = _parent;
-			while(parent)
-			{
-				var parentNS:Array = parent.inScopeNamespaces();
-				var idx:int;
-				var pIdx:int;
-				for(pIdx=0;i<parentNS.length;pIdx++)
-				{
-					var uri:String = parentNS[pIdx].uri;
-					var prefix:String = parentNS[pIdx].prefix;
-					for(idx=0;i<declaredNS.length;idx++)
-					{
-						if(declaredNS[idx].uri == uri && declaredNS[idx].prefix == prefix)
-						{
-							declaredNS.push(parentNS[pIdx]);
-							break;
-						}
-					}
-				}
-				parent = parent.parent();
-			}
-
-			return declaredNS;
-		}
-		
-		private var _nodeKind:String = "element";
-		/**
-		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
-		 * @return 
-		 * 
-		 */
-		public function nodeKind():String
-		{
-			return _nodeKind;
-		}
-		
-		/**
-		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function normalize():XML
-		{
-			var len:int = _children.length-1;
-			var lastChild:XML;
-			for(var i:int=len;i>=0;i--)
-			{
-				var child:XML = _children[i];
-				// can we have a null child?
-
-				if(child.nodeKind() == "element")
-				{
-					child.normalize();
-				}
-				else if(child.nodeKind() == "text")
-				{
-					if(lastChild && lastChild.nodeKind() == "text")
-					{
-						child.setValue(child.text() + lastChild.text());
-						deleteChildAt(i+1);
-					}
-					if(!child.text())
-						deleteChildAt(i);
-				}
-				lastChild = child;
-			}
-			return this;
-		}
-		
-		/**
-		 * Returns the parent of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function parent():*
-		{
-			return _parent;
-		}
-		
-		/**
-		 * Inserts the provided child object into the XML element before any existing XML properties for that element.
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function prependChild(child:XML):XML
-		{
-			child.setParent(this);
-			
-			_children.unshift(child);
-
-			return child;
-		}
-		
-		/**
-		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
-		 * 
-		 * @param name
-		 * @return 
-		 * 
-		 */
-		public function processingInstructions(name:String = "*"):XMLList
-		{
-			return null;
-		}
-		
-		/**
-		 * Removes the given chid for this object and returns the removed child.
-		 * 
-		 * @param child
-		 * @return 
-		 * 
-		 */
-		public function removeChild(child:XML):Boolean
-		{
-			/*
-				When the [[Delete]] method of an XML object x is called with property name P, the following steps are taken:
-				1. If ToString(ToUint32(P)) == P, throw a TypeError exception
-				NOTE this operation is reserved for future versions of E4X.
-				2. Let n = ToXMLName(P)
-				3. If Type(n) is AttributeName
-				  a. For each a in x.[[Attributes]]
-				    i. If ((n.[[Name]].localName == "*") or (n.[[Name]].localName == a.[[Name]].localName)) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == a.[[Name]].uri))
-				      1. Let a.[[Parent]] = null
-				      2. Remove the attribute a from x.[[Attributes]]
-				  b. Return true
-				4. Let dp = 0
-				5. For q = 0 to x.[[Length]]-1
-				  a. If ((n.localName == "*") or (x[q].[[Class]] == "element" and x[q].[[Name]].localName == n.localName)) and ((n.uri == null) or (x[q].[[Class]] == “element” and n.uri == x[q].[[Name]].uri ))
-				    i. Let x[q].[[Parent]] = null
-				    ii. Remove the property with the name ToString(q) from x
-				    iii. Let dp = dp + 1
-				  b. Else
-				    i. If dp > 0, rename property ToString(q) of x to ToString(q – dp)
-				6. Let x.[[Length]] = x.[[Length]] - dp
-				7. Return true.
-			*/
-			var removed:XML;
-			if(!child)
-				return false;
-			if(!_attributes)
-				return false;
-
-			if(!(child is XML))
-				return removeChildByName(child);
-			
-			if(child.nodeKind() == "attribute")
-			{
-				for(i=0;i<_attributes.length;i++)
-				{
-					if(child.equals(_attributes[i]))
-					{
-						removed = _attributes[i];
-						removed.setParent(null);
-						_attributes.splice(i,1);
-						return true;
-					}
-				}
-			}
-			var idx:int = _children.indexOf(child);
-			if(idx < 0)
-				return false;
-			removed = _children.splice(idx,1);
-			child.setParent(null);
-			return removed;
-		}
-		private function removeChildByName(name:*):Boolean
-		{
-			var i:int;
-			name = toXMLName(name);
-			child = null;
-			var removedItem:Boolean = false;
-			if(name.isAttribute)
-			{
-				if(!_attributes)
-					return false;
-
-				for(i=_attributes.length-1;i>=0;i--)
-				{
-					if(_attributes[i].name().matches(name))
-					{
-						child = _attributes[i];
-						child.setParent(null);
-						_attributes.splice(i,1);
-						removedItem = true;
-					}
-				}
-				return removedItem;
-			}
-			//QUESTION am I handling non-elements correctly?
-			if(!_children)
-				return false;
-			for(i=_children.length-1;i>=0;i--)
-			{
-				if(_children[i].name().matches(name))
-				{
-					child = _children[i];
-					child.setParent(null);
-					_children.splice(i,1);
-					removedItem = true;
-				}
-			}
-			return removedItem;
-		}
-		public function removeChildAt(index:int):void
-		{
-			/*
-				When the [[DeleteByIndex]] method of an XML object x is called with property name P, the following steps are taken:
-				1. Let i = ToUint32(P)
-				2. If ToString(i) == P
-				  a. If i is less than x.[[Length]]
-				    i. If x has a property with name P
-				      1. Let x[P].[[Parent]] = null
-				      2. Remove the property with the name P from x
-				    ii. For q = i+1 to x.[[Length]]-1
-				      1. Rename property ToString(q) of x to ToString(q – 1)
-				    iii. Let x.[[Length]] = x.[[Length]] – 1
-				  b. Return true
-				3. Else throw a TypeError exception
-			*/
-			//Do nothing for XML objects?
-			throw new Error("Cannot call delete on XML");
-		}
-
-		/**
-		 * Removes the given namespace for this object and all descendants.
-		 * 
-		 * @param ns
-		 * @return 
-		 * 
-		 */
-		public function removeNamespace(ns:*):XML
-		{
-			/*
-				Overview
-				The removeNamespace method removes the given namespace from the in scope namespaces of this object and all its descendents,
-				then returns a copy of this XML object. The removeNamespaces method will not remove a namespace from an object where it is referenced
-				by that object’s QName or the QNames of that object’s attributes.
-				Semantics
-				When the removeNamespace method is called on an XML object x with parameter namespace, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
-				2. Let ns be a Namespace object created as if by calling the function Namespace( namespace )
-				3. Let thisNS be the result of calling [[GetNamespace]] on x.[[Name]] with argument x.[[InScopeNamespaces]]
-				4. If (thisNS == ns), return x
-				5. For each a in x.[[Attributes]]
-				  a. Let aNS be the result of calling [[GetNamespace]] on a.[[Name]] with argument x.[[InScopeNamespaces]]
-				  b. If (aNS == ns), return x
-				6. If ns.prefix == undefined
-				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri, remove the namespace n from x.[[InScopeNamespaces]]
-				7. Else
-				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri and n.prefix == ns.prefix, remove the namespace n from x.[[InScopeNamespaces]]
-				8. For each property p of x
-				  a. If p.[[Class]] = "element", call the removeNamespace method of p with argument ns
-				9. Return x
-			*/
-			var i:int;
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
-				return this;
-			if(!(ns is Namespace))
-				ns = new Namespace(ns);
-			if(ns == name().getNamespace(_namespaces))
-				return this;
-			for(i=0;i<_attributes.length;i++)
-			{
-				if(ns == _attributes[i].name().getNamespace(_namespaces))
-					return this;
-			}
-			
-			//
-			for(i=_namespaces.length-1;i>=0;i--)
-			{
-				if(_namespaces[i].uri == ns.uri && _namespaces[i].prefix == ns.prefix)
-					_namespaces.splice(i,1);
-				else if(ns.prefix == undefined && _namespaces[i].uri == ns.uri)
-					_namespaces.splice(i,1);
-			}
-			for(i=0;i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "element")
-					_children[i].removeNamespace(ns);
-			}
-			return this;
-		}
-		
-		/**
-		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
-		 * 
-		 * @param propertyName
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function replace(propertyName:Object, value:*):XML
-		{
-			/*
-				Semantics
-				When the replace method is called on an XML object x with parameters propertyName and value, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
-				2. If Type(value) ∉ {XML, XMLList}, let c = ToString(value)
-				3. Else let c be the result of calling the [[DeepCopy]] method of value
-				4. If ToString(ToUint32(P)) == P
-				  a. Call the [[Replace]] method of x with arguments P and c and return x
-				5. Let n be a QName object created as if by calling the function QName(P)
-				6. Let i = undefined
-				7. For k = x.[[Length]]-1 downto 0
-				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri )))
-				    i. If (i is not undefined), call the [[DeleteByIndex]] method of x with argument ToString(i)
-				    ii. Let i = k
-				8. If i == undefined, return x
-				9. Call the [[Replace]] method of x with arguments ToString(i) and c
-				10. Return x			
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
-				return this;
-			if(value === null || value === undefined)
-				return this;
-			if((value is XML) || (value is XMLList))
-				value = value.copy();
-			else
-				value = value.toString();
-
-			return null;
-		}
-
-		private function replaceChild(idx:int,v:*):void
-		{
-			/*
-				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. Let i = ToUint32(P)
-				3. If (ToString(i) is not equal to P), throw a TypeError exception
-				4. If i is greater than or equal to x.[[Length]],
-				  a. Let P = ToString(x.[[Length]])
-				  b. Let x.[[Length]] = x.[[Length]] + 1
-				5. If Type(V) is XML and V.[[Class]] ∈ {"element", "comment", "processing-instruction", "text"}
-				  a. If V.[[Class]] is “element” and (V is x or an ancestor of x) throw an Error exception
-				  b. Let V.[[Parent]] = x
-				  c. If x has a property with name P
-				  i. Let x[P].[[Parent]] = null
-				  d. Let x[P] = V
-				6. Else if Type(V) is XMLList
-				  a. Call the [[DeleteByIndex]] method of x with argument P
-				  b. Call the [[Insert]] method of x with arguments P and V
-				7. Else
-				  a. Let s = ToString(V)
-				  b. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = s
-				  c. If x has a property with name P
-				    i. Let x[P].[[Parent]] = null
-				  d. Let the value of property P of x be t
-				8. Return
-			*/
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
-				return this;
-			if(idx > _children.length)
-				idx = _children.length;
-			if(v is XML && v.nodeKind() != "attribute")
-			{
-				if(v.nodeKind() == "element" && (v==this || isAncestor(v)) )
-					throw new TypeError("cannot assign parent xml as child");
-				v.setParent(this);
-				if(_children[idx])
-					_children[idx].setParent(null);
-				_children[idx] = v;
-			}
-			else if(v is XMLList)
-			{
-				//6.
-				if(_children[idx])
-					_children[idx].setParent(null);
-
-			}
-			else
-			{
-				//7. attribute?
-			}
-		}
-
-		private function isAncestor(xml:XML):Boolean
-		{
-			var p:XML = parent();
-			while(p)
-			{
-				if(p == xml)
-					return true;
-				p = p.parent();
-			}
-			return false;
-		}
-
-		public function setAttribute(attr:*,value:String):void
-		{
-			var i:int;
-			if(!_attributes)
-				_attributes = [];
-
-			if(attr is XML)
-			{
-				if(attr.nodeKind() == "attribute")
-				{
-					for(i=0;i<_attributes.length;i++)
-					{
-						if(_attributes[i].name.equals() )
-						addChild(_att)
-					}
-				}
-
-			}
-			if(attr.indexOf("xmlns") == 0)
-			{
-				//it's a namespace declaration
-				var ns:Namespace = new Namespace(value.toString());
-				if(attr.indexOf("xmlns:") == 0)// it has a prefix
-					ns.prefix = attr.split(":")[1];
-				this.addNamespace(ns);
-			}
-			else
-			{
-				//it's a regular attribute string
-
-			}
-
-		}
-		/**
-		 * Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
-		 * This is primarily used to support dot notation assignment of XML.
-		 * 
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function setChild(elementName:*, elements:Object):void
-		{
-			
-			/*
-			 * 
-			1. If ToString(ToUint32(P)) == P, throw a TypeError exception NOTE this operation is reserved for future versions of E4X.
-			2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-			3. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"})
-			  a. Let c = ToString(V)
-			4. Else
-			  a. Let c be the result of calling the [[DeepCopy]] method of V
-			5. Let n = ToXMLName(P)
-			6. If Type(n) is AttributeName
-			  a. Call the function isXMLName (section 13.1.2.1) with argument n.[[Name]] and if the result is false, return
-			  b. If Type(c) is XMLList
-			    i. If c.[[Length]] == 0, let c be the empty string
-			    ii. Else
-			      1. Let s = ToString(c[0])
-			      2. For i = 1 to c.[[Length]]-1
-			        a. Let s be the result of concatenating s, the string " " (space) and ToString(c[i])
-			      3. Let c = s
-			  c. Else
-			    i. Let c = ToString(c)
-			  d. Let a = null
-			  e. For each j in x.[[Attributes]]
-			    i. If (n.[[Name]].localName == j.[[Name]].localName) and ((n.[[Name]].uri == null) or (n.[[Name]].uri == j.[[Name]].uri))
-			      1. If (a == null), a = j
-			      2. Else call the [[Delete]] method of x with argument j.[[Name]]
-			  f. If a == null
-			    i. If n.[[Name]].uri == null
-			      1. Let nons be a new Namespace created as if by calling the constructor new Namespace()
-			      2. Let name be a new QName created as if by calling the constructor new QName(nons, n.[[Name]])
-			    ii. Else
-			      1. Let name be a new QName created as if by calling the constructor new QName(n.[[Name]])
-			    iii. Create a new XML object a with a.[[Name]] = name, a.[[Class]] == "attribute" and a.[[Parent]] = x
-			    iv. Let x.[[Attributes]] = x.[[Attributes]] ∪ { a }
-			    v. Let ns be the result of calling the [[GetNamespace]] method of name with no arguments
-			    vi. Call the [[AddInScopeNamespace]] method of x with argument ns
-			  g. Let a.[[Value]] = c
-			  h. Return
-			7. Let isValidName be the result of calling the function isXMLName (section 13.1.2.1) with argument n
-			8. If isValidName is false and n.localName is not equal to the string "*", return
-			9. Let i = undefined
-			10. Let primitiveAssign = (Type(c) ∉ {XML, XMLList}) and (n.localName is not equal to the string "*")
-			11. For (k = x.[[Length]]-1 downto 0)
-			  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == “element”) and (n.uri == x[k].[[Name]].uri )))
-			    i. If (i is not undefined), call the [[DeleteByIndex]] property of x with argument ToString(i)
-			    ii. Let i = k
-			12. If i == undefined
-			  a. Let i = x.[[Length]]
-			  b. If (primitiveAssign == true)
-			    i. If (n.uri == null)
-			      1. Let name be a new QName created as if by calling the constructor new QName(GetDefaultNamespace(), n)
-			    ii. Else
-			      1. Let name be a new QName created as if by calling the constructor new QName(n)
-			    iii. Create a new XML object y with y.[[Name]] = name, y.[[Class]] = "element" and y.[[Parent]] = x
-			    iv. Let ns be the result of calling [[GetNamespace]] on name with no arguments
-			    v. Call the [[Replace]] method of x with arguments ToString(i) and y
-			    vi. Call [[AddInScopeNamespace]] on y with argument ns
-			13. If (primitiveAssign == true)
-			  a. Delete all the properties of the XML object x[i]
-			  b. Let s = ToString(c)
-			  c. If s is not the empty string, call the [[Replace]] method of x[i] with arguments "0" and s
-			14. Else
-			  a. Call the [[Replace]] method of x with arguments ToString(i) and c
-			15. Return
-			*/
-			var i:int;
-			var len:int;
-			var chld:XML;
-			
-			if(elements is XML)
-			{
-				var list:XMLList = new XMLList();
-				list[0] = elements;
-				elements = list;
-			}
-			if(elements is XMLList)
-			{
-				var chldrn:XMLList = this.child(elementName);
-				var childIdx:int = children().length() -1;
-				if(chldrn.length())
-					childIdx = chldrn[0].childIndex();
-				
-				len = chldrn.length() -1;
-				for (i= len; i >= 0;  i--)
-				{
-					removeChild(chldrn[i]);
-					// remove the nodes
-					// remove the children
-					// adjust the childIndexes
-				}
-				var curChild = _children[childIdx];
-				// Now add them in.
-				len = elements.length();
-				for(i=0;i<len;i++)
-				{
-					child = elements[i];
-					if(!curChild)
-					{
-						curChild = appendChild(chld);
-					}
-					else {
-						curChild = insertChildAfter(curChild, chld);
-					}
-				}
-			}
-			//what to do if it's not XML or XMLList? Throw an error? Ignore?
-			
-		}
-
-		/**
-		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
-		 * 
-		 * @param value
-		 * @return 
-		 * 
-		 */
-		public function setChildren(value:Object):XML
-		{
-			if(value is XML)
-			{
-				var list:XMLList = new XMLList();
-				list[0] = value;
-				value = list;
-			}
-			if(value is XMLList)
-			{
-				// remove all existing elements
-				var chldrn:XMLList = this.child(elementName);
-				var childIdx:int = children().length() -1;
-				if(chldrn.length())
-					childIdx = chldrn[0].childIndex();
-				
-				len = chldrn.length() -1;
-				for (i= len; i >= 0;  i--)
-				{
-					removeChild(chldrn[i]);
-					// remove the nodes
-					// remove the children
-					// adjust the childIndexes
-				}
-				var curChild = _children[childIdx];
-				// Now add them in.
-				len = value.length();
-				for(i=0;i<len;i++)
-				{
-					child = value[i];
-					if(!curChild)
-					{
-						curChild = appendChild(chld);
-					}
-					else {
-						curChild = insertChildAfter(curChild, chld);
-					}
-				}
-			}
-
-			return this;
-		}
-		
-		/**
-		 * Changes the local name of the XML object to the given name parameter.
-		 * 
-		 * @param name
-		 * 
-		 */
-		public function setLocalName(name:String):void
-		{
-			if(!_name)
-				_name = new QName();
-
-			_name.localName = name;
-		}
-		
-		/**
-		 * Sets the name of the XML object to the given qualified name or attribute name.
-		 * 
-		 * @param name
-		 * 
-		 */
-		public function setName(name:*):void
-		{
-			if(name is QName)
-				_name = name;
-			else
-				_name = new QName(name);
-		}
-		
-		/**
-		 * Sets the namespace associated with the XML object.
-		 * 
-		 * @param ns
-		 * 
-		 */
-		public function setNamespace(ns:Object):void
-		{
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
-				return;
-			var ns2:Namespace = new Namespace(ns);
-			_name = new QName(ns2,name());
-
-			if(_nodeKind == "attribute")
-			{
-				_name.isAttribute = true;
-				if(_parent == null)
-					return;
-				_parent.addNamespace(ns2);
-			}
-			if(_nodeKind == "element")
-				addNamespace(ns2);
-		}
-
-		/**
-		 * @private
-		 * 
-		 */
-		public function setNodeKind(value:String):void
-		{
-			_nodeKind = value;
-		}
-		
-		public function setParent(parent:XML):void
-		{
-			if(_parentXML)
-				_parentXML.removeChild(this);
-			_parentXML = parent;
-		}
-
-		public function setValue(value:String):void
-		{
-			_value = value;
-		}
-		
-		/**
-		 * Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function text():XMLList
-		{
-			var list:XMLList = new XMLList();
-			var i:int;
-			for(i=0;i<_children.length;i++)
-			{
-				if(_children[i].nodeKind() == "text")
-					list.list.appendChild(_atributes[i]);
-			}
-			list.targetObject = this;
-			return list;
-		}
-		
-		/**
-		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
-		 * 
-		 * @param k
-		 * @return 
-		 * 
-		 */
-		public function toJSON(k:String):*
-		{
-			return this.name();
-		}
-		
-		/**
-		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toString():String
-		{
-			// text, comment, processing-instruction, attribute, or element
-			if(_nodeKind == "text" || _nodeKind == "attribute")
-				return _value;
-			if(_nodeKind == "comment")
-				return "";
-			if(_nodeKind == "processing-instruction")
-				return "";
-			return toXMLString();
-		}
-
-		private function toAttributeName(name:*):QName
-		{
-			if(!name is QName)
-			{
-				name = name.toString();
-				if(name.indexOf("@") > -1)
-					name = name.substring(name.indexOf("@"));
-			}
-			name = toXMLName(name);
-			name.isAttribute = true;
-
-		}
-		private function toXMLName(name:*):QName
-		{
-			if(name.toString().indexOf("@") > -1)
-				return toAttributeName(name);
-
-			/*
-				Given a string s, the ToXMLName conversion function returns a QName object or AttributeName. If the first character of s is "@", ToXMLName creates an AttributeName using the ToAttributeName operator. Otherwise, it creates a QName object using the QName constructor.
-				Semantics
-				Given a String value s, ToXMLName operator converts it to a QName object or AttributeName using the following steps:
-				1. If ToString(ToUint32(s)) == ToString(s), throw a TypeError exception
-				2. If the first character of s is "@"
-				a. Let name = s.substring(1, s.length)
-				b. Return ToAttributeName(name)
-				3. Else
-				a. Return a QName object created as if by calling the constructor new QName(s)
-			*/
-			if(parseInt(name,10).toString() == name)
-				throw new TypeError("invalid element name");
-
-			if(!name is QName)
-			{
-				name = name.toString();
-				if(name.indexOf(":") >= 0)
-				{
-					// Get the QName for prefix
-					var qname:QName() = new QName();
-					qname.prefix = name.substring(0,name.indexOf(":"));
-					qname.localName = name.substring(name.lastIndexOf(":")+1);
-					//get the qname uri
-					qname.uri = getURI(qname.prefix);
-					name = qname;
-				}
-				else
-				{
-					qname = new QName(name());
-					if(!qname.uri && defaultNamespace)
-					{
-						qname = new QName(defaultNamespace);
-					}
-					qname.localName = name;
-					name = qname;
-				}
-			}
-			else
-			{
-				name  = new QName(name);
-			}
-			return name;
-		}
-		
-		/**
-		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function toXMLString(indentLevel:int=0,ancestors:Array=[]):String
-		{
-			/*
-				Given an XML object x and an optional argument AncestorNamespaces and an optional argument IndentLevel, ToXMLString converts it to an XML encoded string s by taking the following steps:
-				1. Let s be the empty string
-				2. If IndentLevel was not provided, Let IndentLevel = 0
-				3. If (XML.prettyPrinting == true)
-				  a. For i = 0 to IndentLevel-1, let s be the result of concatenating s and the space <SP> character
-				4. If x.[[Class]] == "text",
-				  a. If (XML.prettyPrinting == true)
-				    i. Let v be the result of removing all the leading and trailing XMLWhitespace characters from x.[[Value]]
-				    ii. Return the result of concatenating s and EscapeElementValue(v)
-				  b. Else
-				    i. Return EscapeElementValue(x.[[Value]])
-				5. If x.[[Class]] == "attribute", return the result of concatenating s and EscapeAttributeValue(x.[[Value]])
-				6. If x.[[Class]] == "comment", return the result of concatenating s, the string "<!--", x.[[Value]] and the string "-->"
-				7. If x.[[Class]] == "processing-instruction", return the result of concatenating s, the string "<?", x.[[Name]].localName, the space <SP> character, x.[[Value]] and the string "?>"
-				8. If AncestorNamespaces was not provided, let AncestorNamespaces = { }
-				9. Let namespaceDeclarations = { }
-				10. For each ns in x.[[InScopeNamespaces]]
-				  a. If there is no ans ∈ AncestorNamespaces, such that ans.uri == ns.uri and ans.prefix == ns.prefix
-				    i. Let ns1 be a copy of ns
-				    ii. Let namespaceDeclarations = namespaceDeclarations ∪ { ns1 } NOTE implementations may also exclude unused namespace declarations from namespaceDeclarations
-				11. For each name in the set of names consisting of x.[[Name]] and the name of each attribute in x.[[Attributes]]
-				  a. Let namespace be a copy of the result of calling [[GetNamespace]] on name with argument (AncestorNamespaces ∪ namespaceDeclarations)
-				  b. If (namespace.prefix == undefined),
-				    i. Let namespace.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with namespace.prefix == ns2.prefix
-				    ii. Note: implementations should prefer the empty string as the implementation defined prefix if it is not already used in the set (AncestorNamespaces ∪ namespaceDeclarations)
-				    iii. Let namespaceDeclarations = namespaceDeclarations ∪ { namespace }
-				12. Let s be the result of concatenating s and the string "<"
-				13. If namespace.prefix is not the empty string,
-				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
-				14. Let s be the result of concatenating s and x.[[Name]].localName
-				15. Let attrAndNamespaces = x.[[Attributes]] ∪ namespaceDeclarations
-				16. For each an in attrAndNamespaces
-				  a. Let s be the result of concatenating s and the space <SP> character
-				  b. If Type(an) is XML and an.[[Class]] == "attribute"
-				    i. Let ans be a copy of the result of calling [[GetNamespace]] on a.[[Name]] with argument AncestorNamespaces
-				    ii. If (ans.prefix == undefined),
-				      1. Let ans.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with ans.prefix == ns2.prefix
-				      2. If there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations), such that ns2.uri == ans.uri and ns2.prefix == ans.prefix
-				        a. Let namespaceDeclarations = namespaceDeclarations ∪ { ans }
-				    iii. If ans.prefix is not the empty string
-				      1. Let s be the result of concatenating s, namespace.prefix and the string ":"
-				    iv. Let s be the result of concatenating s and a.[[Name]].localName
-				  c. Else
-				    i. Let s be the result of concatenating s and the string "xmlns"
-				    ii. If (an.prefix == undefined),
-				      1. Let an.prefix be an arbitrary implementation defined namespace prefix, such that there is no ns2 ∈ (AncestorNamespaces ∪ namespaceDeclarations) with an.prefix == ns2.prefix
-				    iii. If an.prefix is not the empty string
-				      1. Let s be the result of concatenating s, the string ":" and an.prefix
-				  d. Let s be the result of concatenating s, the string "=" and a double-quote character (i.e. Unicode codepoint \u0022)
-				  e. If an.[[Class]] == "attribute"
-				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.[[Value]])
-				  f. Else
-				    i. Let s be the result of concatenating s and EscapeAttributeValue(an.uri)
-				  g. Let s be the result of concatenating s and a double-quote character (i.e. Unicode codepoint \u0022)
-				17. If x.[[Length]] == 0
-				  a. Let s be the result of concatenating s and "/>"
-				  b. Return s
-				18. Let s be the result of concatenating s and the string ">"
-				19. Let indentChildren = ((x.[[Length]] > 1) or (x.[[Length]] == 1 and x[0].[[Class]] is not equal to "text"))
-				20. If (XML.prettyPrinting == true and indentChildren == true)
-				  a. Let nextIndentLevel = IndentLevel + XML.PrettyIndent.
-				21. Else
-				  a. Let nextIndentLevel = 0
-				22. For i = 0 to x.[[Length]]-1
-				  a. If (XML.prettyPrinting == true and indentChildren == true)
-				    i. Let s be the result of concatenating s and a LineTerminator
-				  b. Let child = ToXMLString (x[i], (AncestorNamespaces ∪ namespaceDeclarations), nextIndentLevel)
-				  c. Let s be the result of concatenating s and child
-				23. If (XML.prettyPrinting == true and indentChildren == true),
-				  a. Let s be the result of concatenating s and a LineTerminator
-				  b. For i = 0 to IndentLevel, let s be the result of concatenating s and a space <SP> character
-				24. Let s be the result of concatenating s and the string "</"
-				25. If namespace.prefix is not the empty string
-				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
-				26. Let s be the result of concatenating s, x.[[Name]].localName and the string ">"
-				27. Return s
-				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().			
-			*/
-			var i:int;
-			var ns:Namespace;
-			var strArr:Array = [];
-
-			var indentArr:Array = [];
-			for(i=0;i<indentLevel;i++)
-				indentArr.push(_indentStr);
-
-			var indent:String = indentArr.join("");
-			if(this.nodeKind() == "text")
-			{
-				if(prettyPrinting)
-				{
-					var v:String = trimXMLWhitespace(_value);
-					return indent + escapeElementValue(v);
-				}
-				return escapeElementValue(_value);
-			}
-			if(this.nodeKind() == "attribute")
-				return indent + escapeAttributeValue(_value);
-
-			if(this.nodeKind() == "comment")
-				return indent + "<!--" +  _value + "-->";
-
-			if(this.nodeKind() == "processing-instruction")
-				return indent + "<?" + name().localName + " " + _value + "?>";
-
-			// We excluded the other types, so it's a normal element
-			//TODO I'm here...
-			// step 8.
-			//ancestors
-			var declarations:Array = [];
-			for(i=0;i<_namespaces.length;i++)
-			{
-				if(!namespaceInArray(_namespaces[i],ancestors))
-					declarations.push(new Namespace(_namespaces[i]));
-			}
-			//11
-			for(i=0;i<_attributes.length)
-			{
-				ns = new Namespace(_attributes[i].name().getNamespace(ancestors.concat(declarations)));
-				if(ns.prefix === null)
-				{
-					ns.prefix = "";
-					declarations.push(ns);
-				}
-			}
-			ns = new Namespace(name().getNamespace(ancestors.concat(declarations)));
-			if(ns.prefix === null)
-			{
-				ns.prefix = "";
-				declarations.push(ns);
-			}
-			strArray.push("<");
-			if(ns.prefix)
-				strArr.push(ns.prefix+":");
-			strArray.push(name().localName);
-
-			//attributes and namespace declarations... (15-16)
-			for(i=0;i<declarations.length;i++)
-			{
-				strArray.push(" xmlns");
-				if(declarations[i].prefix)
-				{
-					strArray.push(":");
-					strArray.push(declarations[i].prefix);
-				}
-				strArray.push('="');
-				strArray.push(escapeAttributeValue(declarations[i].uri));
-				strArray.push('"');
-
-			}
-			for(i=0;i<_attributes.length;i++)
-			{
-				strArray.push(" ");
-				// the following seems to be the spec, but it does not make sense to me.
-				//var ans:Namespace = _attributes[i].name().getNamespace(ancestors);
-				var aName:QName = _attributes[i].name();
-				var ans:Namespace = aName.getNamespace(ancestors.concat(declarations));
-				if(ans.prefix)
-				{
-					strArray.push(ans.prefix);
-					strArray.push(":");
-				}
-				strArray.push(aName.localName);
-				strArray.push('="');
-				strArray.push(escapeAttributeValue(_attributes[i].getValue()));
-				strArray.push('"');
-			}
-			// now write elements or close the tag if none exist
-			if(_children.length == 0)
-			{
-				strArray.push("/>");
-				return strArray.join("");
-			}
-			strArray.push(">");
-			var indentChildren:Boolean = _children.length > 1 || (_children.length == 1 && _children[0].nodeKind() != "text");
-			var nextIndentLevel:int;
-			if(XML.prettyPrinting && indentChildren)
-				nextIndentLevel = indentLevel + prettyIndent;
-			else
-				nextIndentLevel = 0;
-			for(i=0;i<_children.length;i++)
-			{
-				//
-				if(XML.prettyPrinting && indentChildren)
-					strArray.push("\n");
-				strArray.push(_children[i].toXMLString(nextIndentLevel,ancestors.concat(declarations)));
-			}
-			if(XML.prettyPrinting && indentChildren)
-			{
-				strArray.push("\n");
-				strArray.push(new Array(indentLevel + 1).join(' '));
-			}
-			strArray.push("</");
-			if(ns.prefix)
-			{
-				strArray.push(ns.prefix);
-				strArray.push(":");
-			}
-			strArray.push(ns.localName);
-			strArray.push(">");
-
-			return strArray.join("");
-		}
-		
-		/**
-		 * Returns the XML object.
-		 * 
-		 * @return 
-		 * 
-		 */
-		public function valueOf():XML
-		{
-			return this;
-		}
-		
-	}
-}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/as/src/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLClasses.as b/frameworks/projects/XML/as/src/XMLClasses.as
deleted file mode 100644
index 6a91d82..0000000
--- a/frameworks/projects/XML/as/src/XMLClasses.as
+++ /dev/null
@@ -1,35 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
-/**
- *  @private
- *  This class is used to link additional classes into rpc.swc
- *  beyond those that are found by dependency analysis starting
- *  from the classes specified in manifest.xml.
- */
-internal class XMLClasses
-{
-	COMPILE::JS
-	{
-		import XML; XML;
-		import XMLList; XMLList;
-		import QName; QName;
-	}
-}
\ No newline at end of file


[38/49] git commit: [flex-asjs] [refs/heads/develop] - More typos

Posted by ha...@apache.org.
More typos


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/51bbbac8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/51bbbac8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/51bbbac8

Branch: refs/heads/develop
Commit: 51bbbac84fea710ead3055749743789856c29725
Parents: 1c5e98d
Author: Harbs <ha...@in-tools.com>
Authored: Wed Apr 6 20:35:02 2016 -0700
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Apr 6 20:35:02 2016 -0700

----------------------------------------------------------------------
 manualtests/XMLTest/build.xml                   |  2 +-
 manualtests/XMLTest/src/ReflectionTest.mxml     | 40 --------------------
 manualtests/XMLTest/src/XMLTest.mxml            | 40 ++++++++++++++++++++
 .../XMLTest/src/controllers/MyController.as     |  6 +--
 4 files changed, 44 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51bbbac8/manualtests/XMLTest/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/build.xml b/manualtests/XMLTest/build.xml
index 6370e2d..5f352b6 100644
--- a/manualtests/XMLTest/build.xml
+++ b/manualtests/XMLTest/build.xml
@@ -21,7 +21,7 @@
 
 <project name="xmltest" default="main" basedir=".">
     <property name="FLEXJS_HOME" location="../.."/>
-    <property name="example" value="ReflectionTest" />
+    <property name="example" value="XMLTest" />
     
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51bbbac8/manualtests/XMLTest/src/ReflectionTest.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/ReflectionTest.mxml b/manualtests/XMLTest/src/ReflectionTest.mxml
deleted file mode 100644
index 27e97b5..0000000
--- a/manualtests/XMLTest/src/ReflectionTest.mxml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!---
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
--->
-<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
-				   xmlns:local="*"
-				   xmlns:models="models.*"
-                   xmlns:controllers="controllers.*"
-				   xmlns:js="library://ns.apache.org/flexjs/basic" 
-				   >
-	
-	<js:valuesImpl>
-		<js:SimpleCSSValuesImpl />
-	</js:valuesImpl>
-    <js:controller>
-        <controllers:MyController />
-    </js:controller>
-    <js:model>
-        <models:MyModel />
-    </js:model>
-	<js:initialView>
-		<local:MyInitialView />
-	</js:initialView>
-</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51bbbac8/manualtests/XMLTest/src/XMLTest.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/XMLTest.mxml b/manualtests/XMLTest/src/XMLTest.mxml
new file mode 100644
index 0000000..27e97b5
--- /dev/null
+++ b/manualtests/XMLTest/src/XMLTest.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+				   xmlns:local="*"
+				   xmlns:models="models.*"
+                   xmlns:controllers="controllers.*"
+				   xmlns:js="library://ns.apache.org/flexjs/basic" 
+				   >
+	
+	<js:valuesImpl>
+		<js:SimpleCSSValuesImpl />
+	</js:valuesImpl>
+    <js:controller>
+        <controllers:MyController />
+    </js:controller>
+    <js:model>
+        <models:MyModel />
+    </js:model>
+	<js:initialView>
+		<local:MyInitialView />
+	</js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51bbbac8/manualtests/XMLTest/src/controllers/MyController.as
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/controllers/MyController.as b/manualtests/XMLTest/src/controllers/MyController.as
index 81eb963..679d638 100644
--- a/manualtests/XMLTest/src/controllers/MyController.as
+++ b/manualtests/XMLTest/src/controllers/MyController.as
@@ -31,12 +31,12 @@ package controllers
 		{
 			if (app)
 			{
-				this.app = app as ReflectionTest;
+				this.app = app as XMLTest;
 				app.addEventListener("viewChanged", viewChangeHandler);
 			}
 		}
 		
-		private var app:ReflectionTest;
+		private var app:XMLTest;
 		
 		private function viewChangeHandler(event:Event):void
 		{
@@ -44,7 +44,7 @@ package controllers
 		        
 		public function setDocument(document:Object, id:String = null):void
 		{
-			this.app = document as ReflectionTest;
+			this.app = document as XMLTest;
 			app.addEventListener("viewChanged", viewChangeHandler);
 		}
 


[26/49] git commit: [flex-asjs] [refs/heads/develop] - Merge branch 'develop' into e4x

Posted by ha...@apache.org.
Merge branch 'develop' into e4x

* develop:
  Core: Language now checks for global console variable as final fallback, which adds trace() support for Node.js release builds
  trace(): better detection of window.console() so that there isn't a runtime error in a Node.js release build
  intellij-config.xml: updated paths to manifests to match frameworks/projects/flex-config.xml


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3872cb8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3872cb8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3872cb8e

Branch: refs/heads/develop
Commit: 3872cb8e1cb41316fa553d07ca3f1232e7a4f838
Parents: c7fd667 59b8e43
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 16 13:27:40 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 16 13:27:40 2016 +0200

----------------------------------------------------------------------
 .../Core/src/main/flex/org/apache/flex/utils/Language.as    | 9 ++++++---
 ide/IDEA/intellij-config.xml                                | 6 +++---
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[37/49] git commit: [flex-asjs] [refs/heads/develop] - typo

Posted by ha...@apache.org.
typo


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1c5e98db
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1c5e98db
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1c5e98db

Branch: refs/heads/develop
Commit: 1c5e98db9ceb3ca115715d4459d770ba23d35c4f
Parents: dbcc3b1
Author: Harbs <ha...@in-tools.com>
Authored: Wed Apr 6 18:48:54 2016 -0700
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Apr 6 18:48:54 2016 -0700

----------------------------------------------------------------------
 manualtests/XMLTest/src/MyInitialView.mxml | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c5e98db/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 0f9eab0..c611565 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -37,23 +37,16 @@ limitations under the License.
 			import org.apache.flex.events.Event;
 			import org.apache.flex.utils.UIUtils;
 						
-            import org.apache.flex.reflection.describeType;
-            import org.apache.flex.reflection.MetaDataArgDefinition;
-            import org.apache.flex.reflection.MetaDataDefinition;
-            import org.apache.flex.reflection.MethodDefinition;
-            import org.apache.flex.reflection.TypeDefinition;
-            
+            import XML;
+
             [Event(name="foo", type="org.apache.flex.events.Event")]
             public function runTest():void
             {
-                var metadata:Array;
-                var mtd:MetaDataDefinition;
-                var mtdarg:MetaDataArgDefinition;
                 var args:Array;
                 var j:int;
                 var m:int;
                 var xml1:XML = <foo baz="true"/>;
-                trace(xmll1);
+                trace(xml1);
                 trace(xml1.baz);
 
             }


[27/49] git commit: [flex-asjs] [refs/heads/develop] - Fixed some compile errors

Posted by ha...@apache.org.
Fixed some compile errors


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ab713c43
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ab713c43
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ab713c43

Branch: refs/heads/develop
Commit: ab713c4330e8c07dbe31bae436917f3126ed566d
Parents: 3872cb8
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 16 20:19:08 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 16 20:19:08 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/Namespace.as |  2 +-
 frameworks/projects/XML/src/main/flex/XML.as       | 16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ab713c43/frameworks/projects/XML/src/main/flex/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/Namespace.as b/frameworks/projects/XML/src/main/flex/Namespace.as
index 95bb405..c79ddbe 100644
--- a/frameworks/projects/XML/src/main/flex/Namespace.as
+++ b/frameworks/projects/XML/src/main/flex/Namespace.as
@@ -124,7 +124,7 @@ package
 			return uri;
 		}
 
-		public function valueOf():Object
+		override public function valueOf():*
 		{
 			return this;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ab713c43/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 8c65385..09a030d 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -31,7 +31,7 @@ package
 
 		static private var defaultNamespace:Namespace;
 
-		static public function setDefaultNamespace(ns:*)
+		static public function setDefaultNamespace(ns:*):void
 		{
 			if(!ns)
 				defaultNamespace = null;
@@ -89,7 +89,7 @@ package
 		static private function escapeAttributeValue(value:String):String
 		{
 			var outArr:Array = [];
-			var arr = value.split("");
+			var arr:Array = value.split("");
 			var len:int = arr.length;
 			for(var i:int=0;i<len;i++)
 			{
@@ -120,9 +120,10 @@ package
 
 		static private function escapeElementValue(value:String):String
 		{
+			var i:int;
 			var outArr:Array = [];
-			var arr = value.split("");
-			for(var i=0;i<arr.length;i++)
+			var arr:Array = value.split("");
+			for(i=0;i<arr.length;i++)
 			{
 				switch(arr[i])
 				{
@@ -143,7 +144,7 @@ package
 			return outArr.join("");
 		}
 
-		static private function insertAttribute(att:Attr,parent:XML):XML()
+		static private function insertAttribute(att:Attr,parent:XML):XML
 		{
 			var xml:XML = new XML();
 			xml.setParent(parent);
@@ -155,6 +156,7 @@ package
 		}
 		static private function iterateElement(node:Element,xml:XML):void
 		{
+			var i:int;
 			// add attributes
 			for(i=0;i<node.attributes.length;i++)
 			{
@@ -324,6 +326,7 @@ package
 			// get rid of nodes we do not want 
 
 			//loop through the child nodes and build XML obejcts for each.
+			/*
 			Object.defineProperty(this,"0",
 				{
 					get: function() { return this; },
@@ -333,7 +336,7 @@ package
 					configurable: true
 				}
 			);
-
+			*/
 		}
 		
 		private var _children:Array;
@@ -607,6 +610,7 @@ package
 		 */
 		public function comments():XMLList
 		{
+			var i:int;
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
 			{


[05/49] git commit: [flex-asjs] [refs/heads/develop] - descendents and cleanup

Posted by ha...@apache.org.
descendents and cleanup


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3c3a1618
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3c3a1618
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3c3a1618

Branch: refs/heads/develop
Commit: 3c3a1618192d4e74ecee9a4b7e5733f5e8523962
Parents: dc52078
Author: Harbs <ha...@in-tools.com>
Authored: Wed Feb 3 22:35:36 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Feb 3 22:35:36 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as     | 27 +++++++-
 frameworks/projects/XML/as/src/XMLList.as | 86 +++++++++++++-------------
 2 files changed, 67 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c3a1618/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index aad27ce..a59fcf8 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -640,7 +640,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function descendants(name:Object = *):XMLList
+		public function descendants(name:Object = "*"):XMLList
 		{
 			/*
 				When the [[Descendants]] method of an XML object x is called with property name P, the following steps are taken:
@@ -657,7 +657,28 @@ package
 				  c. If dq.[[Length]] > 0, call the [[Append]] method of list with argument dq
 				5. Return list
 			*/
-			return null;
+			var i:int;
+			name = toXMLName(name);
+			var list:XMLList = new XMLList();
+			if(name.isAttribute)
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(name.matches(_attributes[i].name()))
+						list.appendChild(_attributes[i]);
+				}
+				for(i=0;i<_children.length;i++)
+				{
+					if(_children[i].nodeKind() == "element")
+					{
+						if(name.matches(_children[i].name()))
+							list.appendChild(_children[i]);
+
+						list = list.concat(_children[i].descendants());
+					} 
+				}
+			}
+			return list;
 		}
 		
 		/**
@@ -667,7 +688,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function elements(name:Object = *):XMLList
+		public function elements(name:Object = "*"):XMLList
 		{
 			return null;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c3a1618/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
index 8eae698..9e0d2fb 100644
--- a/frameworks/projects/XML/as/src/XMLList.as
+++ b/frameworks/projects/XML/as/src/XMLList.as
@@ -171,10 +171,10 @@ package
 		public function attribute(attributeName:*):XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].attribute(attributeName);
+				var list:XMLList = _xmlArray[i].attribute(attributeName);
 				if(list.length())
 					retVal = retVal.concat(list);
 			}
@@ -189,10 +189,10 @@ package
 		public function attributes():XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].attributes();
+				var list:XMLList = _xmlArray[i].attributes();
 				if(list.length())
 					retVal = retVal.concat(list);
 			}
@@ -208,10 +208,10 @@ package
 		public function child(propertyName:Object):XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].child(propertyName);
+				var list:XMLList = _xmlArray[i].child(propertyName);
 				if(list.length())
 					retVal = retVal.concat(list);
 			}
@@ -226,10 +226,10 @@ package
 		public function children():XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].children();
+				var list:XMLList = _xmlArray[i].children();
 				if(list.length)
 					retVal = retVal.concat(list);
 			}
@@ -244,10 +244,10 @@ package
 		public function comments():XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].comments();
+				var list:XMLList = _xmlArray[i].comments();
 				if(list.length)
 					retVal = retVal.concat(list);
 			}
@@ -274,10 +274,10 @@ package
 		public function contains(value:XML):Boolean
 		{
 			
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				if(this[i].contains(value))
+				if(_xmlArray[i].contains(value))
 					return true;
 			}
 			return false;
@@ -292,9 +292,9 @@ package
 		public function copy():XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
-				retVal[i] = this[i].copy();
+				retVal[i] = _xmlArray[i].copy();
 			
 			return retVal;
 		}
@@ -309,10 +309,10 @@ package
 		public function descendants(name:Object = *):XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].descendants(name);
+				var list:XMLList = _xmlArray[i].descendants(name);
 				if(list.length())
 					retVal = retVal.concat(list);
 			}
@@ -329,10 +329,10 @@ package
 		public function elements(name:Object = *):XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].elements(name);
+				var list:XMLList = _xmlArray[i].elements(name);
 				if(list.length())
 					retVal = retVal.concat(list);
 			}
@@ -342,12 +342,12 @@ package
 		public function hasComplexContent():Boolean
 		{
 			//what to do with multiple nodes? If anything is complex, we return true.
-			if(this.length() == 0)
+			if(_xmlArray.length == 0)
 				return false;
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=1;i<len;i++)
 			{
-				if(this[i].hasComplexContent())
+				if(_xmlArray[i].hasComplexContent())
 					return true;
 			}
 			return false;
@@ -368,12 +368,12 @@ package
 			*/
 			if(parseInt(propertyName,10).toString() == propertyName)
 			{
-				return parseInt(propertyName,10) < this.length();
+				return parseInt(propertyName,10) < _xmlArray.length;
 			}
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=1;i<len;i++)
 			{
-				if(this[i].hasOwnProperty(propertyName))
+				if(_xmlArray[i].hasOwnProperty(propertyName))
 					return true;
 			}
 			return false;
@@ -388,12 +388,12 @@ package
 		public function hasSimpleContent():Boolean
 		{
 			//what to do with multiple nodes? If anything is complex, we return false.
-			if(this.length() == 0)
+			if(_xmlArray.length == 0)
 				return true;
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=1;i<len;i++)
 			{
-				if(this[i].hasComplexContent())
+				if(_xmlArray[i].hasComplexContent())
 					return false;
 			}
 			return true;
@@ -430,13 +430,13 @@ package
 		 */
 		public function parent():Object
 		{
-			if(this.length() == 0)
+			if(_xmlArray.length == 0)
 				return undefined;
 			var retVal = this[0].parent;
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=1;i<len;i++)
 			{
-				if(this[i].parent != retVal)
+				if(_xmlArray[i].parent != retVal)
 					return undefined;
 			}
 			return retVal;
@@ -454,17 +454,17 @@ package
 			var retVal:XMLList = new XMLList();
 			if(!name)
 				return retVal;
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				if(this[i].nodeKind() != "processing-instruction")
+				if(_xmlArray[i].nodeKind() != "processing-instruction")
 					continue;
 				if(name == "*")
 				{
-					retVal.appendChild(this[i]);
+					retVal.appendChild(_xmlArray[i]);
 				}
-				else if(name == this[i].localName)
-					retVal.appendChild(this[i]);
+				else if(name == _xmlArray[i].localName)
+					retVal.appendChild(_xmlArray[i]);
 			}
 			return retVal;
 		}
@@ -539,10 +539,10 @@ package
 		public function text():XMLList
 		{
 			var retVal:XMLList = new XMLList();
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var list:XMLList = this[i].text();
+				var list:XMLList = _xmlArray[i].text();
 				if(list.length())
 					retVal.concat(list);
 			}
@@ -558,10 +558,10 @@ package
 		public function toLocaleString():String
 		{
 			var retVal:Array = [];
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var str:String = this[i].toLocaleString();
+				var str:String = _xmlArray[i].toLocaleString();
 				if(str)
 					retVal.push(str);
 			}
@@ -577,10 +577,10 @@ package
 		public function toString():String
 		{
 			var retVal:Array = [];
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var str:String = this[i].toString();
+				var str:String = _xmlArray[i].toString();
 				if(str)
 					retVal.push(str);
 			}
@@ -596,10 +596,10 @@ package
 		public function toXMLString():String
 		{
 			var retVal:Array = [];
-			var len:int = this.length();
+			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{
-				var str:String = this[i].toXMLString();
+				var str:String = _xmlArray[i].toXMLString();
 				if(str)
 					retVal.push(str);
 			}


[15/49] git commit: [flex-asjs] [refs/heads/develop] - Added "0", fixes for setChild/setChildren

Posted by ha...@apache.org.
Added "0", fixes for setChild/setChildren


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/266cf0b0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/266cf0b0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/266cf0b0

Branch: refs/heads/develop
Commit: 266cf0b0d7bc8daea66da5545d409f10fd6db7fc
Parents: 5251917
Author: Harbs <ha...@in-tools.com>
Authored: Wed Feb 10 14:56:24 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Feb 10 14:56:24 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/266cf0b0/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index 02faa79..b6abbe9 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -306,6 +306,15 @@ package
 			// get rid of nodes we do not want 
 
 			//loop through the child nodes and build XML obejcts for each.
+			Object.defineProperty(this,"0",
+				{
+					get: function() { return this; },
+					set: function(newValue:*) {
+					},
+					enumerable: true,
+					configurable: true
+				}
+			);
 
 		}
 		
@@ -1703,15 +1712,17 @@ package
 				len = chldrn.length() -1;
 				for (i= len; i >= 0;  i--)
 				{
+					removeChild(chldrn[i]);
 					// remove the nodes
 					// remove the children
 					// adjust the childIndexes
 				}
 				var curChild = _children[childIdx];
 				// Now add them in.
-				for each(chld in elements)
+				len = elements.length();
+				for(i=0;i<len;i++)
 				{
-				
+					child = elements[i];
 					if(!curChild)
 					{
 						curChild = appendChild(chld);
@@ -1740,7 +1751,7 @@ package
 				list[0] = value;
 				value = list;
 			}
-			if(elements is XMLList)
+			if(value is XMLList)
 			{
 				// remove all existing elements
 				var chldrn:XMLList = this.child(elementName);
@@ -1751,15 +1762,17 @@ package
 				len = chldrn.length() -1;
 				for (i= len; i >= 0;  i--)
 				{
+					removeChild(chldrn[i]);
 					// remove the nodes
 					// remove the children
 					// adjust the childIndexes
 				}
 				var curChild = _children[childIdx];
 				// Now add them in.
-				for each(chld in elements)
+				len = value.length();
+				for(i=0;i<len;i++)
 				{
-					
+					child = value[i];
 					if(!curChild)
 					{
 						curChild = appendChild(chld);


[09/49] git commit: [flex-asjs] [refs/heads/develop] - text()

Posted by ha...@apache.org.
text()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d2b32b8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d2b32b8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d2b32b8e

Branch: refs/heads/develop
Commit: d2b32b8ef8fd91ea1a57f069d3132a1a9190e91c
Parents: a2d921d
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 00:21:50 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 00:21:50 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d2b32b8e/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index d077ae8..c9da8a7 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -765,7 +765,7 @@ package
 			var xmlChildren:Array = xml.getChildrenArray();
 			if(selfChldrn.length != xmlChildren.length)
 				return false;
-			
+
 			for(i=0;i<selfChldrn.length;i++)
 			{
 				if(!selfChldrn[i].equals(xmlChildren[i]))
@@ -1467,7 +1467,15 @@ package
 		 */
 		public function text():XMLList
 		{
-			return null;
+			var list:XMLList = new XMLList();
+			var i:int;
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "text")
+					list.list.appendChild(_atributes[i]);
+			}
+			list.targetObject = this;
+			return list;
 		}
 		
 		/**


[33/49] git commit: [flex-asjs] [refs/heads/develop] - more XML fixes

Posted by ha...@apache.org.
more XML fixes


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/bd3f6c84
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bd3f6c84
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bd3f6c84

Branch: refs/heads/develop
Commit: bd3f6c8457b3f15ef71c833d634b357651d138f9
Parents: fe4f9c1
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 18 20:48:37 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 18 20:48:37 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 35 +++++++++++++++++------
 1 file changed, 26 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bd3f6c84/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index cec9faf..d808a2a 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -340,7 +340,7 @@ package
 		}
 		
 		private var _children:Array;
-		private var _attributes:Array;
+		private var _attributes:Array = [];
 		private var _processingInstructions:Array;
 		private var _parent:XML;
 		private var _value:String;
@@ -580,10 +580,10 @@ package
 		 */
 		public function childIndex():int
 		{
-			if(!parent)
+			if(!_parent)
 				return -1;
 
-			return parent.getIndexOf(this);
+			return _parent.getIndexOf(this);
 		}
 		
 		/**
@@ -700,7 +700,14 @@ package
 
 		private function deleteChildAt(idx:int):void
 		{
-
+			if(idx < 0)
+				return;
+			if(idx >= _children.length)
+				return;
+			var child:XML = _children[idx];
+			child.setParent(null);
+			_children.splice(idx,1);
+				_
 		}
 		
 		/**
@@ -1642,16 +1649,24 @@ package
 				{
 					for(i=0;i<_attributes.length;i++)
 					{
-						//TODO incomplete...
-						//if(_attributes[i].name.equals() )
+						if(_attributes[i].name().equals(attr.name()))
+						{
+							_attributes[i].setValue(value);
+							return;
+						}
 						//addChild(_att)
 					}
+					if(value)
+						attr.setValue(value);
+					addChild(attr);
 				}
+				return;
 
 			}
 			if(attr.indexOf("xmlns") == 0)
 			{
 				//it's a namespace declaration
+				//TODO This does not seem right.
 				var ns:Namespace = new Namespace(value.toString());
 				if(attr.indexOf("xmlns:") == 0)// it has a prefix
 					ns.prefix = attr.split(":")[1];
@@ -1660,6 +1675,7 @@ package
 			else
 			{
 				//it's a regular attribute string
+				//TODO use toXMLName or toAttributeName to convert attr and assing it
 
 			}
 
@@ -1899,9 +1915,11 @@ package
 		
 		public function setParent(parent:XML):void
 		{
-			if(_parent)
-				_parent.removeChild(this);
+			var oldParent:XML = _parent;
 			_parent = parent;
+			//assign first to prevent the possiblity of a recursive loop
+			if(oldParent)
+				_parent.removeChild(this);
 		}
 
 		public function setValue(value:String):void
@@ -2137,7 +2155,6 @@ package
 				return indent + "<?" + name().localName + " " + _value + "?>";
 
 			// We excluded the other types, so it's a normal element
-			//TODO I'm here...
 			// step 8.
 			//ancestors
 			if(!ancestors)


[39/49] git commit: [flex-asjs] [refs/heads/develop] - Merge branch 'develop' into e4x

Posted by ha...@apache.org.
Merge branch 'develop' into e4x

* develop: (41 commits)
  Application was not adding its own beads to its strand.
  switch nightly to 0.7.0
  try to fix 'all' target
  Add AngularJS + Angular Material example.  Need to figure out what to do about the externs swc files.
  remove GCL crypt folder (and upgrade Selenium)
  fix gpg check for docs in approval script
  update rat in releasecandidate.xml
  fix issues with release packaging, installation and approval
  missing brace
  don't exclude this anymore
  AntOnAIR doesn't have flattenmapper so try alternative
  fix files in LICENSE
  try to make the designmodo fonts an optional dependency
  switch to newer rat from maven
  get ant examples to build from an IDE-compatible folder structure
  fix up ant scripts to hanlde both repo folder structure and binary package folder structure
  Use airglobal.swc from PROJECT_FRAMEWORKS}/libs/air/ instead of adding a reference to AIR SDK.
  Update Flash Builder/Eclipse project to add reference to Graphics project.
  Add dependency on AIR SDK.  Need to add a linked resource called AIR_HOME in Flash Builder/Eclipse and point it to directory where AIR SDK is available.
  Clean up asdoc issue surrounding the inclusion of Google Maps stubs.
  ...

Conflicts:
	build.xml


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e2c462a0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e2c462a0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e2c462a0

Branch: refs/heads/develop
Commit: e2c462a078ad3d04e1106fd75e50bf10c8b33e24
Parents: 51bbbac 64c699d
Author: Harbs <ha...@in-tools.com>
Authored: Fri Apr 8 14:18:50 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Apr 8 14:18:50 2016 +0300

----------------------------------------------------------------------
 ApproveFlexJS.xml                               | 287 ++++++++++++++++++-
 LICENSE                                         |   7 +-
 LICENSE.base                                    | 203 +++++++++++++
 LICENSE.bin                                     |   4 -
 NOTICE                                          |   2 +-
 RELEASE_NOTES                                   |  10 +
 apache-flex-flexjs-installer-config.xml         |  29 ++
 build.properties                                |   2 +-
 build.xml                                       |  54 ++--
 examples/build.xml                              |   4 +
 examples/build_example.xml                      |  18 ++
 examples/flexjs/ChartExample/build.xml          |  16 ++
 examples/flexjs/DataGridExample/build.xml       |  16 ++
 .../src/productsView/ProductListItem.mxml       |  10 +
 examples/flexjs/FlexJSStore_jquery/build.xml    |  16 ++
 .../src/productsView/CatalogTitleButtons.mxml   |   8 +-
 .../productsView/ProductCatalogThumbnail.mxml   |   2 +-
 .../src/productsView/ProductListItem.mxml       |  10 +
 examples/flexjs/MapSearch/build.xml             |  16 ++
 examples/flexjs/MobileTrader/build.xml          |  16 ++
 examples/flexjs/StorageExample/README.txt       |  81 ++++++
 .../StorageExample/StorageExample-app.xml       | 252 ++++++++++++++++
 examples/flexjs/StorageExample/build.xml        |  93 ++++++
 examples/flexjs/StorageExample/pom.xml          |  50 ++++
 .../StorageExample/src/MyInitialView.mxml       | 245 ++++++++++++++++
 .../StorageExample/src/StorageExample.mxml      |  42 +++
 .../flexjs/StorageExample/src/models/MyModel.as |  58 ++++
 examples/flexjs/TreeExample/build.xml           |  60 ++++
 examples/flexjs/TreeExample/pom.xml             |  50 ++++
 .../flexjs/TreeExample/src/MyInitialView.mxml   |  37 +++
 .../flexjs/TreeExample/src/TreeExample.mxml     |  36 +++
 .../flexjs/TreeExample/src/models/MyModel.as    |  72 +++++
 .../AngularExample/AngularExample-debug.html    |  28 ++
 .../AngularExample/AngularExample-release.html  |  29 ++
 .../native/AngularExample/src/AngularExample.as |  66 +++++
 .../native/AngularExample/src/MyController.as   |  52 ++++
 .../src/components/IWebComponent.as             |   9 +
 .../src/components/WebComponent.as              |  20 ++
 .../src/components/mdbutton/MDButton.as         |  43 +++
 .../src/components/mdbutton/MDButtonFactory.as  |  38 +++
 frameworks/asdoc-config.xml                     |   3 +-
 frameworks/build.xml                            |   6 +
 frameworks/downloads.xml                        |  41 ++-
 frameworks/projects/Binding/build.xml           |   7 +
 frameworks/projects/Charts/build.xml            |   7 +
 frameworks/projects/Collections/build.xml       |   7 +
 .../src/main/flex/CollectionsClasses.as         |   2 +
 .../org/apache/flex/collections/ArrayList.as    | 114 ++++----
 .../apache/flex/collections/FlattenedList.as    | 203 +++++++++++++
 .../apache/flex/collections/HierarchicalData.as | 269 +++++++++++++++++
 .../org/apache/flex/collections/IArrayList.as   | 178 ++++++++++++
 .../flex/collections/IHierarchicalData.as       | 119 ++++++++
 .../src/main/resources/basic-manifest.xml       |   1 +
 frameworks/projects/Core/build.xml              |   7 +
 .../projects/Core/src/main/flex/CoreClasses.as  |   4 +
 .../projects/Core/src/main/flex/Namespace.as    |  50 ++++
 frameworks/projects/Core/src/main/flex/QName.as |  53 ++++
 .../flex/org/apache/flex/core/Application.as    |   7 +-
 .../org/apache/flex/core/HTMLElementWrapper.as  |  18 ++
 .../flex/org/apache/flex/core/IFlexJSElement.as |  18 ++
 .../flex/org/apache/flex/core/IItemRenderer.as  |  12 +
 .../org/apache/flex/core/WrappedHTMLElement.as  |  18 ++
 .../flex/org/apache/flex/events/CustomEvent.as  |   9 +-
 .../main/flex/org/apache/flex/events/Event.as   |  17 +-
 .../org/apache/flex/events/EventDispatcher.as   |  14 +
 .../flex/org/apache/flex/events/MouseEvent.as   |   2 +-
 .../org/apache/flex/events/ValueChangeEvent.as  |   9 +-
 .../flex/org/apache/flex/events/ValueEvent.as   |  10 +-
 .../main/flex/org/apache/flex/utils/Proxy.as    | 152 ++++++++++
 frameworks/projects/CreateJS/build.xml          |  11 +-
 frameworks/projects/DragDrop/build.xml          |   7 +
 frameworks/projects/Effects/build.xml           |   7 +
 frameworks/projects/Flat/build.xml              |   7 +
 frameworks/projects/Formatters/build.xml        |   6 +
 frameworks/projects/GoogleMaps/build.xml        |  11 +-
 .../src/main/flex/google/maps/Animation.as      |  18 ++
 .../src/main/flex/google/maps/BicyclingLayer.as |  18 ++
 .../src/main/flex/google/maps/Circle.as         |  18 ++
 .../main/flex/google/maps/ControlPosition.as    |  18 ++
 .../main/flex/google/maps/DirectionsRenderer.as |  18 ++
 .../main/flex/google/maps/DirectionsService.as  |  18 ++
 .../main/flex/google/maps/DirectionsStatus.as   |  18 ++
 .../google/maps/DistanceMatrixElementStatus.as  |  18 ++
 .../flex/google/maps/DistanceMatrixService.as   |  18 ++
 .../flex/google/maps/DistanceMatrixStatus.as    |  18 ++
 .../main/flex/google/maps/ElevationService.as   |  18 ++
 .../main/flex/google/maps/ElevationStatus.as    |  18 ++
 .../flex/google/maps/FusionTablesHeatmap.as     |  18 ++
 .../main/flex/google/maps/FusionTablesLayer.as  |  18 ++
 .../google/maps/FusionTablesMarkerOptions.as    |  18 ++
 .../google/maps/FusionTablesPolygonOptions.as   |  18 ++
 .../google/maps/FusionTablesPolylineOptions.as  |  18 ++
 .../main/flex/google/maps/FusionTablesQuery.as  |  18 ++
 .../main/flex/google/maps/FusionTablesStyle.as  |  18 ++
 .../src/main/flex/google/maps/Geocoder.as       |  18 ++
 .../google/maps/GeocoderAddressComponent.as     |  18 ++
 .../main/flex/google/maps/GeocoderGeometry.as   |  18 ++
 .../flex/google/maps/GeocoderLocationType.as    |  18 ++
 .../src/main/flex/google/maps/GeocoderResult.as |  18 ++
 .../src/main/flex/google/maps/GeocoderStatus.as |  18 ++
 .../src/main/flex/google/maps/GroundOverlay.as  |  18 ++
 .../src/main/flex/google/maps/ImageMapType.as   |  18 ++
 .../src/main/flex/google/maps/InfoWindow.as     |  18 ++
 .../src/main/flex/google/maps/KmlAuthor.as      |  18 ++
 .../src/main/flex/google/maps/KmlFeatureData.as |  18 ++
 .../src/main/flex/google/maps/KmlLayer.as       |  18 ++
 .../main/flex/google/maps/KmlLayerMetadata.as   |  18 ++
 .../src/main/flex/google/maps/KmlLayerStatus.as |  18 ++
 .../src/main/flex/google/maps/KmlMouseEvent.as  |  18 ++
 .../src/main/flex/google/maps/LatLng.as         |  37 +--
 .../src/main/flex/google/maps/LatLngBounds.as   |  18 ++
 .../src/main/flex/google/maps/MVCArray.as       |  18 ++
 .../src/main/flex/google/maps/MVCObject.as      |  19 ++
 .../GoogleMaps/src/main/flex/google/maps/Map.as |  18 ++
 .../flex/google/maps/MapCanvasProjection.as     |  18 ++
 .../src/main/flex/google/maps/MapPanes.as       |  18 ++
 .../flex/google/maps/MapTypeControlStyle.as     |  18 ++
 .../src/main/flex/google/maps/MapTypeId.as      |  18 ++
 .../main/flex/google/maps/MapTypeRegistry.as    |  18 ++
 .../main/flex/google/maps/MapsEventListener.as  |  18 ++
 .../src/main/flex/google/maps/Marker.as         |  37 +--
 .../src/main/flex/google/maps/MaxZoomService.as |  18 ++
 .../src/main/flex/google/maps/MaxZoomStatus.as  |  18 ++
 .../src/main/flex/google/maps/MouseEvent.as     |  19 ++
 .../src/main/flex/google/maps/OverlayView.as    |  18 ++
 .../src/main/flex/google/maps/Point.as          |  18 ++
 .../src/main/flex/google/maps/PolyMouseEvent.as |  18 ++
 .../src/main/flex/google/maps/Polygon.as        |  18 ++
 .../src/main/flex/google/maps/Polyline.as       |  18 ++
 .../src/main/flex/google/maps/Rectangle.as      |  18 ++
 .../main/flex/google/maps/ScaleControlStyle.as  |  18 ++
 .../src/main/flex/google/maps/Size.as           |  18 ++
 .../flex/google/maps/StreetViewCoverageLayer.as |  18 ++
 .../main/flex/google/maps/StreetViewPanorama.as |  18 ++
 .../src/main/flex/google/maps/StreetViewPov.as  |  18 ++
 .../main/flex/google/maps/StreetViewService.as  |  18 ++
 .../main/flex/google/maps/StreetViewStatus.as   |  18 ++
 .../src/main/flex/google/maps/StrokePosition.as |  18 ++
 .../src/main/flex/google/maps/StyledMapType.as  |  18 ++
 .../src/main/flex/google/maps/SymbolPath.as     |  18 ++
 .../src/main/flex/google/maps/TrafficLayer.as   |  18 ++
 .../src/main/flex/google/maps/TransitLayer.as   |  18 ++
 .../src/main/flex/google/maps/TravelMode.as     |  18 ++
 .../src/main/flex/google/maps/UnitSystem.as     |  18 ++
 .../main/flex/google/maps/ZoomControlStyle.as   |  18 ++
 .../src/main/flex/google/maps/adsense.as        |  18 ++
 .../main/flex/google/maps/adsense/AdFormat.as   |  18 ++
 .../src/main/flex/google/maps/adsense/AdUnit.as |  18 ++
 .../src/main/flex/google/maps/drawing.as        |  18 ++
 .../flex/google/maps/drawing/DrawingManager.as  |  18 ++
 .../google/maps/drawing/OverlayCompleteEvent.as |  18 ++
 .../flex/google/maps/drawing/OverlayType.as     |  18 ++
 .../src/main/flex/google/maps/event.as          |  18 ++
 .../src/main/flex/google/maps/geometry.as       |  18 ++
 .../main/flex/google/maps/geometry/encoding.as  |  18 ++
 .../src/main/flex/google/maps/geometry/poly.as  |  18 ++
 .../main/flex/google/maps/geometry/spherical.as |  18 ++
 .../src/main/flex/google/maps/panoramio.as      |  18 ++
 .../google/maps/panoramio/PanoramioLayer.as     |  18 ++
 .../src/main/flex/google/maps/places.as         |  18 ++
 .../flex/google/maps/places/Autocomplete.as     |  18 ++
 .../google/maps/places/AutocompleteService.as   |  18 ++
 .../google/maps/places/ComponentRestrictions.as |  18 ++
 .../flex/google/maps/places/PhotoOptions.as     |  18 ++
 .../google/maps/places/PlaceAspectRating.as     |  18 ++
 .../flex/google/maps/places/PlaceGeometry.as    |  18 ++
 .../main/flex/google/maps/places/PlaceResult.as |  18 ++
 .../main/flex/google/maps/places/PlaceReview.as |  18 ++
 .../google/maps/places/PlaceSearchPagination.as |  18 ++
 .../flex/google/maps/places/PlacesService.as    |  18 ++
 .../google/maps/places/PlacesServiceStatus.as   |  18 ++
 .../src/main/flex/google/maps/places/RankBy.as  |  18 ++
 .../main/flex/google/maps/places/SearchBox.as   |  18 ++
 .../src/main/flex/google/maps/visualization.as  |  18 ++
 .../maps/visualization/DemographicsLayer.as     |  18 ++
 .../google/maps/visualization/HeatmapLayer.as   |  18 ++
 .../maps/visualization/MapsEngineLayer.as       |  18 ++
 .../maps/visualization/MapsEngineStatus.as      |  18 ++
 .../src/main/flex/google/maps/weather.as        |  18 ++
 .../main/flex/google/maps/weather/CloudLayer.as |  18 ++
 .../main/flex/google/maps/weather/LabelColor.as |  18 ++
 .../flex/google/maps/weather/TemperatureUnit.as |  18 ++
 .../flex/google/maps/weather/WeatherLayer.as    |  18 ++
 .../flex/google/maps/weather/WindSpeedUnit.as   |  18 ++
 .../main/flex/google/pseudo/HTMLInputElement.as |  20 ++
 .../src/main/flex/google/pseudo/Node.as         |  20 ++
 frameworks/projects/Graphics/build.xml          |   6 +
 .../projects/HTML/.actionScriptProperties       |   1 +
 frameworks/projects/HTML/build.xml              |   6 +
 .../projects/HTML/src/main/flex/HTMLClasses.as  |   8 +-
 .../src/main/flex/org/apache/flex/html/Tree.as  |  73 +++++
 .../DataItemRendererFactoryForArrayList.as      |  27 +-
 ...ataItemRendererFactoryForHierarchicalData.as | 109 +++++++
 .../ListSingleSelectionMouseController.as       |  10 +-
 .../TreeSingleSelectionMouseController.as       |  82 ++++++
 .../beads/models/ArrayListSelectionModel.as     |  64 ++---
 .../html/supportClasses/GraphicsItemRenderer.as |  21 ++
 .../html/supportClasses/StringItemRenderer.as   |   3 -
 .../supportClasses/TextFieldItemRenderer.as     |  19 ++
 .../html/supportClasses/TreeItemRenderer.as     |  64 +++++
 .../flex/html/supportClasses/TreeListData.as    |  76 +++++
 .../html/supportClasses/UIItemRendererBase.as   |  21 ++
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +
 .../HTML/src/main/resources/defaults.css        |  22 ++
 frameworks/projects/HTML5/build.xml             |   6 +
 frameworks/projects/JQuery/build.xml            |  11 +-
 .../projects/Mobile/.actionScriptProperties     |   1 +
 frameworks/projects/Mobile/build.xml            |   6 +
 .../Mobile/src/main/flex/MobileClasses.as       |   3 +
 .../flex/org/apache/flex/mobile/ToggleSwitch.as | 105 +++++++
 .../flex/mobile/beads/ToggleSwitchView.as       | 180 ++++++++++++
 .../controllers/ToggleSwitchMouseController.as  | 120 ++++++++
 .../src/main/resources/basic-manifest.xml       |   1 +
 .../Mobile/src/main/resources/defaults.css      |   9 +
 frameworks/projects/Network/build.xml           |   6 +
 frameworks/projects/Reflection/build.xml        |   6 +
 frameworks/projects/Storage/build.xml           | 184 ++++++++++++
 .../Storage/src/main/flex/StorageClasses.as     |  46 +++
 .../apache/flex/storage/IPermanentStorage.as    |  91 ++++++
 .../flex/org/apache/flex/storage/IWebStorage.as | 100 +++++++
 .../org/apache/flex/storage/LocalStorage.as     | 157 ++++++++++
 .../org/apache/flex/storage/PermanentStorage.as | 131 +++++++++
 .../flex/storage/events/FileErrorEvent.as       |  80 ++++++
 .../org/apache/flex/storage/events/FileEvent.as |  84 ++++++
 .../apache/flex/storage/file/DataInputStream.as | 146 ++++++++++
 .../flex/storage/file/DataOutputStream.as       | 165 +++++++++++
 .../org/apache/flex/storage/file/IDataInput.as  |  32 +++
 .../org/apache/flex/storage/file/IDataOutput.as |  32 +++
 .../org/apache/flex/storage/file/IDataStream.as |  32 +++
 .../org/apache/flex/storage/file/LocalFile.as   |  84 ++++++
 .../storage/providers/AirStorageProvider.as     | 255 ++++++++++++++++
 .../providers/IPermanentStorageProvider.as      | 102 +++++++
 .../storage/providers/LocalStorageProvider.as   | 220 ++++++++++++++
 .../storage/providers/WebStorageProvider.as     | 255 ++++++++++++++++
 .../src/main/resources/basic-manifest.xml       |  25 ++
 .../src/main/resources/compile-asjs-config.xml  |  82 ++++++
 .../src/main/resources/compile-config.xml       |  82 ++++++
 .../Storage/src/main/resources/defaults.css     |  42 +++
 installer.properties/en_US.properties           |  14 +
 installer.xml                                   |  84 +++++-
 manualtests/LanguageTests/src/LanguageTests.as  |  26 +-
 manualtests/ProxyTest/build.xml                 |  72 +++++
 manualtests/ProxyTest/src/MyInitialView.mxml    |  67 +++++
 manualtests/ProxyTest/src/ProxyTest.mxml        |  40 +++
 manualtests/ProxyTest/src/README.txt            |  45 +++
 .../ProxyTest/src/controllers/MyController.as   |  52 ++++
 manualtests/ProxyTest/src/models/MyModel.as     | 125 ++++++++
 marmotinni/java/downloads.xml                   |   6 +-
 nightly.properties                              |   8 +-
 releasecandidate.xml                            |   9 +-
 250 files changed, 9326 insertions(+), 256 deletions(-)
----------------------------------------------------------------------



[31/49] git commit: [flex-asjs] [refs/heads/develop] - Fixed remaining XML errors

Posted by ha...@apache.org.
Fixed remaining XML errors


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7ed59b56
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7ed59b56
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7ed59b56

Branch: refs/heads/develop
Commit: 7ed59b5607156b2c2571b06e79efa39a929b9fe3
Parents: 7edb7e5
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 18 14:23:48 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 18 14:23:48 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as    | 30 +++++++++++---------
 .../projects/XML/src/main/flex/XMLList.as       |  4 +--
 2 files changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7ed59b56/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 49f2fd1..a611db0 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -326,17 +326,17 @@ package
 			// get rid of nodes we do not want 
 
 			//loop through the child nodes and build XML obejcts for each.
-			/*
+			
 			Object.defineProperty(this,"0",
 				{
-					get: function() { return this; },
-					set: function(newValue:*) {
+					"get": function():* { return this; },
+					"set": function(newValue:*):void {
 					},
 					enumerable: true,
 					configurable: true
 				}
 			);
-			*/
+			
 		}
 		
 		private var _children:Array;
@@ -556,7 +556,7 @@ package
 				for(i=0;i<_attributes.length;i++)
 				{
 					if(propertyName.matches(_attributes[i].name()))
-						list.append(_attributes[i]);
+						list.appendChild(_attributes[i]);
 				}
 			}
 			else
@@ -564,7 +564,7 @@ package
 				for(i=0;i<_children.length;i++)
 				{
 					if(propertyName.matches(_children[i].name()))
-						list.append(_children[i]);
+						list.appendChild(_children[i]);
 				}
 			}
 			list.targetObject = this;
@@ -597,7 +597,7 @@ package
 			var i:int;
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
-				list.append(_children[i]);
+				list.appendChild(_children[i]);
 
 			list.targetObject = this;
 			return list;
@@ -616,7 +616,7 @@ package
 			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "comment")
-					list.append(_children[i]);
+					list.appendChild(_children[i]);
 			}
 			list.targetObject = this;
 			return list;
@@ -766,7 +766,7 @@ package
 			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "element" && name.matches(_children[i].name()))
-					list.append(_children[i]);
+					list.appendChild(_children[i]);
 			}
 
 			list.targetObject = this;
@@ -1804,8 +1804,8 @@ package
 			if(value is XMLList)
 			{
 				// remove all existing elements
-				var chldrn:XMLList = this.child(elementName);
-				var childIdx:int = children().length() -1;
+				var chldrn:XMLList = children();
+				var childIdx:int = chldrn.length() -1;
 				if(chldrn.length())
 					childIdx = chldrn[0].childIndex();
 				
@@ -1922,7 +1922,7 @@ package
 			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "text")
-					list.list.appendChild(_attributes[i]);
+					list.appendChild(_attributes[i]);
 			}
 			list.targetObject = this;
 			return list;
@@ -1935,11 +1935,13 @@ package
 		 * @return 
 		 * 
 		 */
+		 /*
 		override public function toJSON(k:String):String
 		{
 			return this.name();
 		}
-		
+		*/
+
 		/**
 		 * Returns a string representation of the XML object.
 		 * 
@@ -2230,7 +2232,7 @@ package
 				strArr.push(ns.prefix);
 				strArr.push(":");
 			}
-			strArr.push(ns.localName);
+			strArr.push(name().localName);
 			strArr.push(">");
 
 			return strArr.join("");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7ed59b56/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index c7f3c09..cacbfc1 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -113,8 +113,8 @@ package
 			var idxStr:String = "" + idx;
 			Object.defineProperty(this,idxStr,
 				{
-					get: function() { return _xmlArray[idx]; },
-					set: function(newValue:*) {
+					"get": function():* { return _xmlArray[idx]; },
+					"set": function(newValue:*):void {
 						var i:int;
 						if(newValue is XML)
 						{


[14/49] git commit: [flex-asjs] [refs/heads/develop] - removeNamespace(), some work on replace(), asst.

Posted by ha...@apache.org.
removeNamespace(), some work on replace(), asst.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/52519174
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/52519174
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/52519174

Branch: refs/heads/develop
Commit: 525191748c437d9ddafb868519ea3c29a6e94bd7
Parents: fd89039
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 9 14:58:04 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 9 14:58:04 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 138 +++++++++++++++++++++++++++--
 1 file changed, 130 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/52519174/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index 479fc11..02faa79 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -645,6 +645,11 @@ package
 			
 			return xml;
 		}
+
+		private function deleteChildAt(idx:int):void
+		{
+
+		}
 		
 		/**
 		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
@@ -962,6 +967,27 @@ package
 		}
 		
 		private function insertChildAt(child:XML,idx:int):void{
+			/*
+				When the [[Insert]] method of an XML object x is called with property name P and value V, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
+				5. Let n = 1
+				6. If Type(V) is XMLList, let n = V.[[Length]]
+				7. If n == 0, Return
+				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
+				9. Let x.[[Length]] = x.[[Length]] + n
+				10. If Type(V) is XMLList
+				  a. For j = 0 to V.[[Length-1]]
+				    i. V[j].[[Parent]] = x
+				    ii. x[i + j] = V[j]
+				11. Else
+				  a. Call the [[Replace]] method of x with arguments i and V
+				12. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return;
 			if(!child)
 				return;
 			var parent:XML = child.parent();
@@ -1218,10 +1244,10 @@ package
 					if(lastChild && lastChild.nodeKind() == "text")
 					{
 						child.setValue(child.text() + lastChild.text());
-						this.removeChildAt(i+1);
+						deleteChildAt(i+1);
 					}
 					if(!child.text())
-						this.removeChildAt(i);
+						deleteChildAt(i);
 				}
 				lastChild = child;
 			}
@@ -1381,6 +1407,7 @@ package
 				3. Else throw a TypeError exception
 			*/
 			//Do nothing for XML objects?
+			throw new Error("Cannot call delete on XML");
 		}
 
 		/**
@@ -1393,6 +1420,11 @@ package
 		public function removeNamespace(ns:*):XML
 		{
 			/*
+				Overview
+				The removeNamespace method removes the given namespace from the in scope namespaces of this object and all its descendents,
+				then returns a copy of this XML object. The removeNamespaces method will not remove a namespace from an object where it is referenced
+				by that object’s QName or the QNames of that object’s attributes.
+				Semantics
 				When the removeNamespace method is called on an XML object x with parameter namespace, the following steps are taken:
 				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
 				2. Let ns be a Namespace object created as if by calling the function Namespace( namespace )
@@ -1409,12 +1441,33 @@ package
 				  a. If p.[[Class]] = "element", call the removeNamespace method of p with argument ns
 				9. Return x
 			*/
+			var i:int;
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
 				return this;
 			if(!(ns is Namespace))
 				ns = new Namespace(ns);
-
-			return null;
+			if(ns == name().getNamespace(_namespaces))
+				return this;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(ns == _attributes[i].name().getNamespace(_namespaces))
+					return this;
+			}
+			
+			//
+			for(i=_namespaces.length-1;i>=0;i--)
+			{
+				if(_namespaces[i].uri == ns.uri && _namespaces[i].prefix == ns.prefix)
+					_namespaces.splice(i,1);
+				else if(ns.prefix == undefined && _namespaces[i].uri == ns.uri)
+					_namespaces.splice(i,1);
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					_children[i].removeNamespace(ns);
+			}
+			return this;
 		}
 		
 		/**
@@ -1425,7 +1478,39 @@ package
 		 * @return 
 		 * 
 		 */
-		public function replace(propertyName:Object, value:XML):XML
+		public function replace(propertyName:Object, value:*):XML
+		{
+			/*
+				Semantics
+				When the replace method is called on an XML object x with parameters propertyName and value, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
+				2. If Type(value) ∉ {XML, XMLList}, let c = ToString(value)
+				3. Else let c be the result of calling the [[DeepCopy]] method of value
+				4. If ToString(ToUint32(P)) == P
+				  a. Call the [[Replace]] method of x with arguments P and c and return x
+				5. Let n be a QName object created as if by calling the function QName(P)
+				6. Let i = undefined
+				7. For k = x.[[Length]]-1 downto 0
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri )))
+				    i. If (i is not undefined), call the [[DeleteByIndex]] method of x with argument ToString(i)
+				    ii. Let i = k
+				8. If i == undefined, return x
+				9. Call the [[Replace]] method of x with arguments ToString(i) and c
+				10. Return x			
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(value === null || value === undefined)
+				return this;
+			if((value is XML) || (value is XMLList))
+				value = value.copy();
+			else
+				value = value.toString();
+
+			return null;
+		}
+
+		private function replaceChild(idx:int,v:*):void
 		{
 			/*
 				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
@@ -1439,7 +1524,7 @@ package
 				  a. If V.[[Class]] is “element” and (V is x or an ancestor of x) throw an Error exception
 				  b. Let V.[[Parent]] = x
 				  c. If x has a property with name P
-				    i. Let x[P].[[Parent]] = null
+				  i. Let x[P].[[Parent]] = null
 				  d. Let x[P] = V
 				6. Else if Type(V) is XMLList
 				  a. Call the [[DeleteByIndex]] method of x with argument P
@@ -1450,9 +1535,44 @@ package
 				  c. If x has a property with name P
 				    i. Let x[P].[[Parent]] = null
 				  d. Let the value of property P of x be t
-				8. Return			
+				8. Return
 			*/
-			return null;
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(idx > _children.length)
+				idx = _children.length;
+			if(v is XML && v.nodeKind() != "attribute")
+			{
+				if(v.nodeKind() == "element" && (v==this || isAncestor(v)) )
+					throw new TypeError("cannot assign parent xml as child");
+				v.setParent(this);
+				if(_children[idx])
+					_children[idx].setParent(null);
+				_children[idx] = v;
+			}
+			else if(v is XMLList)
+			{
+				//6.
+				if(_children[idx])
+					_children[idx].setParent(null);
+
+			}
+			else
+			{
+				//7. attribute?
+			}
+		}
+
+		private function isAncestor(xml:XML):Boolean
+		{
+			var p:XML = parent();
+			while(p)
+			{
+				if(p == xml)
+					return true;
+				p = p.parent();
+			}
+			return false;
 		}
 
 		public function setAttribute(attr:*,value:String):void
@@ -1716,6 +1836,8 @@ package
 		
 		public function setParent(parent:XML):void
 		{
+			if(_parentXML)
+				_parentXML.removeChild(this);
 			_parentXML = parent;
 		}
 


[23/49] git commit: [flex-asjs] [refs/heads/develop] - Attempt at setting up XML project

Posted by ha...@apache.org.
Attempt at setting up XML project


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/41ac2e1e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/41ac2e1e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/41ac2e1e

Branch: refs/heads/develop
Commit: 41ac2e1e53e67da409b03a3782606f5919cb435e
Parents: 7f23ef3
Author: Harbs <ha...@in-tools.com>
Authored: Fri Feb 12 11:56:41 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Feb 12 11:56:41 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/build.xml               | 66 ++++++++-------
 .../main/resources/compile-as-to-js-config.xml  | 77 -----------------
 .../src/main/resources/compile-asjs-config.xml  | 15 ++--
 .../XML/src/main/resources/compile-config.xml   | 13 +--
 .../src/main/resources/compile-js-config.xml    | 87 --------------------
 5 files changed, 48 insertions(+), 210 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index 8c39d13..ec948ec 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -21,45 +21,48 @@
 
 <project name="XML" default="main" basedir=".">
     <property name="FLEXJS_HOME" location="../../.."/>
-
+    
     <property file="${FLEXJS_HOME}/env.properties"/>
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+    <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+    <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+    <property name="target.name" value="XML-${release.version}.swc" />
+    <property name="target.name.no.version" value="XML.swc" />
 
-    <target name="main" depends="clean,compile,test" description="Clean build of Core.swc">
-    </target>
-
-    <target name="all" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of XML.swc">
+    <target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc">
     </target>
-
+    
     <target name="test" unless="is.jenkins">
-        <ant dir="as/tests"/>
+        <!-- no tests yet
+        <ant dir="as/tests" />
+        -->
     </target>
-
+    
     <target name="test-js" unless="is.jenkins">
         <!-- no tests yet
          <ant dir="js/tests" />
          -->
     </target>
-
+    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="XML.swc"/>
+                <include name="${target.name.no.version}"/>
             </fileset>
         </delete>
         <delete failonerror="false">
-            <fileset dir="${basedir}/js/out">
+            <fileset dir="${basedir}/target">
                 <include name="**/**"/>
             </fileset>
         </delete>
     </target>
-
+    
     <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
     </path>
 
     <target name="compile" description="Compiles .as files into .swc">
@@ -67,7 +70,7 @@
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/js/out"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
 
         <!-- Load the <compc> task. We can't do this at the <project> level -->
         <!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -76,7 +79,7 @@
             Link in the classes (and their dependencies) for the MXML tags
             listed in this project's manifest.xml.
             Also link the additional classes (and their dependencies)
-            listed in CoreClasses.as,
+            listed in XMLClasses.as,
             because these aren't referenced by the manifest classes.
             Keep the standard metadata when compiling.
             Include the appropriate CSS files and assets in the SWC.
@@ -85,18 +88,19 @@
             into the file bundles.properties in this directory.
         -->
         <compc fork="true"
-               output="${FLEXJS_HOME}/frameworks/libs/XML.swc">
+            output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
-            <load-config filename="compile-config.xml" />
+            <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
     </target>
 
     <target name="compile-asjs">
-        <echo message="Cross-compiling XML"/>
+        <echo message="Cross-compiling ${target.name}"/>
         <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
         <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
             <jvmarg value="-Xmx384m" />
@@ -106,25 +110,26 @@
             <arg value="+flexlib=${FLEX_HOME}/frameworks" />
             <arg value="-js-output-type=FLEXJS" />
             <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
-            <arg value="-output=${basedir}/js/out" />
-            <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+            <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+            <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+            <arg value="-external-library-path+=${JS.SWC}" />
             <!-- this is not on external-library path otherwise goog.requires are not generated -->
-            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+            <arg value="-library-path+=${GCL.SWC}" />
             <arg value="-define=COMPILE::AS3,false" />
             <arg value="-define=COMPILE::JS,true" />
         </java>
     </target>
 
     <target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
-        <echo message="Compiling externs/XML.swc"/>
+        <echo message="Compiling target/externs/${target.name}"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
         <mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+        <mkdir dir="${basedir}/target/externs"/>
         
         <!-- Load the <compc> task. We can't do this at the <project> level -->
         <!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -142,23 +147,24 @@
          into the file bundles.properties in this directory.
          -->
         <compc fork="true"
-            output="${FLEXJS_HOME}/frameworks/externs/XML.swc">
+            output="${basedir}/target/externs/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
-            <load-config filename="compile-asjs-config.xml" />
+            <load-config filename="src/main/resources/compile-asjs-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+            <arg value="-external-library-path+=${JS.SWC}" />
             <!-- this is not on external-library path otherwise goog.requires are not generated -->
-            <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+            <arg value="-library-path+=${GCL.SWC}" />
             <arg value="-define=COMPILE::AS3,false" />
             <arg value="-define=COMPILE::JS,true" />
         </compc>
+        <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
     </target>
 
-    <target name="copy-js">
+    <target name="copy-js" >
         <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
-            <fileset dir="${basedir}/js/out">
-                <include name="**/**"/>
+            <fileset dir="${basedir}/target/generated-sources/flexjs">
+                <include name="**/**" />
             </fileset>
         </copy>
     </target>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
deleted file mode 100644
index e601b79..0000000
--- a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
-            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element>
-        </external-library-path>
-
-        <mxml>
-            <children-as-data>true</children-as-data>
-        </mxml>
-        <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-        <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-        <binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-            <name>Bindable</name>
-            <name>Managed</name>
-            <name>ChangeEvent</name>
-            <name>NonCommittingChangeEvent</name>
-            <name>Transient</name>
-        </keep-as3-metadata>
-
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <locale/>
-
-        <source-path>
-            <!--<path-element>as/src</path-element>-->
-        </source-path>
-
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-
-    <include-sources>
-        <path-element>as/src</path-element>
-    </include-sources>
-
-    <include-classes>
-        <class>CoreClasses</class>
-        <!--<class>CoreASJSClasses</class>-->
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-    </include-namespaces>
-        
-    <target-player>11.1</target-player>
-	
-
-</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
index 977c1d4..2c5abf4 100644
--- a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
@@ -42,6 +42,10 @@
         <locale/>
         
         <library-path>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+             if these swcs are on the external-library-path then their requires
+             will not be listed -->
+            <path-element>../../../../../externs/Core.swc</path-element>
         </library-path>
         
         <namespaces>
@@ -52,7 +56,7 @@
         </namespaces>
         
         <source-path>
-            <path-element>as/src</path-element>
+            <path-element>../flex</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
@@ -62,17 +66,14 @@
     </include-file>
 
     <include-sources>
+        <path-element>../flex</path-element>
     </include-sources>
     
-    <include-classes>
-        <class>CoreClasses</class>
-    </include-classes>
-    
     <include-namespaces>
         <uri>library://ns.apache.org/flexjs/basic</uri>
     </include-namespaces>
-    
-    <!--<target-player>${playerglobal.version}</target-player>-->
+        
+    <target-player>${playerglobal.version}</target-player>
 	
 
 </flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-config.xml b/frameworks/projects/XML/src/main/resources/compile-config.xml
index 7d862dc..9dde123 100644
--- a/frameworks/projects/XML/src/main/resources/compile-config.xml
+++ b/frameworks/projects/XML/src/main/resources/compile-config.xml
@@ -23,6 +23,7 @@
         
         <external-library-path>
             <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
         </external-library-path>
         
 		<mxml>
@@ -52,7 +53,7 @@
         </namespaces>
         
         <source-path>
-            <path-element>as/src</path-element>
+            <path-element>../flex</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
@@ -60,14 +61,8 @@
     
     <include-file>
         <name>js/out/*</name>
-        <path>js/out/*</path>
+        <path>../../../target/generated-sources/flexjs/*</path>
     </include-file>
-    <!--
-    <include-file>
-        <name>js/src/*</name>
-        <path>js/src/*</path>
-    </include-file>
-     -->
 
     <include-classes>
         <class>XMLClasses</class>
@@ -75,7 +70,7 @@
     
     <include-namespaces>
         <uri>library://ns.apache.org/flexjs/basic</uri>
-    </include-namespaces>  
+    </include-namespaces>
         
     <target-player>${playerglobal.version}</target-player>
 	

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-js-config.xml
deleted file mode 100644
index b37f6af..0000000
--- a/frameworks/projects/XML/src/main/resources/compile-js-config.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<flex-config>
-
-    <compiler>
-        <accessible>false</accessible>
-        
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-        </external-library-path>
-        
-		<mxml>
-			<children-as-data>true</children-as-data>
-		</mxml>
-		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
-		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
-		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
-
-        <keep-as3-metadata>
-          <name>Bindable</name>
-          <name>Managed</name>
-          <name>ChangeEvent</name>
-          <name>NonCommittingChangeEvent</name>
-          <name>Transient</name>
-        </keep-as3-metadata>
-	  
-        <locale/>
-        
-        <library-path/>
-
-        <namespaces>
-            <namespace>
-                <uri>library://ns.apache.org/flexjs/basic</uri>
-                <manifest>basic-manifest.xml</manifest>
-            </namespace>
-        </namespaces>
-        
-        <source-path>
-            <path-element>as/src</path-element>
-            <path-element>asjs/src</path-element>
-        </source-path>
-        
-        <warn-no-constructor>false</warn-no-constructor>
-    </compiler>
-    
-    <include-file>
-        <name>js/out/*</name>
-        <path>js/out/*</path>
-    </include-file>
-    <!--
-    <include-file>
-        <name>js/src/*</name>
-        <path>js/src/*</path>
-    </include-file>
-     -->
-    
-    <include-classes>
-        <class>XMLClasses</class>
-        <!-- leave out for now until we get Application to compile
-        <class>CoreASJSClasses</class>-->
-    </include-classes>
-    
-    <include-namespaces>
-        <uri>library://ns.apache.org/flexjs/basic</uri>
-		<uri>library://ns.apache.org/flexjs/svg</uri>
-    </include-namespaces>  
-        
-    <target-player>${playerglobal.version}</target-player>
-	
-
-</flex-config>


[18/49] git commit: [flex-asjs] [refs/heads/develop] - Changed XML to match the new folder structure

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
new file mode 100644
index 0000000..e34b765
--- /dev/null
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -0,0 +1,657 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+COMPILE::JS
+{
+package
+{
+	public class XMLList
+	{
+		public function XMLList()
+		{
+			addIndex(0);
+		}
+		private var _targetObject:XML;
+		public function set targetObject(value:XML):void
+		{
+			_targetObject = value;
+		}
+		private var _targetProperty:QName;
+		public function set targetProperty(value:QName):void
+		{
+			_targetProperty = value;
+		}
+		private var _xmlArray:Array = [];
+		/*
+			9.2.1.2 [[Put]] (P, V)
+			Overview
+			The XMLList type overrides the internal [[Put]] method defined by the Object type. The XMLList [[Put]] method is used to modify or replace an XML object within the XMLList and the context of its parent. In addition, when the XMLList contains a single property with an XML object, the [[Put]] method is used to modify, replace, and insert properties or XML attributes of that value by name. The input argument P identifies which portion of the XMLList and associated XML objects will be affected and may be a numeric property name, an unqualified name for an XML attribute (distinguished from XML valued property names by a leading “@” symbol) or set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes or the properties wildcard “*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes
  in no namespace. The input argument V may be a value of type XML, XMLList or any value that can be converted to a String with ToString().
+			NOTE Unlike the internal Object [[Put]] method, the internal XMLList [[Put]] method is never used for modifying the set of methods associated with XMLList objects.
+			Semantics
+			When the [[Put]] method of an XMLList object x is called with property name P and value V, the following steps are taken:
+			1. Let i = ToUint32(P)
+			2. If ToString(i) == P
+			  a. If x.[[TargetObject]] is not null
+			    i. Let r be the result of calling the [[ResolveValue]] method of x.[[TargetObject]]
+			    ii. If r == null, return
+			  b. Else let r = null
+			  c. If i is greater than or equal to x.[[Length]]
+			    i. If Type(r) is XMLList
+			      1. If r.[[Length]] is not equal to 1, return
+			      2. Else let r = r[0]
+			    ii. If r.[[Class]] is not equal to "element", return
+			    iii. Create a new XML object y with y.[[Parent]] = r, y.[[Name]] = x.[[TargetProperty]], y.[[Attributes]] = {}, y.[[Length]] = 0
+			    iv. If Type(x.[[TargetProperty]]) is AttributeName
+			      1. Let attributeExists be the result of calling the [[Get]] method of r with argument y.[[Name]]
+			      2. If (attributeExists.[[Length]] > 0), return
+			      3. Let y.[[Class]] = "attribute"
+			    v. Else if x.[[TargetProperty]] == null or x.[[TargetProperty]].localName == "*"
+			      1. Let y.[[Name]] = null
+			      2. Let y.[[Class]] = "text"
+			    vi. Else let y.[[Class]] = "element"
+			    vii. Let i = x.[[Length]]
+			    viii. If (y.[[Class]] is not equal to "attribute")
+			      1. If r is not null
+			        a. If (i > 0)
+			          i. Let j = 0
+			          ii. While (j < r.[[Length]]-1) and (r[j] is not the same object as x[i-1])
+			            1. Let j = j + 1
+			        b. Else
+			          i. Let j = r.[[Length]]-1
+			        c. Call the [[Insert]] method of r with arguments ToString(j+1) and y
+			      2. If Type(V) is XML, let y.[[Name]] = V.[[Name]]
+			      3. Else if Type(V) is XMLList, let y.[[Name]] = V.[[TargetProperty]]
+			    ix. Call the [[Append]] method of x with argument y
+			  d. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"}), let V = ToString(V)
+			  e. If x[i].[[Class]] == "attribute"
+			    i. Let z = ToAttributeName(x[i].[[Name]])
+			    ii. Call the [[Put]] method of x[i].[[Parent]] with arguments z and V
+			    iii. Let attr be the result of calling [[Get]] on x[i].[[Parent]] with argument z
+			    iv. Let x[i] = attr[0]
+			  f. Else if Type(V) is XMLList
+			    i. Create a shallow copy c of V
+			    ii. Let parent = x[i].[[Parent]]
+			    iii. If parent is not null
+			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
+			      2. Call the [[Replace]] method of parent with arguments q and c
+			      3. For j = 0 to c.[[Length]]-1
+			        a. Let c[j] = parent[ToUint32(q)+j]
+			    iv. If c.[[Length]] == 0
+			      1. For j = i + 1 to x.[[Length]] – 1, rename property j of x to ToString(j-1)
+			    v. Else
+			      1. For j = x.[[Length]]-1 downto i + 1, rename property j of x to ToString(j + c.[[Length]] - 1)
+			    vi. For j = 0 to c.[[Length]]-1, let x[i + j] = c[j]
+			    vii. Let x.[[Length]] = x.[[Length]] + c.[[Length]] - 1
+			  g. Else if (Type(V) is XML) or (x[i].[[Class]] ∈ {"text", "comment", "processing-instruction"})
+			    i. Let parent = x[i].[[Parent]]
+			    ii. If parent is not null
+			      1. Let q be the property of parent, such that parent[q] is the same object as x[i]
+			      2. Call the [[Replace]] method of parent with arguments q and V
+			      3. Let V = parent[q]
+			    iii. If Type(V) is String
+			      1. Create a new XML object t with t.[[Class]] = "text", t.[[Parent]] = x and t.[[Value]] = V
+			      2. Let x[i] = t
+			    iv. Else
+			      1. Let x[i] = V
+			  h. Else
+			    i. Call the [[Put]] method of x[i] with arguments "*" and V
+			3. Else if x.[[Length]] is less than or equal to 1
+			  a. If x.[[Length]] == 0
+			    i. Let r be the result of calling the [[ResolveValue]] method of x
+			    ii. If (r == null) or (r.[[Length]] is not equal to 1), return
+			    iii. Call the [[Append]] method of x with argument r
+			  b. Call the [[Put]] method of x[0] with arguments P and V
+			4. Return
+		*/
+		private function addIndex(idx:int):void
+		{
+			var idxStr:String = "" + idx;
+			Object.defineProperty(this,idxStr,
+				{
+					get: function() { return _xmlArray[idx]; },
+					set: function(newValue:*) {
+						var i:int;
+						if(newValue is XML)
+						{
+							_xmlArray[idx] = newValue;
+						}
+						else if(newValue is XMLList)
+						{
+							var len:int = newValue.length();
+							for(i=0;i<len;i++)
+							{
+								// replace the first one and add each additonal one.
+								if(i==0)
+									_xmlArray[idx] = newValue[i];
+								else
+									_xmlArray.splice(idx+i,0,newValue[i]);
+							}
+						}
+						// add indexes as necessary
+						while(idx++ < _xmlArray.length)
+						{
+							if(!this.hasOwnProperty(idx))
+								addIndex(idx);
+						}
+					},
+					enumerable: true,
+					configurable: true
+				}
+			);
+		}
+		
+		public function appendChild(child:XML):void
+		{
+			addIndex(_xmlArray.length);
+			_xmlArray[_xmlArray.length] = child;
+		}
+		
+		/**
+		 * Calls the attribute() method of each XML object and returns an XMLList object of the results.
+		 * 
+		 * @param attributeName
+		 * @return 
+		 * 
+		 */
+		public function attribute(attributeName:*):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].attribute(attributeName);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the attributes() method of each XML object and returns an XMLList object of attributes for each XML object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function attributes():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].attributes();
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the child() method of each XML object and returns an XMLList object that contains the results in order.
+		 * 
+		 * @param propertyName
+		 * @return 
+		 * 
+		 */
+		public function child(propertyName:Object):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].child(propertyName);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		/**
+		 * Calls the children() method of each XML object and returns an XMLList object that contains the results.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function children():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].children();
+				if(list.length)
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		/**
+		 * Calls the comments() method of each XML object and returns an XMLList of comments.
+		 * @return 
+		 * 
+		 */
+		public function comments():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].comments();
+				if(list.length)
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		public function concat(list:*):XMLList
+		{
+			if(list is XML)
+			{
+				var newList:XMLList = new XMLList();
+				newList.appendChild(list);
+				list = newList;
+			}
+			if(!(list is XMLList))
+				throw new TypeError("invalid type");
+
+			var retVal:XMLList = this.copy();
+			var item:XML;
+			for each(item in list)
+				retVal.appendChild(item);
+				
+			return retVal;
+		}
+		
+		/**
+		 * Checks whether the XMLList object contains an XML object that is equal to the given value parameter.
+		 * 
+		 * @param value
+		 * @return 
+		 * 
+		 */
+		public function contains(value:XML):Boolean
+		{
+			
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				if(_xmlArray[i].contains(value))
+					return true;
+			}
+			return false;
+		}
+		
+		/**
+		 * Returns a copy of the given XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function copy():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+				retVal[i] = _xmlArray[i].copy();
+			
+			return retVal;
+		}
+		
+		/**
+		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function descendants(name:Object = *):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].descendants(name);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+		
+		/**
+		 * Calls the elements() method of each XML object.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function elements(name:Object = *):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].elements(name);
+				if(list.length())
+					retVal = retVal.concat(list);
+			}
+			return retVal;
+		}
+
+		public function equals(list:*):Boolean
+		{
+			/*
+				Overview
+				The XMLList type adds the internal [[Equals]] method to the internal properties defined by the Object type.
+				The XMLList [[Equals]] method is used to compare this XMLList object for content equality 
+				with another XMLList object V or determine whether this XMLList object contains a single XML object that compares equal to V. 
+				The [[Equals]] operator returns true if this XMLList object is considered equal to V 
+				or contains only one XML object that is considered equal to V. Otherwise, it returns false. 
+				Empty XMLList objects are considered equal to undefined. 
+				The input argument V may be a value of type XMLList, XML, undefined or any value that can be converted to a String with ToString().
+				
+				Semantics
+				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
+				1. If V == undefined and x.[[Length]] == 0, return true
+				2. If Type(V) is XMLList
+				  a. If x.[[Length]] is not equal to V.[[Length]], return false
+				  b. For i = 0 to x.[[Length]]
+				    i. If the result of the comparison x[i] == V[i] is false, return false
+				  c. Return true
+				3. Else if x.[[Length]] == 1
+				  a. Return the result of the comparison x[0] == V
+				4. Return false
+			*/
+			return false;
+		}
+		
+		public function hasComplexContent():Boolean
+		{
+			//what to do with multiple nodes? If anything is complex, we return true.
+			if(_xmlArray.length == 0)
+				return false;
+			var len:int = _xmlArray.length;
+			for (var i:int=1;i<len;i++)
+			{
+				if(_xmlArray[i].hasComplexContent())
+					return true;
+			}
+			return false;
+		}
+
+		public function hasOwnProperty(propertyName:*):Boolean
+		{
+			/*
+				Overview
+				The XMLList type overrides the internal [[HasProperty]] method defined by the Object type. The XMLList [[HasProperty]] method is used to determine whether this XMLList object contains an XML element or attribute by its ordinal position or whether any of the objects contained in this XMLList object contains an XML element or attribute by its name. The input argument P may be a numeric property name, an unqualified name for an XML attribute (distinguished from the name of XML elements by a leading “@” symbol) or a set of XML elements, a QName for a set of XML elements, an AttributeName for a set of XML attributes, the properties wildcard “*” or the attributes wildcard “@*”. When the input argument P is an unqualified XML element name, it identifies XML elements in the default namespace. When the input argument P is an unqualified XML attribute name, it identifies XML attributes in no namespace.
+				Semantics
+				When the [[HasProperty]] method of an XMLList object x is called with property name P, the following steps are taken:
+				1. If ToString(ToUint32(P)) == P
+				a. Return (ToUint32(P) < x.[[Length]])
+				2. For i = 0 to x.[[Length]]-1
+				a. If x[i].[[Class]] == "element" and the result of calling the [[HasProperty]] method of x[i] with argument P == true, return true
+				3. Return false			
+			*/
+			if(parseInt(propertyName,10).toString() == propertyName)
+			{
+				return parseInt(propertyName,10) < _xmlArray.length;
+			}
+			var len:int = _xmlArray.length;
+			for (var i:int=1;i<len;i++)
+			{
+				if(_xmlArray[i].hasOwnProperty(propertyName))
+					return true;
+			}
+			return false;
+		}
+		
+		/**
+		 * Checks whether the XMLList object contains simple content.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function hasSimpleContent():Boolean
+		{
+			//what to do with multiple nodes? If anything is complex, we return false.
+			if(_xmlArray.length == 0)
+				return true;
+			var len:int = _xmlArray.length;
+			for (var i:int=1;i<len;i++)
+			{
+				if(_xmlArray[i].hasComplexContent())
+					return false;
+			}
+			return true;
+		}
+		
+		/**
+		 * Returns the number of items in the XMLList.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function length():int
+		{
+			return _xmlArray.length;
+		}
+		
+		/**
+		 * Merges adjacent text nodes and eliminates empty text nodes for each of the following:
+		 * all text nodes in the XMLList, all the XML objects contained in the XMLList, and the descendants of all the XML objects in the XMLList.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function normalize():XMLList
+		{
+			//TODO: Figure out what to do here.
+		}
+		
+		/**
+		 * Returns the parent of the XMLList object if all items in the XMLList object have the same parent.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function parent():Object
+		{
+			if(_xmlArray.length == 0)
+				return undefined;
+			var retVal = this[0].parent;
+			var len:int = _xmlArray.length;
+			for (var i:int=1;i<len;i++)
+			{
+				if(_xmlArray[i].parent != retVal)
+					return undefined;
+			}
+			return retVal;
+		}
+		
+		/**
+		 * If a name parameter is provided, lists all the children of the XMLList object that contain processing instructions with that name.
+		 * 
+		 * @param name
+		 * @return 
+		 * 
+		 */
+		public function processingInstructions(name:String = "*"):XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			if(!name)
+				return retVal;
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				if(_xmlArray[i].nodeKind() != "processing-instruction")
+					continue;
+				if(name == "*")
+				{
+					retVal.appendChild(_xmlArray[i]);
+				}
+				else if(name == _xmlArray[i].localName)
+					retVal.appendChild(_xmlArray[i]);
+			}
+			return retVal;
+		}
+
+		public function removeChild(child:*):void
+		{
+			var i:int;
+			var len:int;
+			if(child is XMLList)
+			{
+				len = child.length();
+				for(i=0;i<len;i++)
+				{
+					removeChild(child[i]);
+				}
+			}
+			else if(child is XML)
+			{
+				len = _xmlArray.length-1;
+				for(i=len; i >= 0; i--)
+				{
+					if(_xmlArray[i] == child)
+					{
+						_xmlArray.splice(i,1);
+					}
+				}
+			}
+		}
+
+		public function removeChildAt(idx:int):void
+		{
+			if(idx >= 0 && idx < _xmlArray.length)
+				_xmlArray.splice(idx,1);
+		}
+
+		private var _targetObject:*;
+		/**
+		 * @private
+		 * 
+		 * Internally used to store an associated XML or XMLList object which will be effected by operations
+		 */
+		public function set targetObject(value:*):void
+		{
+			_targetObject = value;
+		}
+		public function get targetObject():*
+		{
+			return _targetObject;
+		}
+
+		private var _targetProperty:*;
+		/**
+		 * @private
+		 * 
+		 * The name of a property that may be created in the targetObject when objects are added to an empty XMLList.
+		 */
+		public function set targetProperty(value:*):void
+		{
+			_targetProperty = value;
+		}
+		public function get targetProperty():*
+		{
+			return _targetProperty;
+		}
+		
+		/**
+		 * Calls the text() method of each XML object and returns an XMLList object that contains the results.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function text():XMLList
+		{
+			var retVal:XMLList = new XMLList();
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var list:XMLList = _xmlArray[i].text();
+				if(list.length())
+					retVal.concat(list);
+			}
+			return retVal;
+		}
+
+		/**
+		 * Returns the string representation of this object, formatted according to locale-specific conventions.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toLocaleString():String
+		{
+			var retVal:Array = [];
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = _xmlArray[i].toLocaleString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns a string representation of all the XML objects in an XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toString():String
+		{
+			var retVal:Array = [];
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = _xmlArray[i].toString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns a string representation of all the XML objects in an XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function toXMLString():String
+		{
+			var retVal:Array = [];
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+			{
+				var str:String = _xmlArray[i].toXMLString();
+				if(str)
+					retVal.push(str);
+			}
+			return retVal.join("");
+		}
+		
+		/**
+		 * Returns the XMLList object.
+		 * 
+		 * @return 
+		 * 
+		 */
+		public function valueOf():XMLList
+		{
+			return this;
+		}
+	}
+}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/basic-manifest.xml b/frameworks/projects/XML/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..cd0f5b4
--- /dev/null
+++ b/frameworks/projects/XML/src/main/resources/basic-manifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
new file mode 100644
index 0000000..e601b79
--- /dev/null
+++ b/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml
@@ -0,0 +1,77 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
+            <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element>
+        </external-library-path>
+
+        <mxml>
+            <children-as-data>true</children-as-data>
+        </mxml>
+        <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+        <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+        <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+            <name>Bindable</name>
+            <name>Managed</name>
+            <name>ChangeEvent</name>
+            <name>NonCommittingChangeEvent</name>
+            <name>Transient</name>
+        </keep-as3-metadata>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <locale/>
+
+        <source-path>
+            <!--<path-element>as/src</path-element>-->
+        </source-path>
+
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+
+    <include-sources>
+        <path-element>as/src</path-element>
+    </include-sources>
+
+    <include-classes>
+        <class>CoreClasses</class>
+        <!--<class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+        
+    <target-player>11.1</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..977c1d4
--- /dev/null
+++ b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+    </include-file>
+
+    <include-sources>
+    </include-sources>
+    
+    <include-classes>
+        <class>CoreClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+    
+    <!--<target-player>${playerglobal.version}</target-player>-->
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-config.xml b/frameworks/projects/XML/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..7d862dc
--- /dev/null
+++ b/frameworks/projects/XML/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <!--
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+     -->
+
+    <include-classes>
+        <class>XMLClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a487152a/frameworks/projects/XML/src/main/resources/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/resources/compile-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-js-config.xml
new file mode 100644
index 0000000..b37f6af
--- /dev/null
+++ b/frameworks/projects/XML/src/main/resources/compile-js-config.xml
@@ -0,0 +1,87 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+            <path-element>asjs/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+    <!--
+    <include-file>
+        <name>js/src/*</name>
+        <path>js/src/*</path>
+    </include-file>
+     -->
+    
+    <include-classes>
+        <class>XMLClasses</class>
+        <!-- leave out for now until we get Application to compile
+        <class>CoreASJSClasses</class>-->
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+		<uri>library://ns.apache.org/flexjs/svg</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>


[30/49] git commit: [flex-asjs] [refs/heads/develop] - Added Namespace to XMLClasses

Posted by ha...@apache.org.
Added Namespace to XMLClasses


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7edb7e5b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7edb7e5b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7edb7e5b

Branch: refs/heads/develop
Commit: 7edb7e5bbb401d42d9819bb4d2ea61858666be65
Parents: 8cd5b38
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 16 23:07:17 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 16 23:07:17 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XMLClasses.as | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7edb7e5b/frameworks/projects/XML/src/main/flex/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLClasses.as b/frameworks/projects/XML/src/main/flex/XMLClasses.as
index 044e257..c4e4f1d 100644
--- a/frameworks/projects/XML/src/main/flex/XMLClasses.as
+++ b/frameworks/projects/XML/src/main/flex/XMLClasses.as
@@ -31,6 +31,7 @@ internal class XMLClasses
 		import XML; XML;
 		import XMLList; XMLList;
 		import QName; QName;
+		import Namespace; Namespace;
 	}
 }
 }
\ No newline at end of file


[36/49] git commit: [flex-asjs] [refs/heads/develop] - Starting on XML tests

Posted by ha...@apache.org.
Starting on XML tests


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dbcc3b11
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dbcc3b11
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dbcc3b11

Branch: refs/heads/develop
Commit: dbcc3b118507769026dfda03ca5689993669272e
Parents: 1ffb32f
Author: Harbs <ha...@in-tools.com>
Authored: Wed Apr 6 18:23:33 2016 -0700
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Apr 6 18:23:33 2016 -0700

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as    |   4 +
 manualtests/XMLTest/build.xml                   |  72 +++++++++++
 manualtests/XMLTest/src/MyInitialView.mxml      |  72 +++++++++++
 manualtests/XMLTest/src/README.txt              |  45 +++++++
 manualtests/XMLTest/src/ReflectionTest.mxml     |  40 ++++++
 .../XMLTest/src/controllers/MyController.as     |  52 ++++++++
 manualtests/XMLTest/src/models/MyModel.as       | 125 +++++++++++++++++++
 7 files changed, 410 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 26d185b..27a7094 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -734,6 +734,8 @@ package
 				5. Return list
 			*/
 			var i:int;
+			if(!name)
+				name = "*";
 			name = toXMLName(name);
 			var list:XMLList = new XMLList();
 			if(name.isAttribute)
@@ -766,6 +768,8 @@ package
 		 */
 		public function elements(name:Object = "*"):XMLList
 		{
+			if(!name)
+				name = "*";
 			name = toXMLName(name);
 			var i:int;
 			var list:XMLList = new XMLList();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/build.xml b/manualtests/XMLTest/build.xml
new file mode 100644
index 0000000..6370e2d
--- /dev/null
+++ b/manualtests/XMLTest/build.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="xmltest" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../.."/>
+    <property name="example" value="ReflectionTest" />
+    
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <!-- use this to add keep metadata option -->
+    <property name="theme_arg" value="-keep-as3-metadata+=Event" />
+    <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+    type="file"
+    property="FALCON_HOME"
+    value="${env.FALCON_HOME}"/>
+    
+    <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar"
+    type="file"
+    property="FALCON_HOME"
+    value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/>
+    
+    <available file="${env.FALCONJX_HOME}/lib/jsc.jar"
+    type="file"
+    property="FALCONJX_HOME"
+    value="${env.FALCONJX_HOME}"/>
+    
+    <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar"
+    type="file"
+    property="FALCONJX_HOME"
+    value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/>
+    
+    <available file="${env.GOOG_HOME}/closure/goog/base.js"
+    type="file"
+    property="GOOG_HOME"
+    value="${env.GOOG_HOME}"/>
+    
+    <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js"
+    type="file"
+    property="GOOG_HOME"
+    value="${FLEXJS_HOME}/js/lib/google/closure-library"/>
+    
+    <include file="${basedir}/../build_example.xml" />
+
+    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of FlexJSUI.swc">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
new file mode 100644
index 0000000..0f9eab0
--- /dev/null
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:js="library://ns.apache.org/flexjs/basic"
+				xmlns:local="*" 
+				xmlns:models="models.*" 
+				xmlns:acc="org.apache.flex.html.accessories.*">
+	
+	<fx:Style>
+		.title {
+			font-size: 14pt;
+			font-weight: bold;
+		}
+
+	</fx:Style>
+	
+	<fx:Script>
+		<![CDATA[			
+			import org.apache.flex.core.IPopUpHost;
+			import org.apache.flex.events.Event;
+			import org.apache.flex.utils.UIUtils;
+						
+            import org.apache.flex.reflection.describeType;
+            import org.apache.flex.reflection.MetaDataArgDefinition;
+            import org.apache.flex.reflection.MetaDataDefinition;
+            import org.apache.flex.reflection.MethodDefinition;
+            import org.apache.flex.reflection.TypeDefinition;
+            
+            [Event(name="foo", type="org.apache.flex.events.Event")]
+            public function runTest():void
+            {
+                var metadata:Array;
+                var mtd:MetaDataDefinition;
+                var mtdarg:MetaDataArgDefinition;
+                var args:Array;
+                var j:int;
+                var m:int;
+                var xml1:XML = <foo baz="true"/>;
+                trace(xmll1);
+                trace(xml1.baz);
+
+            }
+		]]>
+	</fx:Script>
+	
+	<js:Container id="cont" width="600" height="700" x="50" y="50">
+		<js:beads>
+			<js:VerticalLayout />
+		</js:beads>
+		
+		<js:Label text="XML Test" className="title" />
+		<js:TextButton text="Test" click="runTest()" />
+	</js:Container>
+	
+</js:ViewBase>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/src/README.txt
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/README.txt b/manualtests/XMLTest/src/README.txt
new file mode 100644
index 0000000..f38df7f
--- /dev/null
+++ b/manualtests/XMLTest/src/README.txt
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+DESCRIPTION
+
+The FormExample application demonstrates several FlexJS components and how they
+can be aligned in a column, much like you would see in a form. 
+
+This Flex application may be run as a Flash SWF or cross-compiled (using Falcon JX)
+into JavaScript and HTML and run without Flash.
+
+The components are placed into a Container with a VerticalColumnLayout bead. This bead
+examines each of the children in the Container and aligns them in two columns.
+
+COMPONENTS and BEADS
+
+- Container
+- DateField
+- Label
+- TextInput
+
+- NonVirtualVerticalLayout
+- NumericOnlyTextInputBead
+- VerticalColumnLayout
+
+NOTES
+
+The cross-compilation to JavaScript often results in non-fatal warnings. Some of these warnings
+should be addressed in future releases of the Falcon JX compiler.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/src/ReflectionTest.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/ReflectionTest.mxml b/manualtests/XMLTest/src/ReflectionTest.mxml
new file mode 100644
index 0000000..27e97b5
--- /dev/null
+++ b/manualtests/XMLTest/src/ReflectionTest.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+				   xmlns:local="*"
+				   xmlns:models="models.*"
+                   xmlns:controllers="controllers.*"
+				   xmlns:js="library://ns.apache.org/flexjs/basic" 
+				   >
+	
+	<js:valuesImpl>
+		<js:SimpleCSSValuesImpl />
+	</js:valuesImpl>
+    <js:controller>
+        <controllers:MyController />
+    </js:controller>
+    <js:model>
+        <models:MyModel />
+    </js:model>
+	<js:initialView>
+		<local:MyInitialView />
+	</js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/src/controllers/MyController.as
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/controllers/MyController.as b/manualtests/XMLTest/src/controllers/MyController.as
new file mode 100644
index 0000000..81eb963
--- /dev/null
+++ b/manualtests/XMLTest/src/controllers/MyController.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package controllers
+{
+	import org.apache.flex.events.Event;
+	
+	import org.apache.flex.core.Application;
+	import org.apache.flex.core.IDocument;
+    
+    import models.MyModel;
+    	
+	public class MyController implements IDocument
+	{
+		public function MyController(app:Application = null)
+		{
+			if (app)
+			{
+				this.app = app as ReflectionTest;
+				app.addEventListener("viewChanged", viewChangeHandler);
+			}
+		}
+		
+		private var app:ReflectionTest;
+		
+		private function viewChangeHandler(event:Event):void
+		{
+		}
+		        
+		public function setDocument(document:Object, id:String = null):void
+		{
+			this.app = document as ReflectionTest;
+			app.addEventListener("viewChanged", viewChangeHandler);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dbcc3b11/manualtests/XMLTest/src/models/MyModel.as
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/models/MyModel.as b/manualtests/XMLTest/src/models/MyModel.as
new file mode 100644
index 0000000..5a16d02
--- /dev/null
+++ b/manualtests/XMLTest/src/models/MyModel.as
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package models
+{
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+	
+	public class MyModel extends EventDispatcher
+	{
+		public function MyModel()
+		{
+		}
+		
+		private var _requestedField:String = "Ask";
+		
+		[Bindable("requestedFieldChanged")]
+		public function get requestedField():String
+		{
+			return _requestedField;
+		}
+		
+		public function set requestedField(value:String):void
+		{
+			if (value != _requestedField)
+			{
+				_requestedField = value;
+				dispatchEvent(new Event("requestedFieldChanged"));
+				if (_responseData)
+					dispatchEvent(new Event("responseTextChanged"));
+			}
+		}
+		
+		[Bindable("responseTextChanged")]
+		public function get responseText():String
+		{
+			if (_responseData == null)
+				return "";
+			if (_responseData == "No Data")
+				return _responseData as String;
+			var s:String = _responseData[_requestedField];
+			if (s == null)
+			{
+				if (_requestedField == "Ask")
+					s = _responseData["Bid"];
+			}
+			return s;
+		}
+		
+		private var _responseData:Object;
+		
+		[Bindable("responseDataChanged")]
+		public function get responseData():Object
+		{
+			return _responseData;
+		}
+		
+		public function set responseData(value:Object):void
+		{
+			if (value != _responseData)
+			{
+				_responseData = value;
+				_allData = "";
+				dispatchEvent(new Event("responseDataChanged"));
+				dispatchEvent(new Event("responseTextChanged"));
+			}
+		}
+		
+		private var _allData:String = "";
+		
+		[Bindable("responseDataChanged")]
+		public function get allData():String
+		{
+			if (_allData == "" && _responseData != null)
+			{
+				for (var p:String in _responseData)
+				{
+					_allData += p + ": " + _responseData[p] + "\n";
+				}
+			}
+			return _allData;
+		}
+		
+		
+		private var _stockSymbol:String;
+		
+		[Bindable("stockSymbolChanged")]
+		public function get stockSymbol():String
+		{
+			return _stockSymbol;
+		}
+		
+		public function set stockSymbol(value:String):void
+		{
+			if (value != _stockSymbol)
+			{
+				_stockSymbol = value;
+				dispatchEvent(new Event("stockSymbolChanged"));
+			}
+		}
+
+        private var _strings:Array = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
+        [Bindable("__NoChangeEvent__")]
+        public function get strings():Array
+        {
+            return _strings;
+        }
+
+	}
+}
\ No newline at end of file


[29/49] git commit: [flex-asjs] [refs/heads/develop] - More fixes for xml compile errors

Posted by ha...@apache.org.
More fixes for xml compile errors


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8cd5b382
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8cd5b382
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8cd5b382

Branch: refs/heads/develop
Commit: 8cd5b382852e4f2f9dc4b827225500fc5f0dda91
Parents: da234a4
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 16 22:21:40 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 16 22:21:40 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/build.xml               |   2 +
 frameworks/projects/XML/src/main/flex/XML.as    | 153 ++++++++++---------
 .../projects/XML/src/main/flex/XMLClasses.as    |   1 +
 3 files changed, 85 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8cd5b382/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index 4d3f14e..dd46000 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -206,6 +206,8 @@
         <fail message="FALCONJX_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler.jx folder in flex-falcon repo or the js folder if it has been converted into an FB-compatible SDK"
         unless="FALCONJX_HOME"/>
     </target>
+    <target name="asjs" depends="check-falcon-home,check-falconjx-home,more-props,compile-asjs">
+    </target>
 
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8cd5b382/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 4ba59a0..49f2fd1 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -342,8 +342,7 @@ package
 		private var _children:Array;
 		private var _attributes:Array;
 		private var _processingInstructions:Array;
-		private var _parentXML:XML;
-		private var _name:*;
+		private var _parent:XML;
 		private var _value:String;
 		private var _version:String;
 		private var _encoding:String;
@@ -406,7 +405,7 @@ package
 			*/
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
 				return this;
-			if(ns.prefix === undefined)
+			if(ns.prefix === null)
 				return this;
 			if(ns.prefix == "" && name().uri == "")
 				return this;
@@ -426,12 +425,12 @@ package
 				_namespaces.push(ns);
 
 			if(ns.prefix == name().prefix)
-				name().prefix = undefined;
+				name().prefix = null;
 
 			for(i=0;i<_attributes.length;i++)
 			{
 				if(_attributes[i].name().prefix == ns.prefix)
-					_attributes[i].name().prefix = undefined;
+					_attributes[i].name().prefix = null;
 			}
 			return this;
 		}
@@ -489,8 +488,8 @@ package
 			var list:XMLList = new XMLList();
 			for(i=0;i<_attributes.length;i++)
 			{
-				if(_atributes[i].name().matches(attributeName))
-					list.appendChild(_atributes[i]);
+				if(_attributes[i].name().matches(attributeName))
+					list.appendChild(_attributes[i]);
 			}
 			list.targetObject = this;
 			list.targetProperty = attributeName;
@@ -505,9 +504,10 @@ package
 		 */
 		public function attributes():XMLList
 		{
+			var i:int;
 			var list:XMLList = new XMLList();
 			for(i=0;i<_attributes.length;i++)
-				list.appendChild(_atributes[i]);
+				list.appendChild(_attributes[i]);
 
 			list.targetObject = this;
 			return list;
@@ -545,7 +545,7 @@ package
 			if(parseInt(name,10).toString() == propertyName)
 			{
 				if(propertyName != "0")
-					return undefined;
+					return null;
 				list.appendChild(this);
 				list.targetObject = this;
 				return list;
@@ -594,6 +594,7 @@ package
 		 */
 		public function children():XMLList
 		{
+			var i:int;
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
 				list.append(_children[i]);
@@ -614,7 +615,7 @@ package
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
 			{
-				if(_children[i].nodeKind() == "comment" && propertyName.matches(_children[i].name()))
+				if(_children[i].nodeKind() == "comment")
 					list.append(_children[i]);
 			}
 			list.targetObject = this;
@@ -760,6 +761,7 @@ package
 		public function elements(name:Object = "*"):XMLList
 		{
 			name = toXMLName(name);
+			var i:int;
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
 			{
@@ -863,9 +865,9 @@ package
 			namespaces = namespaces.slice();
 			var nsIdx:int;
 			var pIdx:int;
-			if(_parentXML)
+			if(_parent)
 			{
-				var parentNS:Array = _parentXML.inScopeNamespaces();
+				var parentNS:Array = _parent.inScopeNamespaces();
 				var len:int = parentNS.length;
 				for(pIdx=0;pIdx<len;pIdx++)
 				{
@@ -883,7 +885,7 @@ package
 						namespaces.push(curNS);
 
 				}
-				namespaces = _parentXML.getAncestorNamespaces(namespaces);
+				namespaces = _parent.getAncestorNamespaces(namespaces);
 			}
 			return namespaces;
 		}
@@ -936,7 +938,7 @@ package
 			if(_nodeKind == "attribute" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "text")
 				return false;
 			var i:int;
-			for(i=0i<_children.length;i++)
+			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "element")
 					return true;
@@ -998,7 +1000,7 @@ package
 			if(_nodeKind == "comment" || _nodeKind == "processing-instruction")
 				return false;
 			var i:int;
-			for(i=0i<_children.length;i++)
+			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "element")
 					return false;
@@ -1055,7 +1057,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function insertChildAfter(child1:Object, child2:Object):XML
+		public function insertChildAfter(child1:XML, child2:XML):XML
 		{
 			/*
 				When the insertChildAfter method is called on an XML object x with parameters child1 and child2, the following steps are taken:
@@ -1091,7 +1093,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function insertChildBefore(child1:Object, child2:Object):XML
+		public function insertChildBefore(child1:XML, child2:XML):XML
 		{
 			/*
 				When the insertChildBefore method is called on an XML object x with parameters child1 and child2, the following steps are taken:
@@ -1194,7 +1196,7 @@ package
 				}
 				if(_parent)
 					return _parent.namespace(prefix);
-				return undefined;
+				return null;
 			}
 			//no prefix. get the namespace of our object
 			if(_nodeKind == "text" || _nodeKind ==  "comment" || _nodeKind ==  "processing-instruction")
@@ -1231,6 +1233,7 @@ package
 				  b. Let i = i + 1
 				10. Return a
 			*/
+			var i:int;
 			var retVal:Array = [];
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
 				return retVal;
@@ -1374,6 +1377,7 @@ package
 				6. Let x.[[Length]] = x.[[Length]] - dp
 				7. Return true.
 			*/
+			var i:int;
 			var removed:XML;
 			if(!child)
 				return false;
@@ -1407,7 +1411,7 @@ package
 		{
 			var i:int;
 			name = toXMLName(name);
-			child = null;
+			var child:XML = null;
 			var removedItem:Boolean = false;
 			if(name.isAttribute)
 			{
@@ -1510,7 +1514,7 @@ package
 			{
 				if(_namespaces[i].uri == ns.uri && _namespaces[i].prefix == ns.prefix)
 					_namespaces.splice(i,1);
-				else if(ns.prefix == undefined && _namespaces[i].uri == ns.uri)
+				else if(ns.prefix == null && _namespaces[i].uri == ns.uri)
 					_namespaces.splice(i,1);
 			}
 			for(i=0;i<_children.length;i++)
@@ -1589,7 +1593,7 @@ package
 				8. Return
 			*/
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
-				return this;
+				return;
 			if(idx > _children.length)
 				idx = _children.length;
 			if(v is XML && v.nodeKind() != "attribute")
@@ -1638,8 +1642,9 @@ package
 				{
 					for(i=0;i<_attributes.length;i++)
 					{
-						if(_attributes[i].name.equals() )
-						addChild(_att)
+						//TODO incomplete...
+						//if(_attributes[i].name.equals() )
+						//addChild(_att)
 					}
 				}
 
@@ -1759,12 +1764,12 @@ package
 					// remove the children
 					// adjust the childIndexes
 				}
-				var curChild = _children[childIdx];
+				var curChild:XML = _children[childIdx];
 				// Now add them in.
 				len = elements.length();
 				for(i=0;i<len;i++)
 				{
-					child = elements[i];
+					chld = elements[i];
 					if(!curChild)
 					{
 						curChild = appendChild(chld);
@@ -1787,6 +1792,9 @@ package
 		 */
 		public function setChildren(value:Object):XML
 		{
+			var i:int;
+			var len:int;
+			var chld:XML;
 			if(value is XML)
 			{
 				var list:XMLList = new XMLList();
@@ -1809,12 +1817,12 @@ package
 					// remove the children
 					// adjust the childIndexes
 				}
-				var curChild = _children[childIdx];
+				var curChild:XML = _children[childIdx];
 				// Now add them in.
 				len = value.length();
 				for(i=0;i<len;i++)
 				{
-					child = value[i];
+					chld = value[i];
 					if(!curChild)
 					{
 						curChild = appendChild(chld);
@@ -1891,9 +1899,9 @@ package
 		
 		public function setParent(parent:XML):void
 		{
-			if(_parentXML)
-				_parentXML.removeChild(this);
-			_parentXML = parent;
+			if(_parent)
+				_parent.removeChild(this);
+			_parent = parent;
 		}
 
 		public function setValue(value:String):void
@@ -1914,7 +1922,7 @@ package
 			for(i=0;i<_children.length;i++)
 			{
 				if(_children[i].nodeKind() == "text")
-					list.list.appendChild(_atributes[i]);
+					list.list.appendChild(_attributes[i]);
 			}
 			list.targetObject = this;
 			return list;
@@ -1927,7 +1935,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function toJSON(k:String):*
+		override public function toJSON(k:String):String
 		{
 			return this.name();
 		}
@@ -1952,18 +1960,20 @@ package
 
 		private function toAttributeName(name:*):QName
 		{
+			var qname:QName;
 			if(!name is QName)
 			{
 				name = name.toString();
 				if(name.indexOf("@") > -1)
 					name = name.substring(name.indexOf("@"));
 			}
-			name = toXMLName(name);
-			name.isAttribute = true;
-
+			qname = toXMLName(name);
+			qname.isAttribute = true;
+			return qname;
 		}
 		private function toXMLName(name:*):QName
 		{
+			var qname:QName;
 			if(name.toString().indexOf("@") > -1)
 				return toAttributeName(name);
 
@@ -1987,12 +1997,11 @@ package
 				if(name.indexOf(":") >= 0)
 				{
 					// Get the QName for prefix
-					var qname:QName() = new QName();
+					qname = new QName();
 					qname.prefix = name.substring(0,name.indexOf(":"));
 					qname.localName = name.substring(name.lastIndexOf(":")+1);
 					//get the qname uri
 					qname.uri = getURI(qname.prefix);
-					name = qname;
 				}
 				else
 				{
@@ -2002,14 +2011,13 @@ package
 						qname = new QName(defaultNamespace);
 					}
 					qname.localName = name;
-					name = qname;
 				}
 			}
 			else
 			{
-				name  = new QName(name);
+				qname  = new QName(name);
 			}
-			return name;
+			return qname;
 		}
 		
 		/**
@@ -2018,7 +2026,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function toXMLString(indentLevel:int=0,ancestors:Array=[]):String
+		public function toXMLString(indentLevel:int=0,ancestors:Array=null):String
 		{
 			/*
 				Given an XML object x and an optional argument AncestorNamespaces and an optional argument IndentLevel, ToXMLString converts it to an XML encoded string s by taking the following steps:
@@ -2130,6 +2138,9 @@ package
 			//TODO I'm here...
 			// step 8.
 			//ancestors
+			if(!ancestors)
+				ancestors = [];
+
 			var declarations:Array = [];
 			for(i=0;i<_namespaces.length;i++)
 			{
@@ -2137,7 +2148,7 @@ package
 					declarations.push(new Namespace(_namespaces[i]));
 			}
 			//11
-			for(i=0;i<_attributes.length)
+			for(i=0;i<_attributes.length;i++)
 			{
 				ns = new Namespace(_attributes[i].name().getNamespace(ancestors.concat(declarations)));
 				if(ns.prefix === null)
@@ -2152,49 +2163,49 @@ package
 				ns.prefix = "";
 				declarations.push(ns);
 			}
-			strArray.push("<");
+			strArr.push("<");
 			if(ns.prefix)
 				strArr.push(ns.prefix+":");
-			strArray.push(name().localName);
+			strArr.push(name().localName);
 
 			//attributes and namespace declarations... (15-16)
 			for(i=0;i<declarations.length;i++)
 			{
-				strArray.push(" xmlns");
+				strArr.push(" xmlns");
 				if(declarations[i].prefix)
 				{
-					strArray.push(":");
-					strArray.push(declarations[i].prefix);
+					strArr.push(":");
+					strArr.push(declarations[i].prefix);
 				}
-				strArray.push('="');
-				strArray.push(escapeAttributeValue(declarations[i].uri));
-				strArray.push('"');
+				strArr.push('="');
+				strArr.push(escapeAttributeValue(declarations[i].uri));
+				strArr.push('"');
 
 			}
 			for(i=0;i<_attributes.length;i++)
 			{
-				strArray.push(" ");
+				strArr.push(" ");
 				// the following seems to be the spec, but it does not make sense to me.
 				//var ans:Namespace = _attributes[i].name().getNamespace(ancestors);
 				var aName:QName = _attributes[i].name();
 				var ans:Namespace = aName.getNamespace(ancestors.concat(declarations));
 				if(ans.prefix)
 				{
-					strArray.push(ans.prefix);
-					strArray.push(":");
+					strArr.push(ans.prefix);
+					strArr.push(":");
 				}
-				strArray.push(aName.localName);
-				strArray.push('="');
-				strArray.push(escapeAttributeValue(_attributes[i].getValue()));
-				strArray.push('"');
+				strArr.push(aName.localName);
+				strArr.push('="');
+				strArr.push(escapeAttributeValue(_attributes[i].getValue()));
+				strArr.push('"');
 			}
 			// now write elements or close the tag if none exist
 			if(_children.length == 0)
 			{
-				strArray.push("/>");
-				return strArray.join("");
+				strArr.push("/>");
+				return strArr.join("");
 			}
-			strArray.push(">");
+			strArr.push(">");
 			var indentChildren:Boolean = _children.length > 1 || (_children.length == 1 && _children[0].nodeKind() != "text");
 			var nextIndentLevel:int;
 			if(XML.prettyPrinting && indentChildren)
@@ -2205,24 +2216,24 @@ package
 			{
 				//
 				if(XML.prettyPrinting && indentChildren)
-					strArray.push("\n");
-				strArray.push(_children[i].toXMLString(nextIndentLevel,ancestors.concat(declarations)));
+					strArr.push("\n");
+				strArr.push(_children[i].toXMLString(nextIndentLevel,ancestors.concat(declarations)));
 			}
 			if(XML.prettyPrinting && indentChildren)
 			{
-				strArray.push("\n");
-				strArray.push(new Array(indentLevel + 1).join(' '));
+				strArr.push("\n");
+				strArr.push(new Array(indentLevel + 1).join(' '));
 			}
-			strArray.push("</");
+			strArr.push("</");
 			if(ns.prefix)
 			{
-				strArray.push(ns.prefix);
-				strArray.push(":");
+				strArr.push(ns.prefix);
+				strArr.push(":");
 			}
-			strArray.push(ns.localName);
-			strArray.push(">");
+			strArr.push(ns.localName);
+			strArr.push(">");
 
-			return strArray.join("");
+			return strArr.join("");
 		}
 		
 		/**
@@ -2231,7 +2242,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function valueOf():XML
+		override public function valueOf():*
 		{
 			return this;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8cd5b382/frameworks/projects/XML/src/main/flex/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLClasses.as b/frameworks/projects/XML/src/main/flex/XMLClasses.as
index 6a91d82..044e257 100644
--- a/frameworks/projects/XML/src/main/flex/XMLClasses.as
+++ b/frameworks/projects/XML/src/main/flex/XMLClasses.as
@@ -32,4 +32,5 @@ internal class XMLClasses
 		import XMLList; XMLList;
 		import QName; QName;
 	}
+}
 }
\ No newline at end of file


[25/49] git commit: [flex-asjs] [refs/heads/develop] - use all for falcon

Posted by ha...@apache.org.
use all for falcon


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c7fd667c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c7fd667c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c7fd667c

Branch: refs/heads/develop
Commit: c7fd667c87e32e8fba6c8e94f18a9d1a17846068
Parents: 7a6f915
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 16 00:17:18 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Feb 16 00:17:18 2016 -0800

----------------------------------------------------------------------
 build.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c7fd667c/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 465b13a..609f416 100644
--- a/build.xml
+++ b/build.xml
@@ -1690,8 +1690,7 @@
             />
         <ant dir="${base.folder.name}/flex-sdk" />
         <property name="javadoc.zip.uptodate" value="set" /> <!-- javadoc fails on windows? -->
-        <ant dir="${base.folder.name}/flex-falcon/compiler" />
-        <ant dir="${base.folder.name}/flex-falcon/compiler.jx" />
+        <ant dir="${base.folder.name}/flex-falcon" target="all" />
         <ant dir="${base.folder.name}/flex-flexunit" />
     </target>
     


[10/49] git commit: [flex-asjs] [refs/heads/develop] - removeChild()

Posted by ha...@apache.org.
removeChild()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/eb91e10f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/eb91e10f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/eb91e10f

Branch: refs/heads/develop
Commit: eb91e10f4a3d387bcd4d7fc74474b804072ad1f7
Parents: d2b32b8
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 09:32:54 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 09:32:54 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as | 62 +++++++++++++++++++++++++++++-
 1 file changed, 61 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb91e10f/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index c9da8a7..7736133 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -1114,14 +1114,73 @@ package
 				6. Let x.[[Length]] = x.[[Length]] - dp
 				7. Return true.
 			*/
-			if(child.nodeKind())
 			var removed:XML;
+			if(!child)
+				return false;
+			if(!_attributes)
+				return false;
+
+			if(!(child is XML))
+				return removeChildByName(child);
+			
+			if(child.nodeKind() == "attribute")
+			{
+				for(i=0;i<_attributes.length;i++)
+				{
+					if(child.equals(_attributes[i]))
+					{
+						removed = _attributes[i];
+						removed.setParent(null);
+						_attributes.splice(i,1);
+						return true;
+					}
+				}
+			}
 			var idx:int = _children.indexOf(child);
+			if(idx < 0)
+				return false;
 			removed = _children.splice(idx,1);
 			child.setParent(null);
 			return removed;
 		}
+		private function removeChildByName(name:*):Boolean
+		{
+			var i:int;
+			name = toXMLName(name);
+			child = null;
+			var removedItem:Boolean = false;
+			if(name.isAttribute)
+			{
+				if(!_attributes)
+					return false;
 
+				for(i=_attributes.length-1;i>=0;i--)
+				{
+					if(_attributes[i].name().matches(name))
+					{
+						child = _attributes[i];
+						child.setParent(null);
+						_attributes.splice(i,1);
+						removedItem = true;
+					}
+				}
+				return removedItem;
+			}
+			//QUESTION am I handling non-elements correctly?
+			if(!_children)
+				return false;
+			for(i=_children.length-1;i>=0;i--)
+			{
+				if(_children[i].name().matches(name))
+				{
+					child = _children[i];
+					child.setParent(null);
+					_children.splice(i,1);
+					removedItem = true;
+				}
+			}
+			return removedItem;
+		}
 		public function removeChildAt(index:int):void
 		{
 			/*
@@ -1138,6 +1197,7 @@ package
 				  b. Return true
 				3. Else throw a TypeError exception
 			*/
+			//Do nothing for XML objects?
 		}
 
 		/**


[22/49] git commit: [flex-asjs] [refs/heads/develop] - Fixed concat() to modify the original XMLList

Posted by ha...@apache.org.
Fixed concat() to modify the original XMLList


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7f23ef37
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7f23ef37
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7f23ef37

Branch: refs/heads/develop
Commit: 7f23ef37d99f871598f9cdc311615f1e56dcf97f
Parents: a487152
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 11 14:08:27 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 11 14:08:27 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as    |  2 +-
 .../projects/XML/src/main/flex/XMLList.as       | 21 ++++++++++----------
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7f23ef37/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 69d94b5..8c65385 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -739,7 +739,7 @@ package
 						if(name.matches(_children[i].name()))
 							list.appendChild(_children[i]);
 
-						list = list.concat(_children[i].descendants());
+						list.concat(_children[i].descendants());
 					} 
 				}
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7f23ef37/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index e34b765..2ad96ce 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -176,7 +176,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].attribute(attributeName);
 				if(list.length())
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -194,7 +194,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].attributes();
 				if(list.length())
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -213,7 +213,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].child(propertyName);
 				if(list.length())
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -231,7 +231,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].children();
 				if(list.length)
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -249,7 +249,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].comments();
 				if(list.length)
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -265,12 +265,11 @@ package
 			if(!(list is XMLList))
 				throw new TypeError("invalid type");
 
-			var retVal:XMLList = this.copy();
 			var item:XML;
 			for each(item in list)
-				retVal.appendChild(item);
+				appendChild(item);
 				
-			return retVal;
+			return this;
 		}
 		
 		/**
@@ -303,7 +302,7 @@ package
 			var retVal:XMLList = new XMLList();
 			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
-				retVal[i] = _xmlArray[i].copy();
+				retVal.appendChild(_xmlArray[i].copy());
 			
 			return retVal;
 		}
@@ -323,7 +322,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].descendants(name);
 				if(list.length())
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}
@@ -343,7 +342,7 @@ package
 			{
 				var list:XMLList = _xmlArray[i].elements(name);
 				if(list.length())
-					retVal = retVal.concat(list);
+					retVal.concat(list);
 			}
 			return retVal;
 		}


[28/49] git commit: [flex-asjs] [refs/heads/develop] - more compile error fixes

Posted by ha...@apache.org.
more compile error fixes


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/da234a4b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/da234a4b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/da234a4b

Branch: refs/heads/develop
Commit: da234a4b4cee97c89032b857c310a12d98ce1c0e
Parents: ab713c4
Author: Harbs <ha...@in-tools.com>
Authored: Tue Feb 16 20:44:51 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Tue Feb 16 20:44:51 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as    |  2 +-
 .../projects/XML/src/main/flex/XMLList.as       | 49 ++++++++++++--------
 2 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da234a4b/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 09a030d..4ba59a0 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -944,7 +944,7 @@ package
 			return false;
 		}
 
-		public function hasOwnProperty(p:*):Boolean
+		override public function hasOwnProperty(p:*):Boolean
 		{
 			/*
 				When the [[HasProperty]] method of an XML object x is called with property name P, the following steps are taken:

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da234a4b/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index 2ad96ce..c7f3c09 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -26,16 +26,6 @@ package
 		{
 			addIndex(0);
 		}
-		private var _targetObject:XML;
-		public function set targetObject(value:XML):void
-		{
-			_targetObject = value;
-		}
-		private var _targetProperty:QName;
-		public function set targetProperty(value:QName):void
-		{
-			_targetProperty = value;
-		}
 		private var _xmlArray:Array = [];
 		/*
 			9.2.1.2 [[Put]] (P, V)
@@ -230,7 +220,7 @@ package
 			for (var i:int=0;i<len;i++)
 			{
 				var list:XMLList = _xmlArray[i].children();
-				if(list.length)
+				if(list.length())
 					retVal.concat(list);
 			}
 			return retVal;
@@ -248,7 +238,7 @@ package
 			for (var i:int=0;i<len;i++)
 			{
 				var list:XMLList = _xmlArray[i].comments();
-				if(list.length)
+				if(list.length())
 					retVal.concat(list);
 			}
 			return retVal;
@@ -314,7 +304,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function descendants(name:Object = *):XMLList
+		public function descendants(name:Object = "*"):XMLList
 		{
 			var retVal:XMLList = new XMLList();
 			var len:int = _xmlArray.length;
@@ -334,7 +324,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function elements(name:Object = *):XMLList
+		public function elements(name:Object = "*"):XMLList
 		{
 			var retVal:XMLList = new XMLList();
 			var len:int = _xmlArray.length;
@@ -388,7 +378,7 @@ package
 			return false;
 		}
 
-		public function hasOwnProperty(propertyName:*):Boolean
+		override public function hasOwnProperty(propertyName:*):Boolean
 		{
 			/*
 				Overview
@@ -454,7 +444,26 @@ package
 		 */
 		public function normalize():XMLList
 		{
-			//TODO: Figure out what to do here.
+			/*
+			When the normalize method is called on an XMLList object list, the following steps are taken:
+			1. Let i = 0
+			2. While i < list.[[Length]]
+			  a. If list[i].[[Class]] == "element"
+			    i. Call the normalize method of list[i]
+			    ii. Let i = i + 1
+			  b. Else if list[i].[[Class]] == "text"
+			    i. While ((i+1) < list.[[Length]]) and (list[i + 1].[[Class]] == "text")
+			      1. Let list[i].[[Value]] be the result of concatenating list[i].[[Value]] and list[i + 1].[[Value]]
+			      2. Call the [[Delete]] method of list with argument ToString(i + 1)
+			    ii. If list[i].[[Value]].length == 0
+			      1. Call the [[Delete]] method of list with argument ToString(i)
+			    iii. Else
+			      1. Let i = i + 1
+			  c. Else
+			    i. Let i = i + 1
+			3. Return list
+			*/
+			return this;
 		}
 		
 		/**
@@ -467,11 +476,11 @@ package
 		{
 			if(_xmlArray.length == 0)
 				return undefined;
-			var retVal = this[0].parent;
+			var retVal:XML = _xmlArray[0].parent();
 			var len:int = _xmlArray.length;
 			for (var i:int=1;i<len;i++)
 			{
-				if(_xmlArray[i].parent != retVal)
+				if(_xmlArray[i].parent() != retVal)
 					return undefined;
 			}
 			return retVal;
@@ -590,7 +599,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function toLocaleString():String
+		override public function toLocaleString():String
 		{
 			var retVal:Array = [];
 			var len:int = _xmlArray.length;
@@ -647,7 +656,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function valueOf():XMLList
+		override public function valueOf():*
 		{
 			return this;
 		}


[11/49] git commit: [flex-asjs] [refs/heads/develop] - Hopefully made some sense out of namespaces

Posted by ha...@apache.org.
Hopefully made some sense out of namespaces


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f6aee89e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f6aee89e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f6aee89e

Branch: refs/heads/develop
Commit: f6aee89e0aa0fabd1a8ca4a2ec91933849494782
Parents: eb91e10
Author: Harbs <ha...@in-tools.com>
Authored: Sun Feb 7 13:28:26 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Feb 7 13:28:26 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/QName.as |  31 ++++++++
 frameworks/projects/XML/as/src/XML.as   | 111 +++++++++++++++++++++++++--
 2 files changed, 137 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f6aee89e/frameworks/projects/XML/as/src/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/QName.as b/frameworks/projects/XML/as/src/QName.as
index 2ceb487..5232bbe 100644
--- a/frameworks/projects/XML/as/src/QName.as
+++ b/frameworks/projects/XML/as/src/QName.as
@@ -125,6 +125,37 @@ package
 			_isAttribute = value;
 		}
 
+		public function getNamespace(namespaces:Array=null):Namespace
+		{
+			/*
+				When the [[GetNamespace]] method of a QName q is called with no arguments or one argument InScopeNamespaces, the following steps are taken:
+				1. If q.uri is null, throw a TypeError exception NOTE the exception above should never occur due to the way [[GetNamespace]] is called in this specification
+				2. If InScopeNamespaces was not specified, let InScopeNamespaces = { }
+				3. Find a Namespace ns in InScopeNamespaces, such that ns.uri == q.uri. If more than one such Namespace ns exists, the implementation may choose one of the matching Namespaces arbitrarily. NOTE implementations that preserve prefixes in qualified names may additionally constrain ns, such that ns.prefix == q.[[Prefix]]
+				4. If no such namespace ns exists
+				a. Let ns be a new namespace created as if by calling the constructor new Namespace(q.uri) NOTE implementations that preserve prefixes and qualified names may create the new namespaces as if by calling the constructor Namespace(q.[[Prefix]], q.uri)
+				5. Return ns
+			*/
+			var i:int;
+			var possibleMatch:Namespace;
+			if(!namespaces)
+				namespaces = [];
+			for(i=0;i<namespaces.length;i++)
+			{
+				if(namespaces[i].uri == _uri)
+				{
+					possibleMatch = namespaces[i];
+					if(namespaces[i].prefix == _prefix)
+						return namespaces[i];
+				}
+			}
+			if(possibleMatch)
+				return possibleMatch;
+			if(!_prefix)
+				return new Namespace(_uri);
+			return new Namespace(_prefix,_uri);
+		}
+
 	}
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f6aee89e/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index 7736133..e14f8f0 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -911,7 +911,7 @@ package
 		 */
 		public function inScopeNamespaces():Array
 		{
-			return null;
+			return _namespaces.slice();
 		}
 		
 		/**
@@ -986,7 +986,39 @@ package
 		 */
 		public function namespace(prefix:String = null):*
 		{
-			return null;
+			/*
+				When the namespace method is called on an XML object x with zero arguments or one argument prefix, the following steps are taken:
+				1. Let y = x
+				2. Let inScopeNS = { }
+				3. While (y is not null)
+				  a. For each ns in y.[[InScopeNamespaces]]
+				    i. If there exists no n ∈ inScopeNS, such that n.prefix == ns.prefix
+				      1. Let inScopeNS = inScopeNS ∪ { ns }
+				  b. Let y = y.[[Parent]]
+				4. If prefix was not specified
+				  a. If x.[[Class]] ∈ {"text", "comment", "processing-instruction"}, return null
+				  b. Return the result of calling the [[GetNamespace]] method of x.[[Name]] with argument inScopeNS
+				5. Else
+				  a. Let prefix = ToString(prefix)
+				  b. Find a Namespace ns ∈ inScopeNS, such that ns.prefix = prefix. If no such ns exists, let ns = undefined.
+				  c. Return ns
+			*/
+			var i:int;
+			if(prefix)
+			{
+				for(i=0;i<_namespaces.length;i++)
+				{
+					if(_namespaces[i].prefix == prefix)
+						return _namespaces[i];
+				}
+				if(_parent)
+					return _parent.namespace(prefix);
+				return undefined;
+			}
+			//no prefix. get the namespace of our object
+			if(_nodeKind == "text" || _nodeKind ==  "comment" || _nodeKind ==  "processing-instruction")
+				return null;
+			return name().getNamespace(namespaceDeclarations());
 		}
 		
 		/**
@@ -997,7 +1029,54 @@ package
 		 */
 		public function namespaceDeclarations():Array
 		{
-			return null;
+			/*
+				When the namespaceDeclarations method is called on an XML object x, the following steps are taken:
+				1. Let a be a new Array created as if by calling the constructor, new Array()
+				2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return a
+				3. Let y = x.[[Parent]]
+				4. Let ancestorNS = { }
+				5. While (y is not null)
+				  a. For each ns in y.[[InScopeNamespaces]]
+				    i. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix
+				      1. Let ancestorNS = ancestorNS ∪ { ns }
+				  b. Let y = y.[[Parent]]
+				6. Let declaredNS = { }
+				7. For each ns in x.[[InScopeNamespaces]]
+				  a. If there exists no n ∈ ancestorNS, such that n.prefix == ns.prefix and n.uri == ns.uri
+				    i. Let declaredNS = declaredNS ∪ { ns }
+				8. Let i = 0
+				9. For each ns in declaredNS
+				  a. Call the [[Put]] method of a with arguments ToString(i) and ns
+				  b. Let i = i + 1
+				10. Return a
+			*/
+			var retVal:Array = [];
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return retVal;
+			var declaredNS:Array = _namespaces.slice();
+			var parent:XML = _parent;
+			while(parent)
+			{
+				var parentNS:Array = parent.inScopeNamespaces();
+				var idx:int;
+				var pIdx:int;
+				for(pIdx=0;i<parentNS.length;pIdx++)
+				{
+					var uri:String = parentNS[pIdx].uri;
+					var prefix:String = parentNS[pIdx].prefix;
+					for(idx=0;i<declaredNS.length;idx++)
+					{
+						if(declaredNS[idx].uri == uri && declaredNS[idx].prefix == prefix)
+						{
+							declaredNS.push(parentNS[pIdx]);
+							break;
+						}
+					}
+				}
+				parent = parent.parent();
+			}
+
+			return declaredNS;
 		}
 		
 		private var _nodeKind:String = "element";
@@ -1053,7 +1132,7 @@ package
 		 */
 		public function parent():*
 		{
-			return null;
+			return _parent;
 		}
 		
 		/**
@@ -1207,8 +1286,30 @@ package
 		 * @return 
 		 * 
 		 */
-		public function removeNamespace(ns:Namespace):XML
+		public function removeNamespace(ns:*):XML
 		{
+			/*
+				When the removeNamespace method is called on an XML object x with parameter namespace, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
+				2. Let ns be a Namespace object created as if by calling the function Namespace( namespace )
+				3. Let thisNS be the result of calling [[GetNamespace]] on x.[[Name]] with argument x.[[InScopeNamespaces]]
+				4. If (thisNS == ns), return x
+				5. For each a in x.[[Attributes]]
+				  a. Let aNS be the result of calling [[GetNamespace]] on a.[[Name]] with argument x.[[InScopeNamespaces]]
+				  b. If (aNS == ns), return x
+				6. If ns.prefix == undefined
+				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri, remove the namespace n from x.[[InScopeNamespaces]]
+				7. Else
+				  a. If there exists a namespace n ∈ x.[[InScopeNamespaces]], such that n.uri == ns.uri and n.prefix == ns.prefix, remove the namespace n from x.[[InScopeNamespaces]]
+				8. For each property p of x
+				  a. If p.[[Class]] = "element", call the removeNamespace method of p with argument ns
+				9. Return x
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return this;
+			if(!(ns is Namespace))
+				ns = new Namespace(ns);
+
 			return null;
 		}
 		


[47/49] git commit: [flex-asjs] [refs/heads/develop] - Moved QName and Namespace to Core Bug fixes

Posted by ha...@apache.org.
Moved QName and Namespace to Core
Bug fixes


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1eec8d8d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1eec8d8d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1eec8d8d

Branch: refs/heads/develop
Commit: 1eec8d8d2ee2cdc6186adb1de2a0da690cdec5bf
Parents: 62e69f5
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 18:52:16 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 18:52:16 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/Namespace.as    | 129 +++++++++++---
 frameworks/projects/Core/src/main/flex/QName.as | 167 +++++++++++++++---
 .../projects/XML/src/main/flex/Namespace.as     | 135 ---------------
 frameworks/projects/XML/src/main/flex/QName.as  | 169 -------------------
 frameworks/projects/XML/src/main/flex/XML.as    |   9 +-
 manualtests/XMLTest/src/MyInitialView.mxml      |   7 +-
 6 files changed, 262 insertions(+), 354 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/frameworks/projects/Core/src/main/flex/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/Namespace.as b/frameworks/projects/Core/src/main/flex/Namespace.as
index 305d88c..93f8eab 100644
--- a/frameworks/projects/Core/src/main/flex/Namespace.as
+++ b/frameworks/projects/Core/src/main/flex/Namespace.as
@@ -16,35 +16,120 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package {
-
-/**
- *  Namespace implementation for JS
- */
-public class Namespace
+package
 {
-    public function Namespace(param1:*, param2:* = undefined)
+	public class Namespace
 	{
-		if (param2 !== undefined)
+		COMPILE::JS
+    	public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
 		{
-			uri = param2;
-			prefix = param1;
+			/*
+				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
+				1. Create a new Namespace object n
+				2. If prefixValue is not specified and uriValue is not specified
+				  a. Let n.prefix be the empty string
+				  b. Let n.uri be the empty string
+				3. Else if prefixValue is not specified
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "Namespace"
+				    i. Let n.prefix = uriValue.prefix
+				    ii. Let n.uri = uriValue.uri
+				  b. Else if Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri NOTE implementations that preserve prefixes in qualified names may also set n.prefix = uriValue.[[Prefix]]
+				  c. Else
+				    i. Let n.uri = ToString(uriValue)
+				    ii. If (n.uri is the empty string), let n.prefix be the empty string
+				    iii. Else n.prefix = undefined
+				4. Else
+				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
+				    i. Let n.uri = uriValue.uri
+				  b. Else
+				    i. Let n.uri = ToString(uriValue)
+				  c. If n.uri is the empty string
+				    i. If prefixValue is undefined or ToString(prefixValue) is the empty string
+				      1. Let n.prefix be the empty string
+				    ii. Else throw a TypeError exception
+				  d. Else if prefixValue is undefined, let n.prefix = undefined
+				  e. Else if isXMLName(prefixValue) == false
+				  i. Let n.prefix = undefined
+				  f. Else let n.prefix = ToString(prefixValue)
+				5. Return n
+			*/
+			if(!uriValue && prefixOrUri) //we don't have a prefix defined
+			{
+				var uriVal:Object = uriValue ? uriValue : prefixOrUri;
+				if(uriVal is Namespace)
+				{
+					_prefix = (uriVal as Namespace).prefix;
+					_uri = (uriVal as Namespace).uri;
+				}
+				else if(uriVal is QName)
+				{
+					if((uriVal as QName).uri)
+						_uri = (uriVal as QName).uri;
+				}
+				else {
+					_uri = uriVal.toString();
+					if(_uri == "")
+						_prefix = "";
+				}
+			}
+			else if(uriValue)
+			{
+				// something is specified as the URI otherwise fall through and leave both the prefix and uri blank
+				if(uriValue is QName)
+				{
+					if((uriValue as QName).uri)
+						_uri = (uriValue as QName).uri;
+				}
+				else {
+					_uri = uriValue.toString();
+				}
+
+				if(!_uri)
+				{
+					if(!prefixOrUri)
+						_prefix = "";
+					else
+						throw new TypeError("invalid prefix");
+				}
+				else
+					_prefix = prefixOrUri.toString();
+
+			}
 		}
-		else
+
+		private var _uri:String = "";
+		public function get uri():String
 		{
-			uri = param1;
+			return _uri;
+		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _prefix:String = null;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		COMPILE::JS
+		public function toString():String
+		{
+			return uri;
+		}
+
+		COMPILE::JS
+		override public function valueOf():*
+		{
+			return this;
 		}
 	}
-	
-	public var uri:String;
-	public var prefix:String;
-	
-	public function toString():String
-	{
-		return uri;
-	}
-	
 }
 
-}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/frameworks/projects/Core/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/QName.as b/frameworks/projects/Core/src/main/flex/QName.as
index 26c398b..057b9d5 100644
--- a/frameworks/projects/Core/src/main/flex/QName.as
+++ b/frameworks/projects/Core/src/main/flex/QName.as
@@ -16,38 +16,155 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package {
-
-/**
- *  QName implementation for JS
- */
-public class QName
+package
 {
-    public function QName(param1:Object, localName:String = null)
+	public class QName
 	{
-		if (param1 is QName)
+		COMPILE::JS
+		public function QName(qNameOrUri:*=null,localNameVal:*=null)
 		{
-			var q:QName = param1 as QName;
-			uri = q.uri;
-			localName = q.localName;
+			/*
+				When the QName constructor is called with a one argument Name or two arguments Namespace and Name the following steps are taken:
+				1. If (Type(Name) is Object and Name.[[Class]] == "QName")
+				  a. If (Namespace is not specified), return a copy of Name
+				  b. Else let Name = Name.localName
+				2. If (Name is undefined or not specified)
+				  a. Let Name = “”
+				3. Else let Name = ToString(Name)
+				4. If (Namespace is undefined or not specified)
+				  a. If Name = "*"
+				    i. Let Namespace = null
+				  b. Else
+				    i. Let Namespace = GetDefaultNamespace()
+				5. Let q be a new QName with q.localName = Name
+				6. If Namespace == null
+				  a. Let q.uri = null NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to undefined
+				7. Else
+				  a. Let Namespace be a new Namespace created as if by calling the constructor new Namespace(Namespace)
+				  b. Let q.uri = Namespace.uri NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to Namespace.prefix
+				8. Return q
+			*/
+			if(qNameOrUri is QName)
+			{
+				_uri = qNameOrUri.uri;
+				_localName = qNameOrUri.localName;
+				_prefix = qNameOrUri.prefix;
+			}
+			else if(qNameOrUri is Namespace)
+			{
+				_uri = (qNameOrUri as Namespace).uri;
+				_prefix = (qNameOrUri as Namespace).prefix;
+				if(localNameVal)
+					_localName = localNameVal.toString();
+			}
+			else if(localNameVal)
+			{
+				_localName = localNameVal;
+				_uri = qNameOrUri;
+			}
+			else if (qNameOrUri && qNameOrUri.toString())
+			{
+				_localName = qNameOrUri.toString();
+			}
 		}
-		else if (param1 is Namespace)
+
+		private var _uri:String;
+		public function get uri():String
 		{
-			var n:Namespace = param1 as Namespace;
-			uri = n.uri;
-			this.localName = localName;
+			return _uri;
 		}
+		public function set uri(value:String):void
+		{
+			_uri = value;
+		}
+		
+		private var _localName:String;
+		public function get localName():String
+		{
+			return _localName;
+		}
+		public function set localName(value:String):void
+		{
+			_localName = value;
+		}
+
+		private var _prefix:String;
+		public function get prefix():String
+		{
+			return _prefix;
+		}
+		public function set prefix(value:String):void
+		{
+			_prefix = value;
+		}
+
+		COMPILE::JS
+		public function toString():String
+		{
+			var uriVal:String = _uri ? _uri : "*";
+			return uriVal + "::" + _localName;
+		}
+
+		COMPILE::JS
+		public function equals(name:QName):Boolean
+		{
+			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
+		}
+		
+    	COMPILE::JS
+		public function matches(name:QName):Boolean
+		{
+			if(this.uri == "*" || name.uri == "*")
+				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
+
+			if(this.localName == "*" || name.localName == "*")
+				return this.uri == name.uri;
+
+			return this.uri == name.uri && this.localName == name.localName;
+		}
+		private var _isAttribute:Boolean;
+		public function get isAttribute():Boolean
+		{
+			return _isAttribute;
+		}
+		public function set isAttribute(value:Boolean):void
+		{
+			_isAttribute = value;
+		}
+
+		COMPILE::JS
+		public function getNamespace(namespaces:Array=null):Namespace
+		{
+			/*
+				When the [[GetNamespace]] method of a QName q is called with no arguments or one argument InScopeNamespaces, the following steps are taken:
+				1. If q.uri is null, throw a TypeError exception NOTE the exception above should never occur due to the way [[GetNamespace]] is called in this specification
+				2. If InScopeNamespaces was not specified, let InScopeNamespaces = { }
+				3. Find a Namespace ns in InScopeNamespaces, such that ns.uri == q.uri. If more than one such Namespace ns exists, the implementation may choose one of the matching Namespaces arbitrarily. NOTE implementations that preserve prefixes in qualified names may additionally constrain ns, such that ns.prefix == q.[[Prefix]]
+				4. If no such namespace ns exists
+				a. Let ns be a new namespace created as if by calling the constructor new Namespace(q.uri) NOTE implementations that preserve prefixes and qualified names may create the new namespaces as if by calling the constructor Namespace(q.[[Prefix]], q.uri)
+				5. Return ns
+			*/
+			var i:int;
+			var possibleMatch:Namespace;
+			if(!namespaces)
+				namespaces = [];
+			for(i=0;i<namespaces.length;i++)
+			{
+				if(namespaces[i].uri == _uri)
+				{
+					possibleMatch = namespaces[i];
+					if(namespaces[i].prefix == _prefix)
+						return namespaces[i];
+				}
+			}
+			if(possibleMatch)
+				return possibleMatch;
+			if(!_prefix)
+				return new Namespace(_uri);
+			return new Namespace(_prefix,_uri);
+		}
+
 	}
-	
-	public var uri:String;
-	public var localName:String;
-	
-	public function toString():String
-	{
-		return uri + "::" + localName;
-	}
-	
 }
 
-}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/frameworks/projects/XML/src/main/flex/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/Namespace.as b/frameworks/projects/XML/src/main/flex/Namespace.as
deleted file mode 100644
index 93f8eab..0000000
--- a/frameworks/projects/XML/src/main/flex/Namespace.as
+++ /dev/null
@@ -1,135 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
-	public class Namespace
-	{
-		COMPILE::JS
-    	public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
-		{
-			/*
-				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
-				1. Create a new Namespace object n
-				2. If prefixValue is not specified and uriValue is not specified
-				  a. Let n.prefix be the empty string
-				  b. Let n.uri be the empty string
-				3. Else if prefixValue is not specified
-				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "Namespace"
-				    i. Let n.prefix = uriValue.prefix
-				    ii. Let n.uri = uriValue.uri
-				  b. Else if Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
-				    i. Let n.uri = uriValue.uri NOTE implementations that preserve prefixes in qualified names may also set n.prefix = uriValue.[[Prefix]]
-				  c. Else
-				    i. Let n.uri = ToString(uriValue)
-				    ii. If (n.uri is the empty string), let n.prefix be the empty string
-				    iii. Else n.prefix = undefined
-				4. Else
-				  a. If Type(uriValue) is Object and uriValue.[[Class]] == "QName" and uriValue.uri is not null
-				    i. Let n.uri = uriValue.uri
-				  b. Else
-				    i. Let n.uri = ToString(uriValue)
-				  c. If n.uri is the empty string
-				    i. If prefixValue is undefined or ToString(prefixValue) is the empty string
-				      1. Let n.prefix be the empty string
-				    ii. Else throw a TypeError exception
-				  d. Else if prefixValue is undefined, let n.prefix = undefined
-				  e. Else if isXMLName(prefixValue) == false
-				  i. Let n.prefix = undefined
-				  f. Else let n.prefix = ToString(prefixValue)
-				5. Return n
-			*/
-			if(!uriValue && prefixOrUri) //we don't have a prefix defined
-			{
-				var uriVal:Object = uriValue ? uriValue : prefixOrUri;
-				if(uriVal is Namespace)
-				{
-					_prefix = (uriVal as Namespace).prefix;
-					_uri = (uriVal as Namespace).uri;
-				}
-				else if(uriVal is QName)
-				{
-					if((uriVal as QName).uri)
-						_uri = (uriVal as QName).uri;
-				}
-				else {
-					_uri = uriVal.toString();
-					if(_uri == "")
-						_prefix = "";
-				}
-			}
-			else if(uriValue)
-			{
-				// something is specified as the URI otherwise fall through and leave both the prefix and uri blank
-				if(uriValue is QName)
-				{
-					if((uriValue as QName).uri)
-						_uri = (uriValue as QName).uri;
-				}
-				else {
-					_uri = uriValue.toString();
-				}
-
-				if(!_uri)
-				{
-					if(!prefixOrUri)
-						_prefix = "";
-					else
-						throw new TypeError("invalid prefix");
-				}
-				else
-					_prefix = prefixOrUri.toString();
-
-			}
-		}
-
-		private var _uri:String = "";
-		public function get uri():String
-		{
-			return _uri;
-		}
-		public function set uri(value:String):void
-		{
-			_uri = value;
-		}
-		
-		private var _prefix:String = null;
-		public function get prefix():String
-		{
-			return _prefix;
-		}
-		public function set prefix(value:String):void
-		{
-			_prefix = value;
-		}
-
-		COMPILE::JS
-		public function toString():String
-		{
-			return uri;
-		}
-
-		COMPILE::JS
-		override public function valueOf():*
-		{
-			return this;
-		}
-	}
-}
-
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
deleted file mode 100644
index 70298f9..0000000
--- a/frameworks/projects/XML/src/main/flex/QName.as
+++ /dev/null
@@ -1,169 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
-	public class QName
-	{
-		COMPILE::JS
-		public function QName(qNameOrUri:*=null,localNameVal:*=null)
-		{
-			/*
-				When the QName constructor is called with a one argument Name or two arguments Namespace and Name the following steps are taken:
-				1. If (Type(Name) is Object and Name.[[Class]] == "QName")
-				  a. If (Namespace is not specified), return a copy of Name
-				  b. Else let Name = Name.localName
-				2. If (Name is undefined or not specified)
-				  a. Let Name = “”
-				3. Else let Name = ToString(Name)
-				4. If (Namespace is undefined or not specified)
-				  a. If Name = "*"
-				    i. Let Namespace = null
-				  b. Else
-				    i. Let Namespace = GetDefaultNamespace()
-				5. Let q be a new QName with q.localName = Name
-				6. If Namespace == null
-				  a. Let q.uri = null NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to undefined
-				7. Else
-				  a. Let Namespace be a new Namespace created as if by calling the constructor new Namespace(Namespace)
-				  b. Let q.uri = Namespace.uri NOTE implementations that preserve prefixes in qualified names may also set q.[[Prefix]] to Namespace.prefix
-				8. Return q
-			*/
-			if(qNameOrUri is QName)
-			{
-				_uri = qNameOrUri.uri;
-				_localName = qNameOrUri.localName;
-				_prefix = qNameOrUri.prefix;
-			}
-			else if(qNameOrUri is Namespace)
-			{
-				_uri = (qNameOrUri as Namespace).uri;
-				_prefix = (qNameOrUri as Namespace).prefix;
-				if(localNameVal)
-					_localName = localNameVal.toString();
-			}
-			else if(localNameVal)
-			{
-				_localName = localNameVal;
-			}
-			else if (qNameOrUri && qNameOrUri.toString())
-			{
-				_localName = qNameOrUri.toString();
-			}
-		}
-
-		private var _uri:String;
-		public function get uri():String
-		{
-			return _uri;
-		}
-		public function set uri(value:String):void
-		{
-			_uri = value;
-		}
-		
-		private var _localName:String;
-		public function get localName():String
-		{
-			return _localName;
-		}
-		public function set localName(value:String):void
-		{
-			_localName = value;
-		}
-
-		private var _prefix:String;
-		public function get prefix():String
-		{
-			return _prefix;
-		}
-		public function set prefix(value:String):void
-		{
-			_prefix = value;
-		}
-
-		COMPILE::JS
-		public function toString():String
-		{
-			var uriVal:String = _uri ? _uri : "*";
-			return uriVal + "::" + _localName;
-		}
-
-		COMPILE::JS
-		public function equals(name:QName):Boolean
-		{
-			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
-		}
-		
-    	COMPILE::JS
-		public function matches(name:QName):Boolean
-		{
-			if(this.uri == "*" || name.uri == "*")
-				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
-
-			if(this.localName == "*" || name.localName == "*")
-				return this.uri == name.uri;
-
-			return this.uri == name.uri && this.localName == name.localName;
-		}
-		private var _isAttribute:Boolean;
-		public function get isAttribute():Boolean
-		{
-			return _isAttribute;
-		}
-		public function set isAttribute(value:Boolean):void
-		{
-			_isAttribute = value;
-		}
-
-		COMPILE::JS
-		public function getNamespace(namespaces:Array=null):Namespace
-		{
-			/*
-				When the [[GetNamespace]] method of a QName q is called with no arguments or one argument InScopeNamespaces, the following steps are taken:
-				1. If q.uri is null, throw a TypeError exception NOTE the exception above should never occur due to the way [[GetNamespace]] is called in this specification
-				2. If InScopeNamespaces was not specified, let InScopeNamespaces = { }
-				3. Find a Namespace ns in InScopeNamespaces, such that ns.uri == q.uri. If more than one such Namespace ns exists, the implementation may choose one of the matching Namespaces arbitrarily. NOTE implementations that preserve prefixes in qualified names may additionally constrain ns, such that ns.prefix == q.[[Prefix]]
-				4. If no such namespace ns exists
-				a. Let ns be a new namespace created as if by calling the constructor new Namespace(q.uri) NOTE implementations that preserve prefixes and qualified names may create the new namespaces as if by calling the constructor Namespace(q.[[Prefix]], q.uri)
-				5. Return ns
-			*/
-			var i:int;
-			var possibleMatch:Namespace;
-			if(!namespaces)
-				namespaces = [];
-			for(i=0;i<namespaces.length;i++)
-			{
-				if(namespaces[i].uri == _uri)
-				{
-					possibleMatch = namespaces[i];
-					if(namespaces[i].prefix == _prefix)
-						return namespaces[i];
-				}
-			}
-			if(possibleMatch)
-				return possibleMatch;
-			if(!_prefix)
-				return new Namespace(_uri);
-			return new Namespace(_prefix,_uri);
-		}
-
-	}
-}
-
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 93ba2b1..c3f212c 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -183,12 +183,15 @@ package
 			var xml:XML;
 			var i:int;
 			var data:* = node.nodeValue;
+			var qname:QName = new QName(node.namespaceURI,node.nodeName);
+			qname.prefix = node.prefix;
 			switch(node.nodeType)
 			{
 				case 1:
 					//ELEMENT_NODE
 					xml = new XML();
 					xml.setNodeKind("element");
+					xml.setName(qname);
 					iterateElement(node,xml);
 					break;
 				//case 2:break;// ATTRIBUTE_NODE (handled separately)
@@ -196,11 +199,13 @@ package
 					//TEXT_NODE
 					xml = new XML();
 					xml.setNodeKind("text");
+					xml.setName(qname);
 					xml.setValue(data);
 					break;
 				case 4:
 					//CDATA_SECTION_NODE
 					xml = new XML();
+					xml.setName(qname);
 					xml.setNodeKind("text");
 					data = "<![CDATA[" + data + "]]>";
 					xml.setValue(data);
@@ -211,7 +216,7 @@ package
 					//PROCESSING_INSTRUCTION_NODE
 					xml = new XML();
 					xml.setNodeKind("processing-instruction");
-					xml.setName(node.nodeName);
+					xml.setName(qname);
 					xml.setValue(data);
 					break;
 				case 8:
@@ -563,7 +568,7 @@ package
 			*/
 			var i:int;
 			var list:XMLList = new XMLList();
-			if(parseInt(name,10).toString() == propertyName)
+			if(parseInt(propertyName,10).toString() == propertyName)
 			{
 				if(propertyName != "0")
 					return null;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1eec8d8d/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index e57a0fc..34de79a 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -50,7 +50,12 @@ limitations under the License.
                 trace(xml1.toXMLString() == '<foo baz="true"/>');
                 var baz:XMLList = xml1.@baz;
                 trace("baz: " + xml1.@baz.toString() + " //true");
-
+                var child:XML = <pop><child name="Sam"/></pop>;
+                xml1.appendChild(child);
+                child = new XML('<pop><child name="George"/></pop>');
+                xml1.appendChild(child);
+                trace(xml1.pop[0].toString());
+                trace(xml1.pop[1].toString());
             }
 		]]>
 	</fx:Script>


[07/49] git commit: [flex-asjs] [refs/heads/develop] - children() and elements()

Posted by ha...@apache.org.
children() and elements()


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/988296e5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/988296e5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/988296e5

Branch: refs/heads/develop
Commit: 988296e56876807c75b4950b364519f6cff3070f
Parents: 94281ae
Author: Harbs <ha...@in-tools.com>
Authored: Wed Feb 3 23:06:53 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Feb 3 23:06:53 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/XML.as     | 21 ++++++++++++++------
 frameworks/projects/XML/as/src/XMLList.as | 27 ++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/988296e5/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index dc99ff9..8be71e2 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -566,11 +566,8 @@ package
 		{
 			var list:XMLList = new XMLList();
 			for(i=0;i<_children.length;i++)
-			{
-				//TODO filter out non-elements
-				if(propertyName.matches(_children[i].name()))
-					list.append(_children[i]);
-			}
+				list.append(_children[i]);
+
 			list.targetObject = this;
 			return list;
 		}
@@ -682,7 +679,7 @@ package
 		}
 		
 		/**
-		 * Lists the elements of an XML object.
+		 * Lists the elements of an XML object. (handles E4X dot notation)
 		 * 
 		 * @param name
 		 * @return 
@@ -690,6 +687,18 @@ package
 		 */
 		public function elements(name:Object = "*"):XMLList
 		{
+			name = toXMLName(name);
+			var list:XMLList = new XMLList();
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element" && name.matches(_children[i].name()))
+					list.append(_children[i]);
+			}
+
+			list.targetObject = this;
+			list.targetProperty = name;
+			return list;
+
 			return null;
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/988296e5/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
index 9e0d2fb..264ef3c 100644
--- a/frameworks/projects/XML/as/src/XMLList.as
+++ b/frameworks/projects/XML/as/src/XMLList.as
@@ -338,6 +338,33 @@ package
 			}
 			return retVal;
 		}
+
+		public function equals(list:*):Boolean
+		{
+			/*
+				Overview
+				The XMLList type adds the internal [[Equals]] method to the internal properties defined by the Object type.
+				The XMLList [[Equals]] method is used to compare this XMLList object for content equality 
+				with another XMLList object V or determine whether this XMLList object contains a single XML object that compares equal to V. 
+				The [[Equals]] operator returns true if this XMLList object is considered equal to V 
+				or contains only one XML object that is considered equal to V. Otherwise, it returns false. 
+				Empty XMLList objects are considered equal to undefined. 
+				The input argument V may be a value of type XMLList, XML, undefined or any value that can be converted to a String with ToString().
+				
+				Semantics
+				When the [[Equals]] method of an XML object x is called with value V, the following steps are taken:
+				1. If V == undefined and x.[[Length]] == 0, return true
+				2. If Type(V) is XMLList
+				  a. If x.[[Length]] is not equal to V.[[Length]], return false
+				  b. For i = 0 to x.[[Length]]
+				    i. If the result of the comparison x[i] == V[i] is false, return false
+				  c. Return true
+				3. Else if x.[[Length]] == 1
+				  a. Return the result of the comparison x[0] == V
+				4. Return false
+			*/
+			return false;
+		}
 		
 		public function hasComplexContent():Boolean
 		{


[16/49] git commit: [flex-asjs] [refs/heads/develop] - concat and toXMLString

Posted by ha...@apache.org.
concat and toXMLString


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4be10bf8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4be10bf8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4be10bf8

Branch: refs/heads/develop
Commit: 4be10bf8371dd4d89d10477e328b2459d8865de7
Parents: 266cf0b
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 11 10:43:58 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 11 10:43:58 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/XML/as/src/Namespace.as |   2 +-
 frameworks/projects/XML/as/src/XML.as       | 133 ++++++++++++++++++++++-
 frameworks/projects/XML/as/src/XMLList.as   |  11 +-
 3 files changed, 143 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4be10bf8/frameworks/projects/XML/as/src/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/Namespace.as b/frameworks/projects/XML/as/src/Namespace.as
index ab5e56e..95bb405 100644
--- a/frameworks/projects/XML/as/src/Namespace.as
+++ b/frameworks/projects/XML/as/src/Namespace.as
@@ -109,7 +109,7 @@ package
 			_uri = value;
 		}
 		
-		private var _prefix:String;
+		private var _prefix:String = null;
 		public function get prefix():String
 		{
 			return _prefix;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4be10bf8/frameworks/projects/XML/as/src/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XML.as b/frameworks/projects/XML/as/src/XML.as
index b6abbe9..69d94b5 100644
--- a/frameworks/projects/XML/as/src/XML.as
+++ b/frameworks/projects/XML/as/src/XML.as
@@ -225,6 +225,24 @@ package
 			return xml;
 		}
 
+		static private function namespaceInArray(ns:Namespace,arr:Array,considerPrefix:Boolean=true):Boolean
+		{
+			if(!arr)
+				return false;
+			var i:int;
+			for(i=0;i<arr.length;i++)
+			{
+				if(ns.uri == arr[i].uri)
+				{
+					if(!considerPrefix)
+						return true;
+					if(ns.prefix == arr[i].prefix)
+						return true;
+				}
+			}
+			return false;
+		}
+
 		static private function trimXMLWhitespace(value:String):String
 		{
 			return value.replace(/^\s+|\s+$/gm,'');
@@ -599,6 +617,26 @@ package
 			return list;
 		}
 		
+		public function concat(list:*):XMLList
+		{
+			if(list is XML)
+			{
+				var newList:XMLList = new XMLList();
+				newList.appendChild(list);
+				list = newList;
+			}
+			if(!(list is XMLList))
+				throw new TypeError("invalid type");
+
+			var retVal:XMLList = new XMLList();
+			retVal.appendChild(this);
+			var item:XML;
+			for each(item in list)
+				retVal.appendChild(item);
+				
+			return retVal;
+		}
+
 		/**
 		 * Compares the XML object against the given value parameter.
 		 *
@@ -1976,7 +2014,7 @@ package
 		 * @return 
 		 * 
 		 */
-		public function toXMLString(indentLevel:int=0):String
+		public function toXMLString(indentLevel:int=0,ancestors:Array=[]):String
 		{
 			/*
 				Given an XML object x and an optional argument AncestorNamespaces and an optional argument IndentLevel, ToXMLString converts it to an XML encoded string s by taking the following steps:
@@ -2058,6 +2096,7 @@ package
 				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().			
 			*/
 			var i:int;
+			var ns:Namespace;
 			var strArr:Array = [];
 
 			var indentArr:Array = [];
@@ -2086,6 +2125,98 @@ package
 			// We excluded the other types, so it's a normal element
 			//TODO I'm here...
 			// step 8.
+			//ancestors
+			var declarations:Array = [];
+			for(i=0;i<_namespaces.length;i++)
+			{
+				if(!namespaceInArray(_namespaces[i],ancestors))
+					declarations.push(new Namespace(_namespaces[i]));
+			}
+			//11
+			for(i=0;i<_attributes.length)
+			{
+				ns = new Namespace(_attributes[i].name().getNamespace(ancestors.concat(declarations)));
+				if(ns.prefix === null)
+				{
+					ns.prefix = "";
+					declarations.push(ns);
+				}
+			}
+			ns = new Namespace(name().getNamespace(ancestors.concat(declarations)));
+			if(ns.prefix === null)
+			{
+				ns.prefix = "";
+				declarations.push(ns);
+			}
+			strArray.push("<");
+			if(ns.prefix)
+				strArr.push(ns.prefix+":");
+			strArray.push(name().localName);
+
+			//attributes and namespace declarations... (15-16)
+			for(i=0;i<declarations.length;i++)
+			{
+				strArray.push(" xmlns");
+				if(declarations[i].prefix)
+				{
+					strArray.push(":");
+					strArray.push(declarations[i].prefix);
+				}
+				strArray.push('="');
+				strArray.push(escapeAttributeValue(declarations[i].uri));
+				strArray.push('"');
+
+			}
+			for(i=0;i<_attributes.length;i++)
+			{
+				strArray.push(" ");
+				// the following seems to be the spec, but it does not make sense to me.
+				//var ans:Namespace = _attributes[i].name().getNamespace(ancestors);
+				var aName:QName = _attributes[i].name();
+				var ans:Namespace = aName.getNamespace(ancestors.concat(declarations));
+				if(ans.prefix)
+				{
+					strArray.push(ans.prefix);
+					strArray.push(":");
+				}
+				strArray.push(aName.localName);
+				strArray.push('="');
+				strArray.push(escapeAttributeValue(_attributes[i].getValue()));
+				strArray.push('"');
+			}
+			// now write elements or close the tag if none exist
+			if(_children.length == 0)
+			{
+				strArray.push("/>");
+				return strArray.join("");
+			}
+			strArray.push(">");
+			var indentChildren:Boolean = _children.length > 1 || (_children.length == 1 && _children[0].nodeKind() != "text");
+			var nextIndentLevel:int;
+			if(XML.prettyPrinting && indentChildren)
+				nextIndentLevel = indentLevel + prettyIndent;
+			else
+				nextIndentLevel = 0;
+			for(i=0;i<_children.length;i++)
+			{
+				//
+				if(XML.prettyPrinting && indentChildren)
+					strArray.push("\n");
+				strArray.push(_children[i].toXMLString(nextIndentLevel,ancestors.concat(declarations)));
+			}
+			if(XML.prettyPrinting && indentChildren)
+			{
+				strArray.push("\n");
+				strArray.push(new Array(indentLevel + 1).join(' '));
+			}
+			strArray.push("</");
+			if(ns.prefix)
+			{
+				strArray.push(ns.prefix);
+				strArray.push(":");
+			}
+			strArray.push(ns.localName);
+			strArray.push(">");
 
 			return strArray.join("");
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4be10bf8/frameworks/projects/XML/as/src/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/as/src/XMLList.as b/frameworks/projects/XML/as/src/XMLList.as
index 264ef3c..e34b765 100644
--- a/frameworks/projects/XML/as/src/XMLList.as
+++ b/frameworks/projects/XML/as/src/XMLList.as
@@ -254,8 +254,17 @@ package
 			return retVal;
 		}
 		
-		public function concat(list:XMLList):XMLList
+		public function concat(list:*):XMLList
 		{
+			if(list is XML)
+			{
+				var newList:XMLList = new XMLList();
+				newList.appendChild(list);
+				list = newList;
+			}
+			if(!(list is XMLList))
+				throw new TypeError("invalid type");
+
 			var retVal:XMLList = this.copy();
 			var item:XML;
 			for each(item in list)


[17/49] git commit: [flex-asjs] [refs/heads/develop] - Merge branch 'develop' into e4x

Posted by ha...@apache.org.
Merge branch 'develop' into e4x

* develop: (76 commits)
  Added JavaScript version of MobileWebBrowser so it could be used with Cordova/PhoneGap.
  Fixed JS version of WebBrowser to intercept correct location change events and dispatch proper FlexJS event.
  Added WebBrowser component. For SWF, it uses HTMLLoader. For JS, it uses iFrame. In the Mobile project, a special view bead uses StageWebView.
  get ant building to work
  get ant building to work
  attempt to manually inject ASJS Ant Builders
  make sure GoogleMaps doesn't accidentally use an older GoogleMaps.swc
  put paths to externs swcs in a variable so it can be controlled by FB
  change output folder
  fix up more project files
  fix asdoc
  move these too
  fix up FB projects
  fix up config files
  need to move these
  fix scripts after folder change
  new folders for reflection
  fix scripts after folder changes
  new folders for Network
  fix scripts after folder changes
  ...

Conflicts:
	frameworks/projects/Effects/.actionScriptProperties


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/28776397
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/28776397
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/28776397

Branch: refs/heads/develop
Commit: 287763970664d45258a587950de3edad63788685
Parents: 4be10bf 4d0f00f
Author: Harbs <ha...@in-tools.com>
Authored: Thu Feb 11 11:10:08 2016 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Feb 11 11:10:08 2016 +0200

----------------------------------------------------------------------
 asdoc/build.xml                                 |    2 +-
 build.xml                                       |  122 +-
 examples/build_example.xml                      |   12 +
 .../flexjs/ChartExample/src/MyInitialView.mxml  |    2 +-
 examples/flexjs/DataBindingExample/build.xml    |    1 +
 .../flexjs/DataBindingExample_Flat/build.xml    |    1 +
 examples/flexjs/DataBindingExample_as/build.xml |    1 +
 examples/flexjs/DesktopMap/DesktopMap-app.xml   |    6 +-
 examples/flexjs/DesktopMap/build.xml            |    5 +-
 examples/flexjs/FlexJSStore/build.xml           |    1 +
 .../src/productsView/CatalogTitleButtons.mxml   |    8 +-
 .../productsView/ProductCatalogThumbnail.mxml   |    2 +-
 examples/flexjs/FlexJSStore_jquery/build.xml    |    1 +
 examples/flexjs/MapSearch/build.xml             |    2 +-
 examples/flexjs/MobileTrader/build.xml          |    1 +
 .../flexjs/MobileTrader/src/MyInitialView.mxml  |    2 +-
 .../flexjs/MobileTrader/src/models/Asset.as     |   77 +
 .../MobileTrader/src/models/AssetsModel.as      |   18 +-
 examples/flexjs/TodoListSampleApp/build.xml     |    3 +-
 frameworks/air-config-template.xml              |   90 +-
 frameworks/air-config.xml                       |   90 +-
 frameworks/asdoc-config.xml                     |  104 +-
 frameworks/build.xml                            |    6 +
 frameworks/fb.properties                        |    5 +
 frameworks/flex-config-template.xml             |  125 +-
 frameworks/flex-config.xml                      |  125 +-
 .../projects/Binding/.actionScriptProperties    |   38 +-
 .../.externalToolBuilders/BindingASJS.launch    |   44 +
 frameworks/projects/Binding/.flexLibProperties  |   18 +
 frameworks/projects/Binding/.project            |   35 +-
 .../projects/Binding/as/src/BindingClasses.as   |   34 -
 .../flex/binding/ApplicationDataBinding.as      |  338 ----
 .../src/org/apache/flex/binding/ChainBinding.as |  215 ---
 .../org/apache/flex/binding/ConstantBinding.as  |  195 --
 .../apache/flex/binding/ContainerDataBinding.as |  384 ----
 .../org/apache/flex/binding/GenericBinding.as   |  232 ---
 .../flex/binding/MXMLBeadViewBaseDataBinding.as |  333 ----
 .../org/apache/flex/binding/PropertyWatcher.as  |  229 ---
 .../org/apache/flex/binding/SimpleBinding.as    |  206 ---
 .../apache/flex/binding/ViewBaseDataBinding.as  |  329 ----
 .../src/org/apache/flex/binding/WatcherBase.as  |  339 ----
 frameworks/projects/Binding/basic-manifest.xml  |   31 -
 frameworks/projects/Binding/build.xml           |   39 +-
 .../projects/Binding/compile-asjs-config.xml    |   79 -
 frameworks/projects/Binding/compile-config.xml  |   78 -
 .../Binding/src/main/flex/BindingClasses.as     |   34 +
 .../flex/binding/ApplicationDataBinding.as      |  338 ++++
 .../org/apache/flex/binding/ChainBinding.as     |  215 +++
 .../org/apache/flex/binding/ConstantBinding.as  |  195 ++
 .../apache/flex/binding/ContainerDataBinding.as |  384 ++++
 .../org/apache/flex/binding/GenericBinding.as   |  232 +++
 .../flex/binding/MXMLBeadViewBaseDataBinding.as |  333 ++++
 .../org/apache/flex/binding/PropertyWatcher.as  |  229 +++
 .../org/apache/flex/binding/SimpleBinding.as    |  206 +++
 .../apache/flex/binding/ViewBaseDataBinding.as  |  329 ++++
 .../flex/org/apache/flex/binding/WatcherBase.as |  339 ++++
 .../src/main/resources/basic-manifest.xml       |   31 +
 .../src/main/resources/compile-asjs-config.xml  |   79 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/Charts/.actionScriptProperties     |   42 +-
 .../.externalToolBuilders/ChartsASJS.launch     |   44 +
 frameworks/projects/Charts/.flexLibProperties   |   18 +
 frameworks/projects/Charts/.project             |   37 +-
 frameworks/projects/Charts/as/defaults.css      |  108 --
 .../projects/Charts/as/src/ChartsClasses.as     |   75 -
 .../as/src/org/apache/flex/charts/BarChart.as   |   49 -
 .../src/org/apache/flex/charts/ColumnChart.as   |   48 -
 .../as/src/org/apache/flex/charts/LineChart.as  |   48 -
 .../as/src/org/apache/flex/charts/PieChart.as   |   47 -
 .../org/apache/flex/charts/StackedBarChart.as   |   48 -
 .../apache/flex/charts/StackedColumnChart.as    |   48 -
 .../apache/flex/charts/beads/AxisBaseBead.as    |  246 ---
 .../charts/beads/ChartItemRendererFactory.as    |  155 --
 .../org/apache/flex/charts/beads/ChartView.as   |  174 --
 .../DataItemRendererFactoryForSeriesData.as     |  131 --
 .../org/apache/flex/charts/beads/DataTipBead.as |  162 --
 .../charts/beads/HorizontalCategoryAxisBead.as  |  191 --
 .../charts/beads/HorizontalLinearAxisBead.as    |  246 ---
 .../charts/beads/VerticalCategoryAxisBead.as    |  198 --
 .../flex/charts/beads/VerticalLinearAxisBead.as |  236 ---
 .../flex/charts/beads/layouts/BarChartLayout.as |  149 --
 .../charts/beads/layouts/ChartBaseLayout.as     |  147 --
 .../charts/beads/layouts/ColumnChartLayout.as   |  140 --
 .../layouts/LineChartCategoryVsLinearLayout.as  |  152 --
 .../layouts/LineChartLinearVsLinearLayout.as    |  166 --
 .../flex/charts/beads/layouts/PieChartLayout.as |  140 --
 .../beads/layouts/StackedBarChartLayout.as      |  164 --
 .../beads/layouts/StackedColumnChartLayout.as   |  161 --
 .../apache/flex/charts/core/CartesianChart.as   |   85 -
 .../org/apache/flex/charts/core/ChartBase.as    |   77 -
 .../org/apache/flex/charts/core/IAxisBead.as    |   58 -
 .../org/apache/flex/charts/core/IAxisGroup.as   |   42 -
 .../flex/charts/core/ICartesianChartLayout.as   |   34 -
 .../src/org/apache/flex/charts/core/IChart.as   |   48 -
 .../apache/flex/charts/core/IChartDataGroup.as  |   55 -
 .../flex/charts/core/IChartItemRenderer.as      |  116 --
 .../org/apache/flex/charts/core/IChartSeries.as |   69 -
 .../flex/charts/core/IConnectedItemRenderer.as  |   55 -
 .../flex/charts/core/IHorizontalAxisBead.as     |   65 -
 .../flex/charts/core/IVerticalAxisBead.as       |   65 -
 .../org/apache/flex/charts/core/PolarChart.as   |   66 -
 .../flex/charts/optimized/SVGBoxItemRenderer.as |  166 --
 .../flex/charts/optimized/SVGChartAxisGroup.as  |  142 --
 .../flex/charts/optimized/SVGChartDataGroup.as  |  192 --
 .../optimized/SVGLineSegmentItemRenderer.as     |  205 ---
 .../charts/optimized/SVGWedgeItemRenderer.as    |  281 ---
 .../flex/charts/supportClasses/BarSeries.as     |  103 --
 .../charts/supportClasses/BoxItemRenderer.as    |  268 ---
 .../charts/supportClasses/ChartAxisGroup.as     |  182 --
 .../charts/supportClasses/ChartDataGroup.as     |  100 -
 .../flex/charts/supportClasses/ColumnSeries.as  |   93 -
 .../supportClasses/ILineSegmentItemRenderer.as  |   57 -
 .../charts/supportClasses/IWedgeItemRenderer.as |  113 --
 .../supportClasses/LineSegmentItemRenderer.as   |  198 --
 .../flex/charts/supportClasses/LineSeries.as    |  114 --
 .../flex/charts/supportClasses/PieSeries.as     |   85 -
 .../charts/supportClasses/WedgeItemRenderer.as  |  272 ---
 frameworks/projects/Charts/basic-manifest.xml   |   50 -
 frameworks/projects/Charts/build.xml            |   39 +-
 .../projects/Charts/compile-as-to-js-config.xml |   76 -
 .../projects/Charts/compile-asjs-config.xml     |   71 -
 frameworks/projects/Charts/compile-config.xml   |   84 -
 .../projects/Charts/compile-js-config.xml       |   87 -
 .../Charts/src/main/flex/ChartsClasses.as       |   75 +
 .../flex/org/apache/flex/charts/BarChart.as     |   49 +
 .../flex/org/apache/flex/charts/ColumnChart.as  |   48 +
 .../flex/org/apache/flex/charts/LineChart.as    |   48 +
 .../flex/org/apache/flex/charts/PieChart.as     |   47 +
 .../org/apache/flex/charts/StackedBarChart.as   |   48 +
 .../apache/flex/charts/StackedColumnChart.as    |   48 +
 .../apache/flex/charts/beads/AxisBaseBead.as    |  246 +++
 .../charts/beads/ChartItemRendererFactory.as    |  155 ++
 .../org/apache/flex/charts/beads/ChartView.as   |  174 ++
 .../DataItemRendererFactoryForSeriesData.as     |  131 ++
 .../org/apache/flex/charts/beads/DataTipBead.as |  162 ++
 .../charts/beads/HorizontalCategoryAxisBead.as  |  191 ++
 .../charts/beads/HorizontalLinearAxisBead.as    |  246 +++
 .../charts/beads/VerticalCategoryAxisBead.as    |  198 ++
 .../flex/charts/beads/VerticalLinearAxisBead.as |  236 +++
 .../flex/charts/beads/layouts/BarChartLayout.as |  149 ++
 .../charts/beads/layouts/ChartBaseLayout.as     |  147 ++
 .../charts/beads/layouts/ColumnChartLayout.as   |  140 ++
 .../layouts/LineChartCategoryVsLinearLayout.as  |  152 ++
 .../layouts/LineChartLinearVsLinearLayout.as    |  166 ++
 .../flex/charts/beads/layouts/PieChartLayout.as |  140 ++
 .../beads/layouts/StackedBarChartLayout.as      |  164 ++
 .../beads/layouts/StackedColumnChartLayout.as   |  161 ++
 .../apache/flex/charts/core/CartesianChart.as   |   85 +
 .../org/apache/flex/charts/core/ChartBase.as    |   77 +
 .../org/apache/flex/charts/core/IAxisBead.as    |   58 +
 .../org/apache/flex/charts/core/IAxisGroup.as   |   42 +
 .../flex/charts/core/ICartesianChartLayout.as   |   34 +
 .../flex/org/apache/flex/charts/core/IChart.as  |   48 +
 .../apache/flex/charts/core/IChartDataGroup.as  |   55 +
 .../flex/charts/core/IChartItemRenderer.as      |  116 ++
 .../org/apache/flex/charts/core/IChartSeries.as |   69 +
 .../flex/charts/core/IConnectedItemRenderer.as  |   55 +
 .../flex/charts/core/IHorizontalAxisBead.as     |   65 +
 .../flex/charts/core/IVerticalAxisBead.as       |   65 +
 .../org/apache/flex/charts/core/PolarChart.as   |   66 +
 .../flex/charts/optimized/SVGBoxItemRenderer.as |  166 ++
 .../flex/charts/optimized/SVGChartAxisGroup.as  |  142 ++
 .../flex/charts/optimized/SVGChartDataGroup.as  |  192 ++
 .../optimized/SVGLineSegmentItemRenderer.as     |  205 +++
 .../charts/optimized/SVGWedgeItemRenderer.as    |  281 +++
 .../flex/charts/supportClasses/BarSeries.as     |  103 ++
 .../charts/supportClasses/BoxItemRenderer.as    |  268 +++
 .../charts/supportClasses/ChartAxisGroup.as     |  182 ++
 .../charts/supportClasses/ChartDataGroup.as     |  100 +
 .../flex/charts/supportClasses/ColumnSeries.as  |   93 +
 .../supportClasses/ILineSegmentItemRenderer.as  |   57 +
 .../charts/supportClasses/IWedgeItemRenderer.as |  113 ++
 .../supportClasses/LineSegmentItemRenderer.as   |  198 ++
 .../flex/charts/supportClasses/LineSeries.as    |  114 ++
 .../flex/charts/supportClasses/PieSeries.as     |   85 +
 .../charts/supportClasses/WedgeItemRenderer.as  |  272 +++
 .../src/main/resources/basic-manifest.xml       |   50 +
 .../main/resources/compile-as-to-js-config.xml  |   76 +
 .../src/main/resources/compile-asjs-config.xml  |   71 +
 .../src/main/resources/compile-config.xml       |   84 +
 .../src/main/resources/compile-js-config.xml    |   87 +
 .../Charts/src/main/resources/defaults.css      |  108 ++
 .../Collections/.actionScriptProperties         |   38 +-
 .../CollectionsASJS.launch                      |   44 +
 .../projects/Collections/.flexLibProperties     |   18 +
 frameworks/projects/Collections/.project        |   35 +-
 .../Collections/as/src/CollectionsClasses.as    |   35 -
 .../org/apache/flex/collections/ArrayList.as    |  396 ----
 .../org/apache/flex/collections/ICollection.as  |   43 -
 .../flex/collections/IStringCollection.as       |   43 -
 .../apache/flex/collections/LazyCollection.as   |  267 ---
 .../collections/converters/IItemConverter.as    |   49 -
 .../collections/converters/JSONItemConverter.as |   74 -
 .../flex/collections/parsers/IInputParser.as    |   50 -
 .../flex/collections/parsers/JSONInputParser.as |   54 -
 .../projects/Collections/basic-manifest.xml     |   29 -
 frameworks/projects/Collections/build.xml       |   65 +-
 .../Collections/compile-asjs-config.xml         |   69 -
 .../projects/Collections/compile-config.xml     |   78 -
 .../src/main/flex/CollectionsClasses.as         |   35 +
 .../org/apache/flex/collections/ArrayList.as    |  396 ++++
 .../org/apache/flex/collections/ICollection.as  |   43 +
 .../flex/collections/IStringCollection.as       |   43 +
 .../apache/flex/collections/LazyCollection.as   |  267 +++
 .../collections/converters/IItemConverter.as    |   49 +
 .../collections/converters/JSONItemConverter.as |   74 +
 .../flex/collections/parsers/IInputParser.as    |   50 +
 .../flex/collections/parsers/JSONInputParser.as |   54 +
 .../src/main/resources/basic-manifest.xml       |   29 +
 .../src/main/resources/compile-asjs-config.xml  |   69 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/Core/.actionScriptProperties       |   36 +-
 .../Core/.externalToolBuilders/CoreASJS.launch  |   44 +
 frameworks/projects/Core/.flexLibProperties     |   18 +
 frameworks/projects/Core/.project               |   34 +-
 frameworks/projects/Core/as/src/CoreClasses.as  |  152 --
 .../projects/Core/as/src/CoreJSClasses.as       |   99 -
 .../as/src/org/apache/flex/core/Application.as  |  602 ------
 .../src/org/apache/flex/core/ApplicationBase.as |  110 --
 .../as/src/org/apache/flex/core/BeadViewBase.as |   97 -
 .../org/apache/flex/core/BindableCSSStyles.as   |  134 --
 .../apache/flex/core/BrowserResizeListener.as   |  138 --
 .../src/org/apache/flex/core/BrowserScroller.as |   89 -
 .../src/org/apache/flex/core/BrowserWindow.as   |   61 -
 .../src/org/apache/flex/core/CSSFontFaceBead.as |  160 --
 .../as/src/org/apache/flex/core/CSSShape.as     |  163 --
 .../as/src/org/apache/flex/core/CSSSprite.as    |  163 --
 .../as/src/org/apache/flex/core/CSSTextField.as |  163 --
 .../src/org/apache/flex/core/CallLaterBead.as   |  128 --
 .../as/src/org/apache/flex/core/ClassFactory.as |   90 -
 .../src/org/apache/flex/core/ContainerBase.as   |  437 -----
 .../flex/core/ContainerBaseStrandChildren.as    |   98 -
 .../src/org/apache/flex/core/DataBindingBase.as |   45 -
 .../src/org/apache/flex/core/FilledRectangle.as |  125 --
 .../org/apache/flex/core/HTMLElementWrapper.as  |  247 ---
 .../as/src/org/apache/flex/core/IAlertModel.as  |  135 --
 .../org/apache/flex/core/IApplicationView.as    |   45 -
 .../Core/as/src/org/apache/flex/core/IBead.as   |   47 -
 .../src/org/apache/flex/core/IBeadController.as |   37 -
 .../as/src/org/apache/flex/core/IBeadLayout.as  |   40 -
 .../as/src/org/apache/flex/core/IBeadModel.as   |   39 -
 .../as/src/org/apache/flex/core/IBeadView.as    |   46 -
 .../as/src/org/apache/flex/core/IBorderModel.as |   46 -
 .../Core/as/src/org/apache/flex/core/IChild.as  |   59 -
 .../Core/as/src/org/apache/flex/core/IChrome.as |   37 -
 .../src/org/apache/flex/core/IComboBoxModel.as  |  108 --
 .../as/src/org/apache/flex/core/IContainer.as   |   47 -
 .../src/org/apache/flex/core/IContainerView.as  |   33 -
 .../as/src/org/apache/flex/core/IContentView.as |   38 -
 .../org/apache/flex/core/IContentViewHost.as    |   35 -
 .../src/org/apache/flex/core/IDataGridModel.as  |   44 -
 .../flex/core/IDataGridPresentationModel.as     |   45 -
 .../core/IDataProviderItemRendererMapper.as     |   52 -
 .../org/apache/flex/core/IDateChooserModel.as   |  101 --
 .../as/src/org/apache/flex/core/IDocument.as    |   48 -
 .../src/org/apache/flex/core/IDragInitiator.as  |   67 -
 .../as/src/org/apache/flex/core/IEffectTimer.as |   68 -
 .../as/src/org/apache/flex/core/IFactory.as     |   46 -
 .../as/src/org/apache/flex/core/IFlexInfo.as    |   43 -
 .../src/org/apache/flex/core/IFlexJSElement.as  |   27 -
 .../as/src/org/apache/flex/core/IFormatBead.as  |   69 -
 .../as/src/org/apache/flex/core/IImageModel.as  |   48 -
 .../src/org/apache/flex/core/IItemRenderer.as   |   57 -
 .../flex/core/IItemRendererClassFactory.as      |   60 -
 .../org/apache/flex/core/IItemRendererParent.as |   52 -
 .../apache/flex/core/IItemRendererProvider.as   |   58 -
 .../as/src/org/apache/flex/core/ILayoutChild.as |  175 --
 .../as/src/org/apache/flex/core/ILayoutHost.as  |   44 -
 .../apache/flex/core/IListPresentationModel.as  |   54 -
 .../src/org/apache/flex/core/IMXMLDocument.as   |   66 -
 .../org/apache/flex/core/IMeasurementBead.as    |   53 -
 .../as/src/org/apache/flex/core/IPanelModel.as  |   45 -
 .../Core/as/src/org/apache/flex/core/IParent.as |  109 --
 .../src/org/apache/flex/core/IParentIUIBase.as  |   37 -
 .../Core/as/src/org/apache/flex/core/IPopUp.as  |   33 -
 .../as/src/org/apache/flex/core/IPopUpHost.as   |   33 -
 .../as/src/org/apache/flex/core/IRangeModel.as  |   95 -
 .../src/org/apache/flex/core/IRollOverModel.as  |   46 -
 .../src/org/apache/flex/core/IScrollBarModel.as |   58 -
 .../apache/flex/core/ISelectableItemRenderer.as |   95 -
 .../src/org/apache/flex/core/ISelectionModel.as |  100 -
 .../as/src/org/apache/flex/core/IStatesImpl.as  |   37 -
 .../src/org/apache/flex/core/IStatesObject.as   |   74 -
 .../Core/as/src/org/apache/flex/core/IStrand.as |   77 -
 .../org/apache/flex/core/IStrandWithModel.as    |   50 -
 .../as/src/org/apache/flex/core/IStyleObject.as |   45 -
 .../org/apache/flex/core/IStyleableObject.as    |   71 -
 .../as/src/org/apache/flex/core/ITextModel.as   |   56 -
 .../src/org/apache/flex/core/ITitleBarModel.as  |   73 -
 .../org/apache/flex/core/IToggleButtonModel.as  |   67 -
 .../Core/as/src/org/apache/flex/core/IUIBase.as |  160 --
 .../apache/flex/core/IValueToggleButtonModel.as |   69 -
 .../as/src/org/apache/flex/core/IValuesImpl.as  |  153 --
 .../as/src/org/apache/flex/core/IViewport.as    |   80 -
 .../src/org/apache/flex/core/IViewportModel.as  |   50 -
 .../org/apache/flex/core/IViewportScroller.as   |   36 -
 .../flex/core/ItemRendererClassFactory.as       |  194 --
 .../as/src/org/apache/flex/core/ListBase.as     |  120 --
 .../apache/flex/core/ListBaseStrandChildren.as  |   99 -
 .../org/apache/flex/core/MXMLDragInitiator.as   |  131 --
 .../org/apache/flex/core/ParentDocumentBead.as  |  127 --
 .../org/apache/flex/core/SimpleApplication.as   |   89 -
 .../src/org/apache/flex/core/SimpleCSSStyles.as |  106 --
 .../org/apache/flex/core/SimpleCSSValuesImpl.as |  765 --------
 .../org/apache/flex/core/SimpleStatesImpl.as    |  222 ---
 .../org/apache/flex/core/SimpleValuesImpl.as    |  188 --
 .../as/src/org/apache/flex/core/StageProxy.as   |  127 --
 .../Core/as/src/org/apache/flex/core/Strand.as  |  182 --
 .../apache/flex/core/StyleableCSSTextField.as   |  201 --
 .../Core/as/src/org/apache/flex/core/UIBase.as  | 1483 ---------------
 .../as/src/org/apache/flex/core/UIButtonBase.as |  860 ---------
 .../src/org/apache/flex/core/ValuesManager.as   |   72 -
 .../as/src/org/apache/flex/core/ViewBase.as     |   98 -
 .../org/apache/flex/core/WrappedHTMLElement.as  |   21 -
 .../src/org/apache/flex/events/BrowserEvent.as  |  475 -----
 .../src/org/apache/flex/events/CustomEvent.as   |   64 -
 .../src/org/apache/flex/events/ElementEvents.as |   51 -
 .../Core/as/src/org/apache/flex/events/Event.as |  128 --
 .../org/apache/flex/events/EventDispatcher.as   |   66 -
 .../org/apache/flex/events/IEventDispatcher.as  |   49 -
 .../as/src/org/apache/flex/events/MouseEvent.as |  290 ---
 .../org/apache/flex/events/ValueChangeEvent.as  |  129 --
 .../as/src/org/apache/flex/events/ValueEvent.as |   68 -
 .../flex/events/utils/MouseEventConverter.as    |  166 --
 .../org/apache/flex/events/utils/MouseUtils.as  |  103 --
 .../Core/as/src/org/apache/flex/geom/Point.as   |   72 -
 .../as/src/org/apache/flex/geom/Rectangle.as    |   95 -
 .../Core/as/src/org/apache/flex/geom/Size.as    |   41 -
 .../as/src/org/apache/flex/states/AddItems.as   |  101 --
 .../org/apache/flex/states/ItemAndDescriptor.as |   70 -
 .../org/apache/flex/states/SetEventHandler.as   |   79 -
 .../src/org/apache/flex/states/SetProperty.as   |   81 -
 .../Core/as/src/org/apache/flex/states/State.as |   83 -
 .../as/src/org/apache/flex/utils/BinaryData.as  |  391 ----
 .../src/org/apache/flex/utils/CSSBorderUtils.as |  219 ---
 .../org/apache/flex/utils/CSSContainerUtils.as  |  194 --
 .../as/src/org/apache/flex/utils/CSSUtils.as    |  328 ----
 .../as/src/org/apache/flex/utils/EffectTimer.as |  136 --
 .../as/src/org/apache/flex/utils/Language.as    |  357 ----
 .../apache/flex/utils/MXMLDataInterpreter.as    |  463 -----
 .../src/org/apache/flex/utils/MixinManager.as   |  105 --
 .../as/src/org/apache/flex/utils/PNGEncoder.as  |  305 ----
 .../as/src/org/apache/flex/utils/PointUtils.as  |  125 --
 .../org/apache/flex/utils/SolidBorderUtil.as    |  191 --
 .../src/org/apache/flex/utils/StringTrimmer.as  |  176 --
 .../Core/as/src/org/apache/flex/utils/Timer.as  |  148 --
 .../as/src/org/apache/flex/utils/UIUtils.as     |  107 --
 .../flex/utils/ViewSourceContextMenuOption.as   |   97 -
 .../org/apache/flex/utils/dbg/DOMPathUtil.as    |   95 -
 .../as/tests/FlexUnitFlexJSApplication.mxml     |   46 -
 frameworks/projects/Core/as/tests/build.xml     |  165 --
 .../Core/as/tests/flexUnitTests/StrandTester.as |   27 -
 .../as/tests/flexUnitTests/StrandTesterTest.as  |   55 -
 frameworks/projects/Core/basic-manifest.xml     |   41 -
 frameworks/projects/Core/build.xml              |   45 +-
 .../projects/Core/compile-as-to-js-config.xml   |   77 -
 .../projects/Core/compile-asjs-config.xml       |   78 -
 frameworks/projects/Core/compile-config.xml     |   83 -
 frameworks/projects/Core/compile-js-config.xml  |   87 -
 .../projects/Core/src/main/flex/CoreClasses.as  |  150 ++
 .../Core/src/main/flex/CoreJSClasses.as         |   99 +
 .../flex/org/apache/flex/core/Application.as    |  602 ++++++
 .../org/apache/flex/core/ApplicationBase.as     |  110 ++
 .../flex/org/apache/flex/core/BeadViewBase.as   |   97 +
 .../org/apache/flex/core/BindableCSSStyles.as   |  134 ++
 .../apache/flex/core/BrowserResizeListener.as   |  138 ++
 .../org/apache/flex/core/BrowserScroller.as     |   89 +
 .../flex/org/apache/flex/core/BrowserWindow.as  |   61 +
 .../org/apache/flex/core/CSSFontFaceBead.as     |  160 ++
 .../main/flex/org/apache/flex/core/CSSShape.as  |  163 ++
 .../main/flex/org/apache/flex/core/CSSSprite.as |  163 ++
 .../flex/org/apache/flex/core/CSSTextField.as   |  163 ++
 .../flex/org/apache/flex/core/CallLaterBead.as  |  128 ++
 .../flex/org/apache/flex/core/ClassFactory.as   |   90 +
 .../flex/org/apache/flex/core/ContainerBase.as  |  443 +++++
 .../flex/core/ContainerBaseStrandChildren.as    |   99 +
 .../org/apache/flex/core/DataBindingBase.as     |   45 +
 .../org/apache/flex/core/FilledRectangle.as     |  125 ++
 .../org/apache/flex/core/HTMLElementWrapper.as  |  247 +++
 .../flex/org/apache/flex/core/IAlertModel.as    |  135 ++
 .../org/apache/flex/core/IApplicationView.as    |   45 +
 .../src/main/flex/org/apache/flex/core/IBead.as |   47 +
 .../org/apache/flex/core/IBeadController.as     |   37 +
 .../flex/org/apache/flex/core/IBeadLayout.as    |   40 +
 .../flex/org/apache/flex/core/IBeadModel.as     |   39 +
 .../main/flex/org/apache/flex/core/IBeadView.as |   46 +
 .../flex/org/apache/flex/core/IBorderModel.as   |   46 +
 .../main/flex/org/apache/flex/core/IChild.as    |   59 +
 .../main/flex/org/apache/flex/core/IChrome.as   |   37 +
 .../flex/org/apache/flex/core/IComboBoxModel.as |  108 ++
 .../flex/org/apache/flex/core/IContainer.as     |   47 +
 .../flex/org/apache/flex/core/IContainerView.as |   33 +
 .../flex/org/apache/flex/core/IContentView.as   |   38 +
 .../org/apache/flex/core/IContentViewHost.as    |   35 +
 .../flex/org/apache/flex/core/IDataGridModel.as |   44 +
 .../flex/core/IDataGridPresentationModel.as     |   45 +
 .../core/IDataProviderItemRendererMapper.as     |   52 +
 .../org/apache/flex/core/IDateChooserModel.as   |  101 ++
 .../main/flex/org/apache/flex/core/IDocument.as |   48 +
 .../flex/org/apache/flex/core/IDragInitiator.as |   67 +
 .../flex/org/apache/flex/core/IEffectTimer.as   |   68 +
 .../main/flex/org/apache/flex/core/IFactory.as  |   46 +
 .../main/flex/org/apache/flex/core/IFlexInfo.as |   43 +
 .../flex/org/apache/flex/core/IFlexJSElement.as |   27 +
 .../flex/org/apache/flex/core/IFormatBead.as    |   69 +
 .../flex/org/apache/flex/core/IImageModel.as    |   48 +
 .../flex/org/apache/flex/core/IItemRenderer.as  |   57 +
 .../flex/core/IItemRendererClassFactory.as      |   60 +
 .../org/apache/flex/core/IItemRendererParent.as |   52 +
 .../apache/flex/core/IItemRendererProvider.as   |   58 +
 .../flex/org/apache/flex/core/ILayoutChild.as   |  175 ++
 .../flex/org/apache/flex/core/ILayoutHost.as    |   44 +
 .../apache/flex/core/IListPresentationModel.as  |   54 +
 .../flex/org/apache/flex/core/IMXMLDocument.as  |   66 +
 .../org/apache/flex/core/IMeasurementBead.as    |   53 +
 .../flex/org/apache/flex/core/IPanelModel.as    |   45 +
 .../main/flex/org/apache/flex/core/IParent.as   |  109 ++
 .../flex/org/apache/flex/core/IParentIUIBase.as |   37 +
 .../main/flex/org/apache/flex/core/IPopUp.as    |   33 +
 .../flex/org/apache/flex/core/IPopUpHost.as     |   33 +
 .../flex/org/apache/flex/core/IRangeModel.as    |   95 +
 .../flex/org/apache/flex/core/IRollOverModel.as |   46 +
 .../org/apache/flex/core/IScrollBarModel.as     |   58 +
 .../apache/flex/core/ISelectableItemRenderer.as |   95 +
 .../org/apache/flex/core/ISelectionModel.as     |  100 +
 .../flex/org/apache/flex/core/IStatesImpl.as    |   37 +
 .../flex/org/apache/flex/core/IStatesObject.as  |   74 +
 .../main/flex/org/apache/flex/core/IStrand.as   |   77 +
 .../org/apache/flex/core/IStrandWithModel.as    |   50 +
 .../flex/org/apache/flex/core/IStyleObject.as   |   45 +
 .../org/apache/flex/core/IStyleableObject.as    |   71 +
 .../flex/org/apache/flex/core/ITextModel.as     |   56 +
 .../flex/org/apache/flex/core/ITitleBarModel.as |   73 +
 .../org/apache/flex/core/IToggleButtonModel.as  |   67 +
 .../main/flex/org/apache/flex/core/IUIBase.as   |  160 ++
 .../apache/flex/core/IValueToggleButtonModel.as |   69 +
 .../flex/org/apache/flex/core/IValuesImpl.as    |  153 ++
 .../main/flex/org/apache/flex/core/IViewport.as |   80 +
 .../flex/org/apache/flex/core/IViewportModel.as |   50 +
 .../org/apache/flex/core/IViewportScroller.as   |   36 +
 .../flex/core/ItemRendererClassFactory.as       |  194 ++
 .../main/flex/org/apache/flex/core/ListBase.as  |  126 ++
 .../apache/flex/core/ListBaseStrandChildren.as  |  100 +
 .../org/apache/flex/core/MXMLDragInitiator.as   |  131 ++
 .../org/apache/flex/core/ParentDocumentBead.as  |  127 ++
 .../org/apache/flex/core/SimpleApplication.as   |  102 ++
 .../org/apache/flex/core/SimpleCSSStyles.as     |  106 ++
 .../org/apache/flex/core/SimpleCSSValuesImpl.as |  765 ++++++++
 .../org/apache/flex/core/SimpleStatesImpl.as    |  222 +++
 .../org/apache/flex/core/SimpleValuesImpl.as    |  188 ++
 .../flex/org/apache/flex/core/StageProxy.as     |  127 ++
 .../main/flex/org/apache/flex/core/Strand.as    |  182 ++
 .../apache/flex/core/StyleableCSSTextField.as   |  201 ++
 .../main/flex/org/apache/flex/core/UIBase.as    | 1483 +++++++++++++++
 .../flex/org/apache/flex/core/UIButtonBase.as   |  860 +++++++++
 .../flex/org/apache/flex/core/ValuesManager.as  |   72 +
 .../main/flex/org/apache/flex/core/ViewBase.as  |   98 +
 .../org/apache/flex/core/WrappedHTMLElement.as  |   21 +
 .../flex/org/apache/flex/events/BrowserEvent.as |  475 +++++
 .../flex/org/apache/flex/events/CustomEvent.as  |   64 +
 .../org/apache/flex/events/ElementEvents.as     |   51 +
 .../main/flex/org/apache/flex/events/Event.as   |  133 ++
 .../org/apache/flex/events/EventDispatcher.as   |   66 +
 .../org/apache/flex/events/IEventDispatcher.as  |   49 +
 .../flex/org/apache/flex/events/MouseEvent.as   |  366 ++++
 .../org/apache/flex/events/ValueChangeEvent.as  |  129 ++
 .../flex/org/apache/flex/events/ValueEvent.as   |   68 +
 .../flex/events/utils/IHandlesOriginalEvent.as  |   35 +
 .../flex/events/utils/MouseEventConverter.as    |  173 ++
 .../org/apache/flex/events/utils/MouseUtils.as  |  103 ++
 .../src/main/flex/org/apache/flex/geom/Point.as |   72 +
 .../main/flex/org/apache/flex/geom/Rectangle.as |   95 +
 .../src/main/flex/org/apache/flex/geom/Size.as  |   41 +
 .../flex/org/apache/flex/states/AddItems.as     |  101 ++
 .../org/apache/flex/states/ItemAndDescriptor.as |   70 +
 .../org/apache/flex/states/SetEventHandler.as   |   79 +
 .../flex/org/apache/flex/states/SetProperty.as  |   81 +
 .../main/flex/org/apache/flex/states/State.as   |   83 +
 .../flex/org/apache/flex/utils/BinaryData.as    |  391 ++++
 .../org/apache/flex/utils/CSSBorderUtils.as     |  219 +++
 .../org/apache/flex/utils/CSSContainerUtils.as  |  194 ++
 .../main/flex/org/apache/flex/utils/CSSUtils.as |  328 ++++
 .../flex/org/apache/flex/utils/EffectTimer.as   |  136 ++
 .../flex/org/apache/flex/utils/HTMLLoader.as    |   42 +
 .../main/flex/org/apache/flex/utils/Language.as |  362 ++++
 .../apache/flex/utils/MXMLDataInterpreter.as    |  463 +++++
 .../flex/org/apache/flex/utils/MixinManager.as  |  105 ++
 .../flex/org/apache/flex/utils/PNGEncoder.as    |  305 ++++
 .../flex/org/apache/flex/utils/PointUtils.as    |  125 ++
 .../org/apache/flex/utils/SolidBorderUtil.as    |  191 ++
 .../flex/org/apache/flex/utils/StringTrimmer.as |  176 ++
 .../main/flex/org/apache/flex/utils/Timer.as    |  148 ++
 .../main/flex/org/apache/flex/utils/UIUtils.as  |  107 ++
 .../flex/utils/ViewSourceContextMenuOption.as   |   97 +
 .../org/apache/flex/utils/dbg/DOMPathUtil.as    |   95 +
 .../Core/src/main/resources/basic-manifest.xml  |   41 +
 .../src/main/resources/compile-asjs-config.xml  |   78 +
 .../Core/src/main/resources/compile-config.xml  |   77 +
 .../test/flex/FlexUnitFlexJSApplication.mxml    |   46 +
 .../projects/Core/src/test/flex/build.xml       |  162 ++
 .../src/test/flex/flexUnitTests/StrandTester.as |   27 +
 .../test/flex/flexUnitTests/StrandTesterTest.as |   55 +
 .../projects/CreateJS/.actionScriptProperties   |   40 +-
 .../.externalToolBuilders/CreateJSASJS.launch   |   44 +
 frameworks/projects/CreateJS/.flexLibProperties |   18 +
 frameworks/projects/CreateJS/.project           |   36 +-
 frameworks/projects/CreateJS/as/defaults.css    |   36 -
 .../projects/CreateJS/as/src/CreateJSClasses.as |   33 -
 .../src/org/apache/flex/createjs/Application.as |  120 --
 .../as/src/org/apache/flex/createjs/CheckBox.as |  124 --
 .../as/src/org/apache/flex/createjs/Label.as    |   81 -
 .../src/org/apache/flex/createjs/TextButton.as  |  118 --
 .../src/org/apache/flex/createjs/core/UIBase.as |  449 -----
 .../org/apache/flex/createjs/core/ViewBase.as   |  206 ---
 frameworks/projects/CreateJS/build.xml          |   76 +-
 .../projects/CreateJS/compile-asjs-config.xml   |   83 -
 frameworks/projects/CreateJS/compile-config.xml |   83 -
 .../projects/CreateJS/createjs-manifest.xml     |   31 -
 .../CreateJS/src/main/flex/CreateJSClasses.as   |   33 +
 .../org/apache/flex/createjs/Application.as     |  120 ++
 .../flex/org/apache/flex/createjs/CheckBox.as   |  124 ++
 .../main/flex/org/apache/flex/createjs/Label.as |   81 +
 .../flex/org/apache/flex/createjs/TextButton.as |  118 ++
 .../org/apache/flex/createjs/core/UIBase.as     |  449 +++++
 .../org/apache/flex/createjs/core/ViewBase.as   |  206 +++
 .../src/main/resources/compile-asjs-config.xml  |   83 +
 .../src/main/resources/compile-config.xml       |   83 +
 .../src/main/resources/createjs-manifest.xml    |   31 +
 .../CreateJS/src/main/resources/defaults.css    |   36 +
 .../projects/DragDrop/.actionScriptProperties   |   38 +-
 .../.externalToolBuilders/DragDropASJS.launch   |   44 +
 frameworks/projects/DragDrop/.flexLibProperties |   18 +
 frameworks/projects/DragDrop/.project           |   35 +-
 .../projects/DragDrop/as/src/DragDropClasses.as |   35 -
 .../as/src/org/apache/flex/core/DropType.as     |   64 -
 .../as/src/org/apache/flex/events/DragEvent.as  |  373 ----
 .../src/org/apache/flex/events/DragEventBase.as |   51 -
 .../beads/controllers/DragMouseController.as    |  261 ---
 .../beads/controllers/DropMouseController.as    |  185 --
 frameworks/projects/DragDrop/basic-manifest.xml |   27 -
 frameworks/projects/DragDrop/build.xml          |   74 +-
 .../projects/DragDrop/compile-asjs-config.xml   |   79 -
 frameworks/projects/DragDrop/compile-config.xml |   78 -
 .../DragDrop/src/main/flex/DragDropClasses.as   |   35 +
 .../main/flex/org/apache/flex/core/DropType.as  |   64 +
 .../flex/org/apache/flex/events/DragEvent.as    |  373 ++++
 .../org/apache/flex/events/DragEventBase.as     |   51 +
 .../beads/controllers/DragMouseController.as    |  261 +++
 .../beads/controllers/DropMouseController.as    |  185 ++
 .../src/main/resources/basic-manifest.xml       |   27 +
 .../src/main/resources/compile-asjs-config.xml  |   79 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/Effects/.actionScriptProperties    |   38 +-
 .../.externalToolBuilders/EffectsASJS.launch    |   44 +
 frameworks/projects/Effects/.flexLibProperties  |   18 +
 frameworks/projects/Effects/.project            |   35 +-
 .../projects/Effects/as/src/EffectsClasses.as   |   38 -
 .../flex/core/StatesWithTransitionsImpl.as      |  346 ----
 .../as/src/org/apache/flex/effects/Effect.as    |  263 ---
 .../as/src/org/apache/flex/effects/Fade.as      |  165 --
 .../as/src/org/apache/flex/effects/IEffect.as   |  136 --
 .../as/src/org/apache/flex/effects/Move.as      |  240 ---
 .../as/src/org/apache/flex/effects/Parallel.as  |  152 --
 .../org/apache/flex/effects/PlatformWiper.as    |  138 --
 .../as/src/org/apache/flex/effects/Resize.as    |  197 --
 .../as/src/org/apache/flex/effects/Sequence.as  |  152 --
 .../as/src/org/apache/flex/effects/Tween.as     |  665 -------
 .../as/src/org/apache/flex/effects/Wipe.as      |  156 --
 .../as/src/org/apache/flex/states/Transition.as |   80 -
 frameworks/projects/Effects/basic-manifest.xml  |   32 -
 frameworks/projects/Effects/build.xml           |   81 +-
 .../projects/Effects/compile-asjs-config.xml    |   79 -
 frameworks/projects/Effects/compile-config.xml  |   78 -
 .../Effects/src/main/flex/EffectsClasses.as     |   38 +
 .../flex/core/StatesWithTransitionsImpl.as      |  346 ++++
 .../main/flex/org/apache/flex/effects/Effect.as |  263 +++
 .../main/flex/org/apache/flex/effects/Fade.as   |  165 ++
 .../flex/org/apache/flex/effects/IEffect.as     |  136 ++
 .../main/flex/org/apache/flex/effects/Move.as   |  240 +++
 .../flex/org/apache/flex/effects/Parallel.as    |  152 ++
 .../org/apache/flex/effects/PlatformWiper.as    |  138 ++
 .../main/flex/org/apache/flex/effects/Resize.as |  197 ++
 .../flex/org/apache/flex/effects/Sequence.as    |  152 ++
 .../main/flex/org/apache/flex/effects/Tween.as  |  665 +++++++
 .../main/flex/org/apache/flex/effects/Wipe.as   |  156 ++
 .../flex/org/apache/flex/states/Transition.as   |   80 +
 .../src/main/resources/basic-manifest.xml       |   32 +
 .../src/main/resources/compile-asjs-config.xml  |   79 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/Flat/.actionScriptProperties       |   58 +
 .../Flat/.externalToolBuilders/FlatASJS.launch  |   44 +
 frameworks/projects/Flat/.flexLibProperties     |   24 +
 frameworks/projects/Flat/.project               |   48 +
 .../.settings/org.eclipse.core.resources.prefs  |    3 +
 frameworks/projects/Flat/as/defaults.css        |  842 ---------
 frameworks/projects/Flat/as/src/FlatClasses.as  |   44 -
 .../as/src/org/apache/flex/flat/CheckBox.as     |  161 --
 .../as/src/org/apache/flex/flat/DropDownList.as |  368 ----
 .../as/src/org/apache/flex/flat/RadioButton.as  |  245 ---
 .../beads/CSSContentAndTextToggleButtonView.as  |  304 ----
 .../flex/flat/beads/CSSScrollBarButtonView.as   |  178 --
 .../apache/flex/flat/beads/CSSScrollBarView.as  |  241 ---
 ...CheckboxCSSContentAndTextToggleButtonView.as |   48 -
 .../apache/flex/flat/beads/DropDownListView.as  |  309 ----
 .../RadioCSSContentAndTextToggleButtonView.as   |   47 -
 .../flat/supportClasses/DropDownListList.as     |   64 -
 .../DropDownListStringItemRenderer.as           |   70 -
 frameworks/projects/Flat/build.xml              |   76 +-
 .../projects/Flat/compile-asjs-config.xml       |   80 -
 frameworks/projects/Flat/compile-config.xml     |   91 -
 frameworks/projects/Flat/flat-as-manifest.xml   |   26 -
 frameworks/projects/Flat/flat-manifest.xml      |   99 -
 .../projects/Flat/src/main/flex/FlatClasses.as  |   44 +
 .../main/flex/org/apache/flex/flat/CheckBox.as  |  161 ++
 .../flex/org/apache/flex/flat/DropDownList.as   |  368 ++++
 .../flex/org/apache/flex/flat/RadioButton.as    |  245 +++
 .../beads/CSSContentAndTextToggleButtonView.as  |  304 ++++
 .../flex/flat/beads/CSSScrollBarButtonView.as   |  178 ++
 .../apache/flex/flat/beads/CSSScrollBarView.as  |  241 +++
 ...CheckboxCSSContentAndTextToggleButtonView.as |   48 +
 .../apache/flex/flat/beads/DropDownListView.as  |  309 ++++
 .../RadioCSSContentAndTextToggleButtonView.as   |   47 +
 .../flat/supportClasses/DropDownListList.as     |   64 +
 .../DropDownListStringItemRenderer.as           |   70 +
 .../src/main/resources/compile-asjs-config.xml  |   80 +
 .../Flat/src/main/resources/compile-config.xml  |   91 +
 .../Flat/src/main/resources/defaults.css        |  842 +++++++++
 .../src/main/resources/flat-as-manifest.xml     |   26 +
 .../Flat/src/main/resources/flat-manifest.xml   |   99 +
 .../projects/Formatters/.actionScriptProperties |   40 +-
 .../.externalToolBuilders/FormattersASJS.launch |   44 +
 .../projects/Formatters/.flexLibProperties      |   18 +
 frameworks/projects/Formatters/.project         |   36 +-
 .../Formatters/as/src/FormattersClasses.as      |   41 -
 .../as/src/org/apache/flex/core/FormatBase.as   |  113 --
 .../flex/html/accessories/CurrencyFormatter.as  |  215 ---
 .../html/accessories/DateFormatMMDDYYYYBead.as  |  158 --
 .../flex/html/accessories/NumberFormatter.as    |  210 ---
 .../flex/html/beads/FormatableLabelView.as      |   90 -
 .../flex/html/beads/FormatableTextInputView.as  |   91 -
 .../projects/Formatters/basic-manifest.xml      |   25 -
 frameworks/projects/Formatters/build.xml        |   75 +-
 .../projects/Formatters/compile-asjs-config.xml |   80 -
 .../projects/Formatters/compile-config.xml      |   79 -
 .../src/main/flex/FormattersClasses.as          |   41 +
 .../flex/org/apache/flex/core/FormatBase.as     |  113 ++
 .../flex/html/accessories/CurrencyFormatter.as  |  215 +++
 .../html/accessories/DateFormatMMDDYYYYBead.as  |  158 ++
 .../flex/html/accessories/NumberFormatter.as    |  210 +++
 .../flex/html/beads/FormatableLabelView.as      |   90 +
 .../flex/html/beads/FormatableTextInputView.as  |   91 +
 .../src/main/resources/basic-manifest.xml       |   25 +
 .../src/main/resources/compile-asjs-config.xml  |   80 +
 .../src/main/resources/compile-config.xml       |   79 +
 .../projects/GoogleMaps/.actionScriptProperties |   38 +-
 .../.externalToolBuilders/GoogleMapsASJS.launch |   44 +
 .../projects/GoogleMaps/.flexLibProperties      |   28 +-
 frameworks/projects/GoogleMaps/.project         |   35 +-
 frameworks/projects/GoogleMaps/as/defaults.css  |   29 -
 .../GoogleMaps/as/src/GoogleMapsClasses.as      |   36 -
 .../org/apache/flex/maps/google/GoogleMap.as    |  133 --
 .../flex/maps/google/beads/GoogleMapView.as     |  571 ------
 .../flex/maps/google/beads/MapView_original.as  |  515 ------
 .../apache/flex/maps/google/models/MapModel.as  |  165 --
 frameworks/projects/GoogleMaps/build.xml        |   75 +-
 .../projects/GoogleMaps/compile-asjs-config.xml |   74 -
 .../projects/GoogleMaps/compile-config.xml      |   82 -
 .../projects/GoogleMaps/google-manifest.xml     |   24 -
 .../src/main/flex/GoogleMapsClasses.as          |   36 +
 .../src/main/flex/GoogleStubClasses.as          |   42 +
 .../src/main/flex/google/maps/Animation.as      |   24 +
 .../src/main/flex/google/maps/BicyclingLayer.as |   29 +
 .../src/main/flex/google/maps/Circle.as         |  108 ++
 .../main/flex/google/maps/ControlPosition.as    |   94 +
 .../main/flex/google/maps/DirectionsRenderer.as |   78 +
 .../main/flex/google/maps/DirectionsService.as  |   24 +
 .../main/flex/google/maps/DirectionsStatus.as   |   66 +
 .../google/maps/DistanceMatrixElementStatus.as  |   31 +
 .../flex/google/maps/DistanceMatrixService.as   |   24 +
 .../flex/google/maps/DistanceMatrixStatus.as    |   59 +
 .../main/flex/google/maps/ElevationService.as   |   32 +
 .../main/flex/google/maps/ElevationStatus.as    |   45 +
 .../flex/google/maps/FusionTablesHeatmap.as     |   22 +
 .../main/flex/google/maps/FusionTablesLayer.as  |   37 +
 .../google/maps/FusionTablesMarkerOptions.as    |   22 +
 .../google/maps/FusionTablesPolygonOptions.as   |   46 +
 .../google/maps/FusionTablesPolylineOptions.as  |   34 +
 .../main/flex/google/maps/FusionTablesQuery.as  |   52 +
 .../main/flex/google/maps/FusionTablesStyle.as  |   40 +
 .../src/main/flex/google/maps/Geocoder.as       |   24 +
 .../google/maps/GeocoderAddressComponent.as     |   34 +
 .../main/flex/google/maps/GeocoderGeometry.as   |   40 +
 .../flex/google/maps/GeocoderLocationType.as    |   38 +
 .../src/main/flex/google/maps/GeocoderResult.as |   40 +
 .../src/main/flex/google/maps/GeocoderStatus.as |   59 +
 .../src/main/flex/google/maps/GroundOverlay.as  |   57 +
 .../src/main/flex/google/maps/ImageMapType.as   |   30 +
 .../src/main/flex/google/maps/InfoWindow.as     |   77 +
 .../src/main/flex/google/maps/KmlAuthor.as      |   34 +
 .../src/main/flex/google/maps/KmlFeatureData.as |   52 +
 .../src/main/flex/google/maps/KmlLayer.as       |   61 +
 .../main/flex/google/maps/KmlLayerMetadata.as   |   40 +
 .../src/main/flex/google/maps/KmlLayerStatus.as |   73 +
 .../src/main/flex/google/maps/KmlMouseEvent.as  |   34 +
 .../src/main/flex/google/maps/LatLng.as         |   78 +
 .../src/main/flex/google/maps/LatLngBounds.as   |   96 +
 .../src/main/flex/google/maps/MVCArray.as       |   85 +
 .../src/main/flex/google/maps/MVCObject.as      |  103 ++
 .../GoogleMaps/src/main/flex/google/maps/Map.as |  168 ++
 .../flex/google/maps/MapCanvasProjection.as     |   52 +
 .../src/main/flex/google/maps/MapPanes.as       |   60 +
 .../flex/google/maps/MapTypeControlStyle.as     |   31 +
 .../src/main/flex/google/maps/MapTypeId.as      |   38 +
 .../main/flex/google/maps/MapTypeRegistry.as    |   17 +
 .../main/flex/google/maps/MapsEventListener.as  |   16 +
 .../src/main/flex/google/maps/Marker.as         |  299 +++
 .../src/main/flex/google/maps/MaxZoomService.as |   24 +
 .../src/main/flex/google/maps/MaxZoomStatus.as  |   24 +
 .../src/main/flex/google/maps/MouseEvent.as     |   28 +
 .../src/main/flex/google/maps/OverlayView.as    |   59 +
 .../src/main/flex/google/maps/Point.as          |   43 +
 .../src/main/flex/google/maps/PolyMouseEvent.as |   34 +
 .../src/main/flex/google/maps/Polygon.as        |  102 ++
 .../src/main/flex/google/maps/Polyline.as       |   89 +
 .../src/main/flex/google/maps/Rectangle.as      |   89 +
 .../main/flex/google/maps/ScaleControlStyle.as  |   17 +
 .../src/main/flex/google/maps/Size.as           |   45 +
 .../flex/google/maps/StreetViewCoverageLayer.as |   29 +
 .../main/flex/google/maps/StreetViewPanorama.as |  108 ++
 .../src/main/flex/google/maps/StreetViewPov.as  |   28 +
 .../main/flex/google/maps/StreetViewService.as  |   33 +
 .../main/flex/google/maps/StreetViewStatus.as   |   31 +
 .../src/main/flex/google/maps/StrokePosition.as |   31 +
 .../src/main/flex/google/maps/StyledMapType.as  |   18 +
 .../src/main/flex/google/maps/SymbolPath.as     |   45 +
 .../src/main/flex/google/maps/TrafficLayer.as   |   29 +
 .../src/main/flex/google/maps/TransitLayer.as   |   29 +
 .../src/main/flex/google/maps/TravelMode.as     |   38 +
 .../src/main/flex/google/maps/UnitSystem.as     |   24 +
 .../main/flex/google/maps/ZoomControlStyle.as   |   31 +
 .../src/main/flex/google/maps/adsense.as        |   27 +
 .../main/flex/google/maps/adsense/AdFormat.as   |  136 ++
 .../src/main/flex/google/maps/adsense/AdUnit.as |  147 ++
 .../src/main/flex/google/maps/drawing.as        |   33 +
 .../flex/google/maps/drawing/DrawingManager.as  |   53 +
 .../google/maps/drawing/OverlayCompleteEvent.as |   28 +
 .../flex/google/maps/drawing/OverlayType.as     |   45 +
 .../src/main/flex/google/maps/event.as          |   83 +
 .../src/main/flex/google/maps/geometry.as       |   33 +
 .../main/flex/google/maps/geometry/encoding.as  |   28 +
 .../src/main/flex/google/maps/geometry/poly.as  |   34 +
 .../main/flex/google/maps/geometry/spherical.as |   86 +
 .../src/main/flex/google/maps/panoramio.as      |   30 +
 .../google/maps/panoramio/PanoramioLayer.as     |   66 +
 .../src/main/flex/google/maps/places.as         |  103 ++
 .../flex/google/maps/places/Autocomplete.as     |   55 +
 .../google/maps/places/AutocompleteService.as   |   32 +
 .../google/maps/places/ComponentRestrictions.as |   22 +
 .../flex/google/maps/places/PhotoOptions.as     |   28 +
 .../google/maps/places/PlaceAspectRating.as     |   28 +
 .../flex/google/maps/places/PlaceGeometry.as    |   31 +
 .../main/flex/google/maps/places/PlaceResult.as |  142 ++
 .../main/flex/google/maps/places/PlaceReview.as |   40 +
 .../google/maps/places/PlaceSearchPagination.as |   28 +
 .../flex/google/maps/places/PlacesService.as    |   49 +
 .../google/maps/places/PlacesServiceStatus.as   |   52 +
 .../src/main/flex/google/maps/places/RankBy.as  |   24 +
 .../main/flex/google/maps/places/SearchBox.as   |   42 +
 .../src/main/flex/google/maps/visualization.as  |   74 +
 .../maps/visualization/DemographicsLayer.as     |   65 +
 .../google/maps/visualization/HeatmapLayer.as   |   47 +
 .../maps/visualization/MapsEngineLayer.as       |   91 +
 .../maps/visualization/MapsEngineStatus.as      |   31 +
 .../src/main/flex/google/maps/weather.as        |   60 +
 .../main/flex/google/maps/weather/CloudLayer.as |   32 +
 .../main/flex/google/maps/weather/LabelColor.as |   24 +
 .../flex/google/maps/weather/TemperatureUnit.as |   24 +
 .../flex/google/maps/weather/WeatherLayer.as    |   40 +
 .../flex/google/maps/weather/WindSpeedUnit.as   |   31 +
 .../main/flex/google/pseudo/HTMLInputElement.as |    5 +
 .../src/main/flex/google/pseudo/Node.as         |    5 +
 .../org/apache/flex/maps/google/GoogleMap.as    |  133 ++
 .../flex/maps/google/beads/GoogleMapView.as     |  866 +++++++++
 .../flex/maps/google/beads/MapView_original.as  |  515 ++++++
 .../apache/flex/maps/google/models/MapModel.as  |  165 ++
 .../src/main/resources/compile-asjs-config.xml  |   75 +
 .../src/main/resources/compile-config.xml       |   83 +
 .../GoogleMaps/src/main/resources/defaults.css  |   29 +
 .../src/main/resources/google-manifest.xml      |   24 +
 .../projects/Graphics/.actionScriptProperties   |   38 +-
 .../.externalToolBuilders/GraphicsASJS.launch   |   44 +
 frameworks/projects/Graphics/.flexLibProperties |   18 +
 frameworks/projects/Graphics/.project           |   35 +-
 .../projects/Graphics/as/src/GraphicsClasses.as |   44 -
 .../src/org/apache/flex/core/graphics/Circle.as |   98 -
 .../org/apache/flex/core/graphics/Ellipse.as    |   91 -
 .../apache/flex/core/graphics/GradientBase.as   |  229 ---
 .../apache/flex/core/graphics/GradientEntry.as  |  133 --
 .../apache/flex/core/graphics/GraphicShape.as   |  213 ---
 .../flex/core/graphics/GraphicsContainer.as     |  302 ---
 .../src/org/apache/flex/core/graphics/IFill.as  |   32 -
 .../org/apache/flex/core/graphics/IStroke.as    |   29 -
 .../apache/flex/core/graphics/LinearGradient.as |  123 --
 .../src/org/apache/flex/core/graphics/Path.as   |  103 --
 .../src/org/apache/flex/core/graphics/Rect.as   |   87 -
 .../org/apache/flex/core/graphics/SolidColor.as |  112 --
 .../flex/core/graphics/SolidColorStroke.as      |  130 --
 .../src/org/apache/flex/core/graphics/Text.as   |  140 --
 .../graphics/utils/AdvancedLayoutFeatures.as    | 1140 ------------
 .../core/graphics/utils/CompoundTransform.as    |  777 --------
 .../core/graphics/utils/IAssetLayoutFeatures.as |  371 ----
 .../flex/core/graphics/utils/MatrixUtil.as      | 1605 ----------------
 .../flex/core/graphics/utils/PathHelper.as      | 1712 ------------------
 .../core/graphics/utils/TransformOffsets.as     |  367 ----
 frameworks/projects/Graphics/basic-manifest.xml |   34 -
 frameworks/projects/Graphics/build.xml          |   82 +-
 .../projects/Graphics/compile-asjs-config.xml   |   82 -
 frameworks/projects/Graphics/compile-config.xml |   78 -
 .../Graphics/src/main/flex/GraphicsClasses.as   |   44 +
 .../org/apache/flex/core/graphics/Circle.as     |   98 +
 .../org/apache/flex/core/graphics/Ellipse.as    |   91 +
 .../apache/flex/core/graphics/GradientBase.as   |  229 +++
 .../apache/flex/core/graphics/GradientEntry.as  |  133 ++
 .../apache/flex/core/graphics/GraphicShape.as   |  213 +++
 .../flex/core/graphics/GraphicsContainer.as     |  302 +++
 .../flex/org/apache/flex/core/graphics/IFill.as |   32 +
 .../org/apache/flex/core/graphics/IStroke.as    |   29 +
 .../apache/flex/core/graphics/LinearGradient.as |  123 ++
 .../flex/org/apache/flex/core/graphics/Path.as  |  103 ++
 .../flex/org/apache/flex/core/graphics/Rect.as  |   87 +
 .../org/apache/flex/core/graphics/SolidColor.as |  112 ++
 .../flex/core/graphics/SolidColorStroke.as      |  130 ++
 .../flex/org/apache/flex/core/graphics/Text.as  |  140 ++
 .../graphics/utils/AdvancedLayoutFeatures.as    | 1140 ++++++++++++
 .../core/graphics/utils/CompoundTransform.as    |  777 ++++++++
 .../core/graphics/utils/IAssetLayoutFeatures.as |  371 ++++
 .../flex/core/graphics/utils/MatrixUtil.as      | 1605 ++++++++++++++++
 .../flex/core/graphics/utils/PathHelper.as      | 1712 ++++++++++++++++++
 .../core/graphics/utils/TransformOffsets.as     |  367 ++++
 .../src/main/resources/basic-manifest.xml       |   34 +
 .../src/main/resources/compile-asjs-config.xml  |   82 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/HTML/.actionScriptProperties       |   43 +-
 .../HTML/.externalToolBuilders/HTMLASJS.launch  |   44 +
 frameworks/projects/HTML/.flexLibProperties     |   18 +
 frameworks/projects/HTML/.project               |   38 +-
 frameworks/projects/HTML/as/defaults.css        |  623 -------
 frameworks/projects/HTML/as/src/HTMLClasses.as  |  176 --
 .../apache/flex/core/IScrollingLayoutParent.as  |   68 -
 .../HTML/as/src/org/apache/flex/html/Alert.as   |  287 ---
 .../HTML/as/src/org/apache/flex/html/Button.as  |  112 --
 .../as/src/org/apache/flex/html/ButtonBar.as    |   76 -
 .../as/src/org/apache/flex/html/CheckBox.as     |  180 --
 .../as/src/org/apache/flex/html/CloseButton.as  |   66 -
 .../as/src/org/apache/flex/html/ComboBox.as     |  277 ---
 .../as/src/org/apache/flex/html/Container.as    |  108 --
 .../as/src/org/apache/flex/html/ControlBar.as   |   99 -
 .../as/src/org/apache/flex/html/DataGrid.as     |  164 --
 .../as/src/org/apache/flex/html/DateChooser.as  |   74 -
 .../as/src/org/apache/flex/html/DateField.as    |   95 -
 .../as/src/org/apache/flex/html/DropDownList.as |  235 ---
 .../as/src/org/apache/flex/html/HContainer.as   |   61 -
 .../HTML/as/src/org/apache/flex/html/HRule.as   |   63 -
 .../HTML/as/src/org/apache/flex/html/Image.as   |   99 -
 .../org/apache/flex/html/ImageAndTextButton.as  |  128 --
 .../as/src/org/apache/flex/html/ImageButton.as  |   89 -
 .../HTML/as/src/org/apache/flex/html/Label.as   |  163 --
 .../HTML/as/src/org/apache/flex/html/List.as    |  311 ----
 .../org/apache/flex/html/MXMLBeadViewBase.as    |  317 ----
 .../src/org/apache/flex/html/MultilineLabel.as  |   76 -
 .../src/org/apache/flex/html/NumericStepper.as  |  214 ---
 .../HTML/as/src/org/apache/flex/html/Panel.as   |  121 --
 .../org/apache/flex/html/PanelWithControlBar.as |  121 --
 .../as/src/org/apache/flex/html/RadioButton.as  |  347 ----
 .../as/src/org/apache/flex/html/SimpleAlert.as  |  140 --
 .../as/src/org/apache/flex/html/SimpleList.as   |   79 -
 .../HTML/as/src/org/apache/flex/html/Slider.as  |  233 ---
 .../HTML/as/src/org/apache/flex/html/Spacer.as  |   64 -
 .../HTML/as/src/org/apache/flex/html/Spinner.as |  187 --
 .../as/src/org/apache/flex/html/TextArea.as     |  126 --
 .../as/src/org/apache/flex/html/TextButton.as   |  120 --
 .../as/src/org/apache/flex/html/TextInput.as    |  185 --
 .../as/src/org/apache/flex/html/TitleBar.as     |  146 --
 .../org/apache/flex/html/ToggleTextButton.as    |  170 --
 .../HTML/as/src/org/apache/flex/html/ToolTip.as |   60 -
 .../as/src/org/apache/flex/html/VContainer.as   |   62 -
 .../HTML/as/src/org/apache/flex/html/VRule.as   |   68 -
 .../accessories/NumericOnlyTextInputBead.as     |  199 --
 .../flex/html/accessories/PasswordInputBead.as  |  102 --
 .../flex/html/accessories/TextPromptBead.as     |  148 --
 .../apache/flex/html/accessories/ToolTipBead.as |  141 --
 .../flex/html/beads/AlertMeasurementBead.as     |   88 -
 .../src/org/apache/flex/html/beads/AlertView.as |  226 ---
 .../flex/html/beads/BackgroundImageBead.as      |  112 --
 .../org/apache/flex/html/beads/ButtonBarView.as |   69 -
 .../org/apache/flex/html/beads/CSSButtonView.as |  167 --
 .../html/beads/CSSImageAndTextButtonView.as     |  367 ----
 .../apache/flex/html/beads/CSSTextButtonView.as |  347 ----
 .../flex/html/beads/CSSTextToggleButtonView.as  |  105 --
 .../org/apache/flex/html/beads/CheckBoxView.as  |  296 ---
 .../apache/flex/html/beads/CloseButtonView.as   |  101 --
 .../org/apache/flex/html/beads/ComboBoxView.as  |  247 ---
 .../org/apache/flex/html/beads/ContainerView.as |  553 ------
 .../html/beads/ControlBarMeasurementBead.as     |  116 --
 .../flex/html/beads/DataGridColumnView.as       |  101 --
 .../apache/flex/html/beads/DataGridLinesBead.as |  199 --
 .../org/apache/flex/html/beads/DataGridView.as  |  318 ----
 .../DataItemRendererFactoryForArrayData.as      |  161 --
 .../DataItemRendererFactoryForArrayList.as      |  174 --
 .../DataItemRendererFactoryForColumnData.as     |  142 --
 .../html/beads/DataProviderChangeNotifier.as    |  154 --
 .../apache/flex/html/beads/DateChooserView.as   |  256 ---
 .../org/apache/flex/html/beads/DateFieldView.as |  192 --
 .../flex/html/beads/DownArrowButtonView.as      |  111 --
 .../apache/flex/html/beads/DropDownListView.as  |  300 ---
 .../src/org/apache/flex/html/beads/HRuleView.as |   87 -
 .../flex/html/beads/HScrollBarThumbView.as      |  120 --
 .../flex/html/beads/HScrollBarTrackView.as      |  118 --
 .../apache/flex/html/beads/HScrollBarView.as    |   99 -
 .../apache/flex/html/beads/IBackgroundBead.as   |   35 -
 .../org/apache/flex/html/beads/IBorderBead.as   |   35 -
 .../org/apache/flex/html/beads/IComboBoxView.as |   78 -
 .../org/apache/flex/html/beads/IDataGridView.as |   36 -
 .../apache/flex/html/beads/IDropDownListView.as |   57 -
 .../apache/flex/html/beads/IGraphicsDrawing.as  |   36 -
 .../src/org/apache/flex/html/beads/IListView.as |   48 -
 .../apache/flex/html/beads/IScrollBarView.as    |   80 -
 .../org/apache/flex/html/beads/ISliderView.as   |   60 -
 .../org/apache/flex/html/beads/ISpinnerView.as  |   61 -
 .../apache/flex/html/beads/ITextFieldView.as    |   44 -
 .../apache/flex/html/beads/ITextItemRenderer.as |   45 -
 .../flex/html/beads/ImageAndTextButtonView.as   |  276 ---
 .../apache/flex/html/beads/ImageButtonView.as   |  158 --
 .../src/org/apache/flex/html/beads/ImageView.as |  223 ---
 .../flex/html/beads/LeftArrowButtonView.as      |  112 --
 .../src/org/apache/flex/html/beads/ListView.as  |  210 ---
 .../flex/html/beads/MultilineTextFieldView.as   |   56 -
 .../flex/html/beads/NumericStepperView.as       |  186 --
 .../src/org/apache/flex/html/beads/PanelView.as |  168 --
 .../flex/html/beads/PanelWithControlBarView.as  |  207 ---
 .../apache/flex/html/beads/RadioButtonView.as   |  281 ---
 .../flex/html/beads/RightArrowButtonView.as     |  112 --
 .../org/apache/flex/html/beads/ScrollBarView.as |  216 ---
 .../apache/flex/html/beads/SimpleAlertView.as   |  149 --
 .../flex/html/beads/SingleLineBorderBead.as     |   91 -
 .../apache/flex/html/beads/SliderThumbView.as   |  156 --
 .../apache/flex/html/beads/SliderTrackView.as   |  153 --
 .../org/apache/flex/html/beads/SliderView.as    |  179 --
 .../flex/html/beads/SolidBackgroundBead.as      |  191 --
 .../org/apache/flex/html/beads/SpinnerView.as   |  135 --
 .../org/apache/flex/html/beads/TextAreaView.as  |  263 ---
 .../html/beads/TextButtonMeasurementBead.as     |   86 -
 .../apache/flex/html/beads/TextButtonView.as    |  217 ---
 .../html/beads/TextFieldLabelMeasurementBead.as |   92 -
 .../org/apache/flex/html/beads/TextFieldView.as |   54 -
 .../apache/flex/html/beads/TextFieldViewBase.as |  404 -----
 .../org/apache/flex/html/beads/TextInputView.as |  135 --
 .../flex/html/beads/TextInputWithBorderView.as  |  100 -
 .../TextItemRendererFactoryForArrayData.as      |  144 --
 ...extItemRendererFactoryForStringVectorData.as |  128 --
 .../flex/html/beads/TitleBarMeasurementBead.as  |  108 --
 .../apache/flex/html/beads/TitleBarView.mxml    |   58 -
 .../apache/flex/html/beads/UpArrowButtonView.as |  112 --
 .../src/org/apache/flex/html/beads/VRuleView.as |   87 -
 .../flex/html/beads/VScrollBarThumbView.as      |  119 --
 .../flex/html/beads/VScrollBarTrackView.as      |  118 --
 .../apache/flex/html/beads/VScrollBarView.as    |   99 -
 .../html/beads/controllers/AlertController.as   |   88 -
 .../controllers/ButtonAutoRepeatController.as   |  147 --
 .../beads/controllers/ComboBoxController.as     |  104 --
 .../controllers/DateChooserMouseController.as   |  126 --
 .../controllers/DateFieldMouseController.as     |   95 -
 .../beads/controllers/DropDownListController.as |  116 --
 .../EditableTextKeyboardController.as           |   86 -
 .../controllers/HScrollBarMouseController.as    |  101 --
 .../controllers/ItemRendererMouseController.as  |  196 --
 .../ListSingleSelectionMouseController.as       |  127 --
 .../controllers/ScrollBarMouseControllerBase.as |  184 --
 .../beads/controllers/SliderMouseController.as  |  286 ---
 .../beads/controllers/SpinnerMouseController.as |  124 --
 .../controllers/VScrollBarMouseController.as    |  101 --
 .../flex/html/beads/layouts/BasicLayout.as      |  445 -----
 .../flex/html/beads/layouts/ButtonBarLayout.as  |  143 --
 .../flex/html/beads/layouts/DataGridLayout.as   |  156 --
 .../FlexibleFirstChildHorizontalLayout.as       |  244 ---
 .../flex/html/beads/layouts/HScrollBarLayout.as |  121 --
 .../flex/html/beads/layouts/HorizontalLayout.as |  325 ----
 .../html/beads/layouts/LayoutChangeNotifier.as  |  103 --
 .../layouts/OneFlexibleChildHorizontalLayout.as |  332 ----
 .../layouts/OneFlexibleChildVerticalLayout.as   |  459 -----
 .../flex/html/beads/layouts/TileLayout.as       |  246 ---
 .../flex/html/beads/layouts/VScrollBarLayout.as |  122 --
 .../html/beads/layouts/VerticalColumnLayout.as  |  199 --
 .../flex/html/beads/layouts/VerticalLayout.as   |  362 ----
 .../apache/flex/html/beads/models/AlertModel.as |  288 ---
 .../beads/models/ArrayListSelectionModel.as     |  242 ---
 .../html/beads/models/ArraySelectionModel.as    |  243 ---
 .../flex/html/beads/models/ComboBoxModel.as     |  100 -
 .../flex/html/beads/models/DataGridModel.as     |   71 -
 .../beads/models/DataGridPresentationModel.as   |   88 -
 .../flex/html/beads/models/DateChooserModel.as  |  189 --
 .../flex/html/beads/models/ImageAndTextModel.as |   77 -
 .../apache/flex/html/beads/models/ImageModel.as |   89 -
 .../html/beads/models/ListPresentationModel.as  |  107 --
 .../apache/flex/html/beads/models/PanelModel.as |  158 --
 .../apache/flex/html/beads/models/RangeModel.as |  222 ---
 .../flex/html/beads/models/ScrollBarModel.as    |   98 -
 .../html/beads/models/SingleLineBorderModel.as  |   85 -
 .../html/beads/models/StringSelectionModel.as   |  221 ---
 .../apache/flex/html/beads/models/TextModel.as  |  125 --
 .../flex/html/beads/models/TitleBarModel.as     |  136 --
 .../flex/html/beads/models/ToggleButtonModel.as |  145 --
 .../html/beads/models/ValueToggleButtonModel.as |  123 --
 .../flex/html/beads/models/ViewportModel.as     |   72 -
 .../apache/flex/html/supportClasses/Border.as   |   49 -
 .../ButtonBarButtonItemRenderer.as              |  137 --
 .../html/supportClasses/ContainerContentArea.as |   80 -
 .../flex/html/supportClasses/DataGridColumn.as  |  127 --
 .../flex/html/supportClasses/DataGroup.as       |   85 -
 .../html/supportClasses/DataItemRenderer.as     |  178 --
 .../html/supportClasses/DateChooserButton.as    |   67 -
 .../html/supportClasses/DropDownListList.as     |   63 -
 .../html/supportClasses/GraphicsItemRenderer.as |  295 ---
 .../flex/html/supportClasses/HScrollBar.as      |   49 -
 .../flex/html/supportClasses/ScrollBar.as       |   50 -
 .../html/supportClasses/ScrollingViewport.as    |  351 ----
 .../html/supportClasses/StringItemRenderer.as   |  183 --
 .../supportClasses/TextFieldItemRenderer.as     |  541 ------
 .../html/supportClasses/UIItemRendererBase.as   |  282 ---
 .../flex/html/supportClasses/VScrollBar.as      |   49 -
 .../apache/flex/html/supportClasses/Viewport.as |  151 --
 .../as/src/org/apache/flex/svg/TextButton.as    |   30 -
 .../as/tests/FlexUnitFlexJSApplication.mxml     |   46 -
 frameworks/projects/HTML/as/tests/build.xml     |  159 --
 .../tests/flexUnitTests/DataGridColumnTester.as |   27 -
 .../flexUnitTests/DataGridColumnTesterTest.as   |   55 -
 frameworks/projects/HTML/basic-as-manifest.xml  |   37 -
 frameworks/projects/HTML/basic-manifest.xml     |  105 --
 frameworks/projects/HTML/build.xml              |   77 +-
 .../projects/HTML/compile-asjs-config.xml       |   90 -
 frameworks/projects/HTML/compile-config.xml     |   94 -
 .../projects/HTML/src/main/flex/HTMLClasses.as  |  179 ++
 .../apache/flex/core/IScrollingLayoutParent.as  |   68 +
 .../org/apache/flex/events/ItemAddedEvent.as    |   88 +
 .../org/apache/flex/events/ItemClickedEvent.as  |  115 ++
 .../org/apache/flex/events/ItemRemovedEvent.as  |   88 +
 .../src/main/flex/org/apache/flex/html/Alert.as |  287 +++
 .../main/flex/org/apache/flex/html/Button.as    |  112 ++
 .../main/flex/org/apache/flex/html/ButtonBar.as |   76 +
 .../main/flex/org/apache/flex/html/CheckBox.as  |  181 ++
 .../flex/org/apache/flex/html/CloseButton.as    |   66 +
 .../main/flex/org/apache/flex/html/ComboBox.as  |  277 +++
 .../main/flex/org/apache/flex/html/Container.as |  108 ++
 .../flex/org/apache/flex/html/ControlBar.as     |   99 +
 .../main/flex/org/apache/flex/html/DataGrid.as  |  164 ++
 .../flex/org/apache/flex/html/DateChooser.as    |   74 +
 .../main/flex/org/apache/flex/html/DateField.as |   95 +
 .../flex/org/apache/flex/html/DropDownList.as   |  235 +++
 .../flex/org/apache/flex/html/HContainer.as     |   61 +
 .../src/main/flex/org/apache/flex/html/HRule.as |   63 +
 .../src/main/flex/org/apache/flex/html/Image.as |   99 +
 .../org/apache/flex/html/ImageAndTextButton.as  |  128 ++
 .../flex/org/apache/flex/html/ImageButton.as    |   89 +
 .../src/main/flex/org/apache/flex/html/Label.as |  163 ++
 .../src/main/flex/org/apache/flex/html/List.as  |  311 ++++
 .../org/apache/flex/html/MXMLBeadViewBase.as    |  317 ++++
 .../flex/org/apache/flex/html/MultilineLabel.as |   76 +
 .../flex/org/apache/flex/html/NumericStepper.as |  214 +++
 .../src/main/flex/org/apache/flex/html/Panel.as |  121 ++
 .../org/apache/flex/html/PanelWithControlBar.as |  121 ++
 .../flex/org/apache/flex/html/RadioButton.as    |  348 ++++
 .../flex/org/apache/flex/html/SimpleAlert.as    |  140 ++
 .../flex/org/apache/flex/html/SimpleList.as     |   79 +
 .../main/flex/org/apache/flex/html/Slider.as    |  233 +++
 .../main/flex/org/apache/flex/html/Spacer.as    |   64 +
 .../main/flex/org/apache/flex/html/Spinner.as   |  187 ++
 .../main/flex/org/apache/flex/html/TextArea.as  |  126 ++
 .../flex/org/apache/flex/html/TextButton.as     |  120 ++
 .../main/flex/org/apache/flex/html/TextInput.as |  185 ++
 .../main/flex/org/apache/flex/html/TitleBar.as  |  146 ++
 .../org/apache/flex/html/ToggleTextButton.as    |  170 ++
 .../main/flex/org/apache/flex/html/ToolTip.as   |   60 +
 .../flex/org/apache/flex/html/VContainer.as     |   62 +
 .../src/main/flex/org/apache/flex/html/VRule.as |   68 +
 .../flex/org/apache/flex/html/WebBrowser.as     |  145 ++
 .../accessories/NumericOnlyTextInputBead.as     |  199 ++
 .../flex/html/accessories/PasswordInputBead.as  |  102 ++
 .../flex/html/accessories/TextPromptBead.as     |  148 ++
 .../apache/flex/html/accessories/ToolTipBead.as |  141 ++
 .../flex/html/beads/AlertMeasurementBead.as     |   88 +
 .../org/apache/flex/html/beads/AlertView.as     |  226 +++
 .../flex/html/beads/BackgroundImageBead.as      |  112 ++
 .../org/apache/flex/html/beads/ButtonBarView.as |   69 +
 .../org/apache/flex/html/beads/CSSButtonView.as |  167 ++
 .../html/beads/CSSImageAndTextButtonView.as     |  367 ++++
 .../apache/flex/html/beads/CSSTextButtonView.as |  347 ++++
 .../flex/html/beads/CSSTextToggleButtonView.as  |  105 ++
 .../org/apache/flex/html/beads/CheckBoxView.as  |  296 +++
 .../apache/flex/html/beads/CloseButtonView.as   |  101 ++
 .../org/apache/flex/html/beads/ComboBoxView.as  |  247 +++
 .../org/apache/flex/html/beads/ContainerView.as |  553 ++++++
 .../html/beads/ControlBarMeasurementBead.as     |  116 ++
 .../flex/html/beads/DataGridColumnView.as       |  101 ++
 .../apache/flex/html/beads/DataGridLinesBead.as |  199 ++
 .../org/apache/flex/html/beads/DataGridView.as  |  294 +++
 .../DataItemRendererFactoryForArrayData.as      |  161 ++
 .../DataItemRendererFactoryForArrayList.as      |  174 ++
 .../DataItemRendererFactoryForColumnData.as     |  142 ++
 .../html/beads/DataProviderChangeNotifier.as    |  154 ++
 .../apache/flex/html/beads/DateChooserView.as   |  256 +++
 .../org/apache/flex/html/beads/DateFieldView.as |  192 ++
 .../flex/html/beads/DownArrowButtonView.as      |  111 ++
 .../apache/flex/html/beads/DropDownListView.as  |  300 +++
 .../org/apache/flex/html/beads/HRuleView.as     |   87 +
 .../flex/html/beads/HScrollBarThumbView.as      |  120 ++
 .../flex/html/beads/HScrollBarTrackView.as      |  118 ++
 .../apache/flex/html/beads/HScrollBarView.as    |   99 +
 .../apache/flex/html/beads/IBackgroundBead.as   |   35 +
 .../org/apache/flex/html/beads/IBorderBead.as   |   35 +
 .../org/apache/flex/html/beads/IComboBoxView.as |   78 +
 .../org/apache/flex/html/beads/IDataGridView.as |   36 +
 .../apache/flex/html/beads/IDropDownListView.as |   57 +
 .../apache/flex/html/beads/IGraphicsDrawing.as  |   36 +
 .../org/apache/flex/html/beads/IListView.as     |   48 +
 .../apache/flex/html/beads/IScrollBarView.as    |   80 +
 .../org/apache/flex/html/beads/ISliderView.as   |   60 +
 .../org/apache/flex/html/beads/ISpinnerView.as  |   61 +
 .../apache/flex/html/beads/ITextFieldView.as    |   44 +
 .../apache/flex/html/beads/ITextItemRenderer.as |   45 +
 .../flex/html/beads/ImageAndTextButtonView.as   |  276 +++
 .../apache/flex/html/beads/ImageButtonView.as   |  158 ++
 .../org/apache/flex/html/beads/ImageView.as     |  223 +++
 .../flex/html/beads/LeftArrowButtonView.as      |  112 ++
 .../flex/org/apache/flex/html/beads/ListView.as |  210 +++
 .../flex/html/beads/MultilineTextFieldView.as   |   56 +
 .../flex/html/beads/NumericStepperView.as       |  186 ++
 .../org/apache/flex/html/beads/PanelView.as     |  168 ++
 .../flex/html/beads/PanelWithControlBarView.as  |  207 +++
 .../apache/flex/html/beads/RadioButtonView.as   |  281 +++
 .../flex/html/beads/RightArrowButtonView.as     |  112 ++
 .../org/apache/flex/html/beads/ScrollBarView.as |  216 +++
 .../apache/flex/html/beads/SimpleAlertView.as   |  149 ++
 .../flex/html/beads/SingleLineBorderBead.as     |   91 +
 .../apache/flex/html/beads/SliderThumbView.as   |  156 ++
 .../apache/flex/html/beads/SliderTrackView.as   |  153 ++
 .../org/apache/flex/html/beads/SliderView.as    |  179 ++
 .../flex/html/beads/SolidBackgroundBead.as      |  191 ++
 .../org/apache/flex/html/beads/SpinnerView.as   |  135 ++
 .../org/apache/flex/html/beads/TextAreaView.as  |  263 +++
 .../html/beads/TextButtonMeasurementBead.as     |   86 +
 .../apache/flex/html/beads/TextButtonView.as    |  217 +++
 .../html/beads/TextFieldLabelMeasurementBead.as |   92 +
 .../org/apache/flex/html/beads/TextFieldView.as |   54 +
 .../apache/flex/html/beads/TextFieldViewBase.as |  404 +++++
 .../org/apache/flex/html/beads/TextInputView.as |  135 ++
 .../flex/html/beads/TextInputWithBorderView.as  |  100 +
 .../TextItemRendererFactoryForArrayData.as      |  144 ++
 ...extItemRendererFactoryForStringVectorData.as |  128 ++
 .../flex/html/beads/TitleBarMeasurementBead.as  |  108 ++
 .../apache/flex/html/beads/TitleBarView.mxml    |   58 +
 .../apache/flex/html/beads/UpArrowButtonView.as |  112 ++
 .../org/apache/flex/html/beads/VRuleView.as     |   87 +
 .../flex/html/beads/VScrollBarThumbView.as      |  119 ++
 .../flex/html/beads/VScrollBarTrackView.as      |  118 ++
 .../apache/flex/html/beads/VScrollBarView.as    |   99 +
 .../apache/flex/html/beads/WebBrowserView.as    |  198 ++
 .../html/beads/controllers/AlertController.as   |   88 +
 .../controllers/ButtonAutoRepeatController.as   |  147 ++
 .../beads/controllers/ComboBoxController.as     |  104 ++
 .../controllers/DateChooserMouseController.as   |  126 ++
 .../controllers/DateFieldMouseController.as     |   95 +
 .../beads/controllers/DropDownListController.as |  117 ++
 .../EditableTextKeyboardController.as           |   86 +
 .../controllers/HScrollBarMouseController.as    |  101 ++
 .../controllers/ItemRendererMouseController.as  |  209 +++
 .../ListSingleSelectionMouseController.as       |  154 ++
 .../controllers/ScrollBarMouseControllerBase.as |  184 ++
 .../beads/controllers/SliderMouseController.as  |  286 +++
 .../beads/controllers/SpinnerMouseController.as |  125 ++
 .../controllers/VScrollBarMouseController.as    |  101 ++
 .../flex/html/beads/layouts/BasicLayout.as      |  445 +++++
 .../flex/html/beads/layouts/ButtonBarLayout.as  |  143 ++
 .../flex/html/beads/layouts/DataGridLayout.as   |  156 ++
 .../FlexibleFirstChildHorizontalLayout.as       |  244 +++
 .../flex/html/beads/layouts/HScrollBarLayout.as |  121 ++
 .../flex/html/beads/layouts/HorizontalLayout.as |  325 ++++
 .../html/beads/layouts/LayoutChangeNotifier.as  |  103 ++
 .../layouts/OneFlexibleChildHorizontalLayout.as |  332 ++++
 .../layouts/OneFlexibleChildVerticalLayout.as   |  459 +++++
 .../flex/html/beads/layouts/TileLayout.as       |  246 +++
 .../flex/html/beads/layouts/VScrollBarLayout.as |  122 ++
 .../html/beads/layouts/VerticalColumnLayout.as  |  199 ++
 .../flex/html/beads/layouts/VerticalLayout.as   |  362 ++++
 .../apache/flex/html/beads/models/AlertModel.as |  288 +++
 .../beads/models/ArrayListSelectionModel.as     |  244 +++
 .../html/beads/models/ArraySelectionModel.as    |  243 +++
 .../flex/html/beads/models/ComboBoxModel.as     |  100 +
 .../flex/html/beads/models/DataGridModel.as     |   71 +
 .../beads/models/DataGridPresentationModel.as   |   88 +
 .../flex/html/beads/models/DateChooserModel.as  |  189 ++
 .../flex/html/beads/models/ImageAndTextModel.as |   77 +
 .../apache/flex/html/beads/models/ImageModel.as |   89 +
 .../html/beads/models/ListPresentationModel.as  |  107 ++
 .../apache/flex/html/beads/models/PanelModel.as |  158 ++
 .../apache/flex/html/beads/models/RangeModel.as |  222 +++
 .../flex/html/beads/models/ScrollBarModel.as    |   98 +
 .../html/beads/models/SingleLineBorderModel.as  |   85 +
 .../html/beads/models/StringSelectionModel.as   |  221 +++
 .../apache/flex/html/beads/models/TextModel.as  |  125 ++
 .../flex/html/beads/models/TitleBarModel.as     |  136 ++
 .../flex/html/beads/models/ToggleButtonModel.as |  145 ++
 .../html/beads/models/ValueToggleButtonModel.as |  123 ++
 .../flex/html/beads/models/ViewportModel.as     |   72 +
 .../flex/html/beads/models/WebBrowserModel.as   |  100 +
 .../apache/flex/html/supportClasses/Border.as   |   49 +
 .../ButtonBarButtonItemRenderer.as              |  145 ++
 .../html/supportClasses/ContainerContentArea.as |   80 +
 .../flex/html/supportClasses/DataGridColumn.as  |  127 ++
 .../flex/html/supportClasses/DataGroup.as       |  121 ++
 .../html/supportClasses/DataItemRenderer.as     |  178 ++
 .../html/supportClasses/DateChooserButton.as    |   67 +
 .../html/supportClasses/DropDownListList.as     |   63 +
 .../html/supportClasses/GraphicsItemRenderer.as |  295 +++
 .../flex/html/supportClasses/HScrollBar.as      |   49 +
 .../flex/html/supportClasses/ScrollBar.as       |   50 +
 .../html/supportClasses/ScrollingViewport.as    |  351 ++++
 .../html/supportClasses/StringItemRenderer.as   |  183 ++
 .../supportClasses/TextFieldItemRenderer.as     |  541 ++++++
 .../html/supportClasses/UIItemRendererBase.as   |  282 +++
 .../flex/html/supportClasses/VScrollBar.as      |   49 +
 .../apache/flex/html/supportClasses/Viewport.as |  151 ++
 .../main/flex/org/apache/flex/svg/TextButton.as |   30 +
 .../src/main/resources/basic-as-manifest.xml    |   37 +
 .../HTML/src/main/resources/basic-manifest.xml  |  107 ++
 .../src/main/resources/compile-asjs-config.xml  |   90 +
 .../HTML/src/main/resources/compile-config.xml  |   94 +
 .../HTML/src/main/resources/defaults.css        |  629 +++++++
 .../HTML/src/main/resources/svg-manifest.xml    |   24 +
 .../test/flex/FlexUnitFlexJSApplication.mxml    |   46 +
 .../projects/HTML/src/test/flex/build.xml       |  165 ++
 .../flex/flexUnitTests/DataGridColumnTester.as  |   27 +
 .../flexUnitTests/DataGridColumnTesterTest.as   |   55 +
 frameworks/projects/HTML/svg-manifest.xml       |   24 -
 .../projects/HTML5/.actionScriptProperties      |   57 +
 .../.externalToolBuilders/HTML5ASJS.launch      |   44 +
 frameworks/projects/HTML5/.flexLibProperties    |   24 +
 frameworks/projects/HTML5/.project              |   47 +
 .../.settings/org.eclipse.core.resources.prefs  |    3 +
 frameworks/projects/HTML5/as/defaults.css       |   68 -
 .../projects/HTML5/as/src/HTML5Classes.as       |   33 -
 .../as/src/org/apache/flex/html5/Button.as      |   26 -
 .../as/src/org/apache/flex/html5/CheckBox.as    |   26 -
 .../as/src/org/apache/flex/html5/ComboBox.as    |   26 -
 .../src/org/apache/flex/html5/DropDownList.as   |   26 -
 .../HTML5/as/src/org/apache/flex/html5/Label.as |   33 -
 .../HTML5/as/src/org/apache/flex/html5/List.as  |   33 -
 .../as/src/org/apache/flex/html5/RadioButton.as |   26 -
 .../as/src/org/apache/flex/html5/TextArea.as    |   26 -
 .../as/src/org/apache/flex/html5/TextButton.as  |   30 -
 .../as/src/org/apache/flex/html5/TextInput.as   |   25 -
 frameworks/projects/HTML5/build.xml             |   75 +-
 .../projects/HTML5/compile-asjs-config.xml      |   70 -
 frameworks/projects/HTML5/compile-config.xml    |   83 -
 frameworks/projects/HTML5/html5-manifest.xml    |   35 -
 .../HTML5/src/main/flex/HTML5Classes.as         |   33 +
 .../main/flex/org/apache/flex/html5/Button.as   |   26 +
 .../main/flex/org/apache/flex/html5/CheckBox.as |   26 +
 .../main/flex/org/apache/flex/html5/ComboBox.as |   26 +
 .../flex/org/apache/flex/html5/DropDownList.as  |   26 +
 .../main/flex/org/apache/flex/html5/Label.as    |   33 +
 .../src/main/flex/org/apache/flex/html5/List.as |   33 +
 .../flex/org/apache/flex/html5/RadioButton.as   |   26 +
 .../main/flex/org/apache/flex/html5/TextArea.as |   26 +
 .../flex/org/apache/flex/html5/TextButton.as    |   30 +
 .../flex/org/apache/flex/html5/TextInput.as     |   25 +
 .../src/main/resources/compile-asjs-config.xml  |   70 +
 .../HTML5/src/main/resources/compile-config.xml |   83 +
 .../HTML5/src/main/resources/defaults.css       |   68 +
 .../HTML5/src/main/resources/html5-manifest.xml |   35 +
 .../projects/JQuery/.actionScriptProperties     |   40 +-
 .../.externalToolBuilders/JQueryASJS.launch     |   44 +
 frameworks/projects/JQuery/.flexLibProperties   |   18 +
 frameworks/projects/JQuery/.project             |   36 +-
 frameworks/projects/JQuery/as/defaults.css      |   51 -
 .../projects/JQuery/as/src/JQueryClasses.as     |   33 -
 .../src/org/apache/flex/jquery/Application.as   |   43 -
 .../as/src/org/apache/flex/jquery/CheckBox.as   |   27 -
 .../src/org/apache/flex/jquery/RadioButton.as   |   43 -
 .../as/src/org/apache/flex/jquery/TextButton.as |   56 -
 .../org/apache/flex/jquery/ToggleTextButton.as  |   42 -
 frameworks/projects/JQuery/build.xml            |   82 +-
 .../projects/JQuery/compile-asjs-config.xml     |   86 -
 frameworks/projects/JQuery/compile-config.xml   |   83 -
 frameworks/projects/JQuery/jquery-manifest.xml  |   30 -
 .../JQuery/src/main/flex/JQueryClasses.as       |   33 +
 .../flex/org/apache/flex/jquery/Application.as  |   43 +
 .../flex/org/apache/flex/jquery/CheckBox.as     |   27 +
 .../flex/org/apache/flex/jquery/RadioButton.as  |   43 +
 .../flex/org/apache/flex/jquery/TextButton.as   |   56 +
 .../org/apache/flex/jquery/ToggleTextButton.as  |   42 +
 .../src/main/resources/compile-asjs-config.xml  |   86 +
 .../src/main/resources/compile-config.xml       |   83 +
 .../JQuery/src/main/resources/defaults.css      |   51 +
 .../src/main/resources/jquery-manifest.xml      |   30 +
 .../projects/Mobile/.actionScriptProperties     |   40 +-
 .../.externalToolBuilders/MobileASJS.launch     |   44 +
 frameworks/projects/Mobile/.flexLibProperties   |   18 +
 frameworks/projects/Mobile/.project             |   36 +-
 frameworks/projects/Mobile/as/defaults.css      |   33 -
 .../projects/Mobile/as/src/CordovaClasses.as    |   36 -
 .../projects/Mobile/as/src/MobileClasses.as     |   43 -
 .../as/src/org/apache/cordova/Application.as    |   56 -
 .../Mobile/as/src/org/apache/cordova/Weinre.as  |   88 -
 .../as/src/org/apache/cordova/camera/Camera.as  |  179 --
 .../as/src/org/apache/flex/mobile/IView.as      |   43 -
 .../src/org/apache/flex/mobile/IViewManager.as  |   42 -
 .../src/org/apache/flex/mobile/ManagerBase.as   |  184 --
 .../apache/flex/mobile/StackedViewManager.as    |  161 --
 .../org/apache/flex/mobile/TabbedViewManager.as |   85 -
 .../as/src/org/apache/flex/mobile/View.as       |  103 --
 .../org/apache/flex/mobile/ViewManagerBase.as   |  236 ---
 .../flex/mobile/beads/StackedViewManagerView.as |  127 --
 .../flex/mobile/beads/TabbedViewManagerView.as  |  139 --
 .../apache/flex/mobile/beads/ViewManagerView.as |  165 --
 .../apache/flex/mobile/chrome/NavigationBar.as  |  103 --
 .../src/org/apache/flex/mobile/chrome/TabBar.as |   50 -
 .../org/apache/flex/mobile/chrome/ToolBar.as    |   80 -
 .../flex/mobile/models/ViewManagerModel.as      |  263 ---
 frameworks/projects/Mobile/basic-manifest.xml   |   29 -
 frameworks/projects/Mobile/build.xml            |   75 +-
 .../projects/Mobile/compile-asjs-config.xml     |   89 -
 frameworks/projects/Mobile/compile-config.xml   |   89 -
 frameworks/projects/Mobile/cordova-manifest.xml |   28 -
 .../Mobile/src/main/flex/CordovaClasses.as      |   36 +
 .../Mobile/src/main/flex/MobileClasses.as       |   45 +
 .../main/flex/org/apache/cordova/Application.as |   56 +
 .../src/main/flex/org/apache/cordova/Weinre.as  |   88 +
 .../flex/org/apache/cordova/camera/Camera.as    |  179 ++
 .../main/flex/org/apache/flex/mobile/IView.as   |   43 +
 .../flex/org/apache/flex/mobile/IViewManager.as |   42 +
 .../flex/org/apache/flex/mobile/ManagerBase.as  |  184 ++
 .../apache/flex/mobile/StackedViewManager.as    |  161 ++
 .../org/apache/flex/mobile/TabbedViewManager.as |   85 +
 .../main/flex/org/apache/flex/mobile/View.as    |  103 ++
 .../org/apache/flex/mobile/ViewManagerBase.as   |  236 +++
 .../flex/mobile/beads/MobileWebBrowserView.as   |  143 ++
 .../flex/mobile/beads/StackedViewManagerView.as |  127 ++
 .../flex/mobile/beads/TabbedViewManagerView.as  |  139 ++
 .../apache/flex/mobile/beads/ViewManagerView.as |  165 ++
 .../apache/flex/mobile/chrome/NavigationBar.as  |  103 ++
 .../org/apache/flex/mobile/chrome/TabBar.as     |   50 +
 .../org/apache/flex/mobile/chrome/ToolBar.as    |   80 +
 .../flex/mobile/models/ViewManagerModel.as      |  263 +++
 .../src/main/resources/basic-manifest.xml       |   29 +
 .../src/main/resources/compile-asjs-config.xml  |   89 +
 .../src/main/resources/compile-config.xml       |   89 +
 .../src/main/resources/cordova-manifest.xml     |   28 +
 .../Mobile/src/main/resources/defaults.css      |   33 +
 .../projects/Network/.actionScriptProperties    |   38 +-
 .../.externalToolBuilders/NetworkASJS.launch    |   44 +
 frameworks/projects/Network/.flexLibProperties  |   18 +
 frameworks/projects/Network/.project            |   35 +-
 .../projects/Network/as/src/NetworkClasses.as   |   33 -
 .../src/org/apache/flex/net/BinaryUploader.as   |  738 --------
 .../as/src/org/apache/flex/net/HTTPHeader.as    |   79 -
 .../as/src/org/apache/flex/net/HTTPService.as   |  805 --------
 .../src/org/apache/flex/net/HTTPServiceBase.as  |   47 -
 frameworks/projects/Network/basic-manifest.xml  |   27 -
 frameworks/projects/Network/build.xml           |   80 +-
 .../projects/Network/compile-asjs-config.xml    |   82 -
 frameworks/projects/Network/compile-config.xml  |   78 -
 .../Network/src/main/flex/NetworkClasses.as     |   33 +
 .../flex/org/apache/flex/net/BinaryUploader.as  |  738 ++++++++
 .../main/flex/org/apache/flex/net/HTTPHeader.as |   79 +
 .../flex/org/apache/flex/net/HTTPService.as     |  805 ++++++++
 .../flex/org/apache/flex/net/HTTPServiceBase.as |   47 +
 .../src/main/resources/basic-manifest.xml       |   27 +
 .../src/main/resources/compile-asjs-config.xml  |   82 +
 .../src/main/resources/compile-config.xml       |   78 +
 .../projects/Reflection/.actionScriptProperties |   56 +
 .../.externalToolBuilders/ReflectionASJS.launch |   44 +
 .../projects/Reflection/.flexLibProperties      |   24 +
 frameworks/projects/Reflection/.project         |   46 +
 .../.settings/org.eclipse.core.resources.prefs  |    3 +
 frameworks/projects/Reflection/build.xml        |  173 ++
 .../apache/flex/reflection/DefinitionBase.as    |   51 +
 .../flex/reflection/DefinitionWithMetaData.as   |   79 +
 .../flex/reflection/FunctionDefinition.as       |   37 +
 .../flex/reflection/MetaDataArgDefinition.as    |   45 +
 .../flex/reflection/MetaDataDefinition.as       |   71 +
 .../apache/flex/reflection/MethodDefinition.as  |   50 +
 .../apache/flex/reflection/TypeDefinition.as    |  260 +++
 .../flex/reflection/VariableDefinition.as       |   38 +
 .../org/apache/flex/reflection/describeType.as  |   47 +
 .../flex/reflection/getDefinitionByName.as      |   51 +
 .../flex/reflection/getQualifiedClassName.as    |   51 +
 .../reflection/getQualifiedSuperclassName.as    |   49 +
 .../src/main/resources/compile-asjs-config.xml  |   77 +
 .../src/main/resources/compile-config.xml       |   73 +
 installer.xml                                   |    4 +
 js/bin/asjsc                                    |    2 +-
 js/bin/asjscompc                                |    2 +-
 js/bin/asnodec                                  |   70 +
 js/bin/asnodec.bat                              |   29 +
 js/bin/compc                                    |    2 +-
 js/bin/externc                                  |    2 +-
 js/bin/jquery                                   |    2 +-
 js/bin/mxmlc                                    |    2 +-
 manualtests/ReflectionTest/build.xml            |   72 +
 .../ReflectionTest/src/MyInitialView.mxml       |  110 ++
 manualtests/ReflectionTest/src/README.txt       |   45 +
 .../ReflectionTest/src/ReflectionTest.mxml      |   40 +
 .../src/controllers/MyController.as             |   52 +
 .../ReflectionTest/src/models/MyModel.as        |  125 ++
 manualtests/build_example.xml                   |    7 +-
 marmotinni/build.xml                            |  122 +-
 marmotinni/java/downloads.xml                   |    6 +-
 1417 files changed, 96934 insertions(+), 85600 deletions(-)
----------------------------------------------------------------------



[24/49] git commit: [flex-asjs] [refs/heads/develop] - add smarter defaults to XML build

Posted by ha...@apache.org.
add smarter defaults to XML build


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7a6f9154
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7a6f9154
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7a6f9154

Branch: refs/heads/develop
Commit: 7a6f91546e76d52e017e9c39a4d2665bb24b6b59
Parents: 41ac2e1
Author: Alex Harui <ah...@apache.org>
Authored: Sun Feb 14 22:11:43 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Sun Feb 14 22:11:43 2016 -0800

----------------------------------------------------------------------
 frameworks/projects/XML/build.xml | 63 +++++++++++++++++++++++++++-------
 1 file changed, 51 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7a6f9154/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index ec948ec..4d3f14e 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -26,14 +26,18 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
-    <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
-    <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
-    <property name="target.name" value="XML-${release.version}.swc" />
-    <property name="target.name.no.version" value="XML.swc" />
-
-    <target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc">
+    
+    <target name="more-props" >
+        <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
+        <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" />
+        <property name="target.name" value="XML-${release.version}.swc" />
+        <property name="target.name.no.version" value="XML.swc" />
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+    </target>
+    
+    <target name="main" depends="clean,check-falcon-home,check-falconjx-home,more-props,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc">
     </target>
     
     <target name="test" unless="is.jenkins">
@@ -61,10 +65,6 @@
         </delete>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
         <echo message="Compiling libs/XML.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
@@ -169,4 +169,43 @@
         </copy>
     </target>
 
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler/generated/dist/sdk folder in flex-falcon repo or this folder if it has been converted into an FB-compatible SDK"
+        unless="FALCON_HOME"/>
+    </target>
+
+    <target name="check-falconjx-home" unless="FALCONJX_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCONJX_HOME is ${env.FALCONJX_HOME}"/>
+        
+        <available file="${env.FALCONJX_HOME}/lib/jsc.jar"
+        type="file"
+        property="FALCONJX_HOME"
+        value="${env.FALCONJX_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler.jx/lib/jsc.jar"
+        type="file"
+        property="FALCONJX_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler.jx"/>
+        
+        <fail message="FALCONJX_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler.jx folder in flex-falcon repo or the js folder if it has been converted into an FB-compatible SDK"
+        unless="FALCONJX_HOME"/>
+    </target>
+
+
 </project>


[45/49] git commit: [flex-asjs] [refs/heads/develop] - Worked around FLEX-35067 Fixed typo

Posted by ha...@apache.org.
Worked around FLEX-35067
Fixed typo


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/40d5bf39
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/40d5bf39
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/40d5bf39

Branch: refs/heads/develop
Commit: 40d5bf39e520389765de3f4d7bff21bf0540bc0b
Parents: 90c70ce
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 10 17:38:57 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 10 17:38:57 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40d5bf39/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index b2222b6..93ba2b1 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -265,11 +265,11 @@ package
 		static public function defaultSettings():Object
 		{
 			return {
-			    ignoreComments : true,
-			    ignoreProcessingInstructions : true,
-			    ignoreWhitespace : true,
-			    prettyIndent : 2,
-			    prettyPrinting : true
+			    "ignoreComments" : true,
+			    "ignoreProcessingInstructions" : true,
+			    "ignoreWhitespace" : true,
+			    "prettyIndent" : 2,
+			    "prettyPrinting" : true
 			}
 		}
 		
@@ -301,11 +301,11 @@ package
 		static public function settings():Object
 		{
 			return {
-			    ignoreComments : ignoreComments,
-			    ignoreProcessingInstructions : ignoreProcessingInstructions,
-			    ignoreWhitespace : ignoreWhitespace,
-			    prettyIndent : prettyIndent,
-			    prettyPrinting : prettyPrinting
+			    "ignoreComments" : ignoreComments,
+			    "ignoreProcessingInstructions" : ignoreProcessingInstructions,
+			    "ignoreWhitespace" : ignoreWhitespace,
+			    "prettyIndent" : prettyIndent,
+			    "prettyPrinting" : prettyPrinting
 			}
 		}
 
@@ -711,7 +711,7 @@ package
 			xml.setNodeKind(_nodeKind);
 			xml.setName(name());
 			xml.setValue(_value);
-			for(i-0;i<_namespaces.length;i++)
+			for(i=0;i<_namespaces.length;i++)
 			{
 				xml.addNamespace(new Namespace(_namespaces[i]));
 			}


[41/49] git commit: [flex-asjs] [refs/heads/develop] - change how compile flags are used so it builds successfully

Posted by ha...@apache.org.
change how compile flags are used so it builds successfully


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a5ea916d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a5ea916d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a5ea916d

Branch: refs/heads/develop
Commit: a5ea916d77840080e69510a092ac88bc2e670420
Parents: 75bbdd3
Author: Alex Harui <ah...@apache.org>
Authored: Sat Apr 9 22:57:35 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sat Apr 9 22:57:35 2016 -0700

----------------------------------------------------------------------
 .../projects/XML/src/main/flex/Namespace.as     |  9 +--
 frameworks/projects/XML/src/main/flex/QName.as  | 10 ++-
 frameworks/projects/XML/src/main/flex/XML.as    | 72 +++++++++++++++++++-
 .../projects/XML/src/main/flex/XMLList.as       | 33 ++++++++-
 4 files changed, 111 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a5ea916d/frameworks/projects/XML/src/main/flex/Namespace.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/Namespace.as b/frameworks/projects/XML/src/main/flex/Namespace.as
index c79ddbe..93f8eab 100644
--- a/frameworks/projects/XML/src/main/flex/Namespace.as
+++ b/frameworks/projects/XML/src/main/flex/Namespace.as
@@ -16,13 +16,12 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
 package
 {
 	public class Namespace
 	{
-		public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
+		COMPILE::JS
+    	public function Namespace(prefixOrUri:Object=null,uriValue:Object=null)
 		{
 			/*
 				When the Namespace constructor is called with a no arguments, one argument uriValue or two arguments prefixValue and uriValue, the following steps are taken:
@@ -119,16 +118,18 @@ package
 			_prefix = value;
 		}
 
+		COMPILE::JS
 		public function toString():String
 		{
 			return uri;
 		}
 
+		COMPILE::JS
 		override public function valueOf():*
 		{
 			return this;
 		}
 	}
 }
-}
+
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a5ea916d/frameworks/projects/XML/src/main/flex/QName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/QName.as b/frameworks/projects/XML/src/main/flex/QName.as
index 5232bbe..5ed6d42 100644
--- a/frameworks/projects/XML/src/main/flex/QName.as
+++ b/frameworks/projects/XML/src/main/flex/QName.as
@@ -16,12 +16,11 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
 package
 {
 	public class QName
 	{
+		COMPILE::JS
 		public function QName(qNameOrUri:*=null,localNameVal:*=null)
 		{
 			/*
@@ -96,15 +95,19 @@ package
 			_prefix = value;
 		}
 
+		COMPILE::JS
 		public function toString():String
 		{
 			return _localName;
 		}
 
+		COMPILE::JS
 		public function equals(name:QName):Boolean
 		{
 			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
 		}
+		
+    	COMPILE::JS
 		public function matches(name:QName):Boolean
 		{
 			if(this.uri == "*" || name.uri == "*")
@@ -125,6 +128,7 @@ package
 			_isAttribute = value;
 		}
 
+		COMPILE::JS
 		public function getNamespace(namespaces:Array=null):Namespace
 		{
 			/*
@@ -158,5 +162,5 @@ package
 
 	}
 }
-}
+
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a5ea916d/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 27a7094..720a6b0 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -16,8 +16,6 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
 package
 {
 	public class XML
@@ -31,6 +29,7 @@ package
 
 		static private var defaultNamespace:Namespace;
 
+		COMPILE::JS
 		static public function setDefaultNamespace(ns:*):void
 		{
 			if(!ns)
@@ -86,6 +85,7 @@ package
 		 */
 		static public var prettyPrinting:Boolean = true;
 		
+		COMPILE::JS
 		static private function escapeAttributeValue(value:String):String
 		{
 			var outArr:Array = [];
@@ -118,6 +118,7 @@ package
 			return outArr.join("");
 		}
 
+		COMPILE::JS
 		static private function escapeElementValue(value:String):String
 		{
 			var i:int;
@@ -144,6 +145,7 @@ package
 			return outArr.join("");
 		}
 
+		COMPILE::JS
 		static private function insertAttribute(att:Attr,parent:XML):XML
 		{
 			var xml:XML = new XML();
@@ -154,6 +156,7 @@ package
 			parent.addChild(xml);
 			return xml;
 		}
+		COMPILE::JS
 		static private function iterateElement(node:Element,xml:XML):void
 		{
 			var i:int;
@@ -174,6 +177,7 @@ package
 		* returns an XML object from an existing node without the need to parse the XML.
 		* The new XML object is not normalized
 		*/
+		COMPILE::JS
 		static private function fromNode(node:Element):XML
 		{
 			var xml:XML;
@@ -227,6 +231,7 @@ package
 			return xml;
 		}
 
+		COMPILE::JS
 		static private function namespaceInArray(ns:Namespace,arr:Array,considerPrefix:Boolean=true):Boolean
 		{
 			if(!arr)
@@ -245,6 +250,7 @@ package
 			return false;
 		}
 
+		COMPILE::JS
 		static private function trimXMLWhitespace(value:String):String
 		{
 			return value.replace(/^\s+|\s+$/gm,'');
@@ -255,6 +261,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		static public function defaultSettings():Object
 		{
 			return {
@@ -271,6 +278,7 @@ package
 		 * @param rest
 		 * 
 		 */
+		COMPILE::JS
 		static public function setSettings(value:Object):void
 		{
 			if(!value)
@@ -289,6 +297,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		static public function settings():Object
 		{
 			return {
@@ -301,6 +310,7 @@ package
 		}
 
 
+		COMPILE::JS
 		public function XML(xml:String = null)
 		{
 			if(xml)
@@ -357,6 +367,7 @@ package
 		 *
 		 * 	
 		 */
+		COMPILE::JS
 		public function addChild(child:XML):void
 		{
 			if(!child)
@@ -384,6 +395,7 @@ package
 		 * @return 
 		 * 	
 		 */
+		COMPILE::JS
 		public function addNamespace(ns:Namespace):XML
 		{
 			/*
@@ -442,6 +454,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function appendChild(child:XML):XML
 		{
 			/*
@@ -478,6 +491,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function attribute(attributeName:*):XMLList
 		{
 			var i:int;
@@ -502,6 +516,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function attributes():XMLList
 		{
 			var i:int;
@@ -520,6 +535,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function child(propertyName:Object):XMLList
 		{
 			/*
@@ -578,6 +594,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function childIndex():int
 		{
 			if(!_parent)
@@ -592,6 +609,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function children():XMLList
 		{
 			var i:int;
@@ -609,6 +627,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function comments():XMLList
 		{
 			var i:int;
@@ -622,6 +641,7 @@ package
 			return list;
 		}
 		
+		COMPILE::JS
 		public function concat(list:*):XMLList
 		{
 			if(list is XML)
@@ -649,6 +669,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function contains(value:XML):Boolean
 		{
 			return this.equals(value);
@@ -660,6 +681,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function copy():XML
 		{
 			/*
@@ -698,6 +720,7 @@ package
 			return xml;
 		}
 
+		COMPILE::JS
 		private function deleteChildAt(idx:int):void
 		{
 			if(idx < 0)
@@ -716,6 +739,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function descendants(name:Object = "*"):XMLList
 		{
 			/*
@@ -766,6 +790,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function elements(name:Object = "*"):XMLList
 		{
 			if(!name)
@@ -786,6 +811,7 @@ package
 			return null;
 		}
 
+		COMPILE::JS
 		public function equals(xml:*):Boolean
 		{
 			/*
@@ -842,6 +868,7 @@ package
 			return true;
 		}
 
+		COMPILE::JS
 		public function hasAttribute(nameOrXML:*,value:String=null):Boolean
 		{
 			if(!_attributes)
@@ -869,6 +896,7 @@ package
 			return false;
 		}
 
+		COMPILE::JS
 		private function getAncestorNamespaces(namespaces:Array):Array
 		{
 			//don't modify original
@@ -909,11 +937,13 @@ package
 			return _children ? _children.slice() : [];
 		}
 
+		COMPILE::JS
 		public function getIndexOf(elem:XML):int
 		{
 			return _children.indexOf(elem);
 		}
 		
+		COMPILE::JS
 		private function getURI(prefix:String):String
 		{
 			var i:int;
@@ -936,6 +966,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function hasComplexContent():Boolean
 		{
 			/*
@@ -956,6 +987,7 @@ package
 			return false;
 		}
 
+		COMPILE::JS
 		override public function hasOwnProperty(p:*):Boolean
 		{
 			/*
@@ -998,6 +1030,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function hasSimpleContent():Boolean
 		{
 			/*
@@ -1024,11 +1057,13 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function inScopeNamespaces():Array
 		{
 			return _namespaces.slice();
 		}
 		
+		COMPILE::JS
 		private function insertChildAt(child:XML,idx:int):void{
 			/*
 				When the [[Insert]] method of an XML object x is called with property name P and value V, the following steps are taken:
@@ -1067,6 +1102,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function insertChildAfter(child1:XML, child2:XML):XML
 		{
 			/*
@@ -1103,6 +1139,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function insertChildBefore(child1:XML, child2:XML):XML
 		{
 			/*
@@ -1139,6 +1176,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function length():int
 		{
 			return 1;
@@ -1150,6 +1188,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function localName():Object
 		{
 			return name().localName;
@@ -1163,6 +1202,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function name():Object
 		{
 			if(!_name)
@@ -1177,6 +1217,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function namespace(prefix:String = null):*
 		{
 			/*
@@ -1220,6 +1261,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function namespaceDeclarations():Array
 		{
 			/*
@@ -1290,6 +1332,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function normalize():XML
 		{
 			var len:int = _children.length-1;
@@ -1324,6 +1367,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function parent():*
 		{
 			return _parent;
@@ -1335,6 +1379,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function prependChild(child:XML):XML
 		{
 			child.setParent(this);
@@ -1351,6 +1396,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function processingInstructions(name:String = "*"):XMLList
 		{
 			return null;
@@ -1363,6 +1409,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function removeChild(child:XML):Boolean
 		{
 			/*
@@ -1417,6 +1464,7 @@ package
 			child.setParent(null);
 			return removed;
 		}
+		COMPILE::JS
 		private function removeChildByName(name:*):Boolean
 		{
 			var i:int;
@@ -1455,6 +1503,7 @@ package
 			}
 			return removedItem;
 		}
+		COMPILE::JS
 		public function removeChildAt(index:int):void
 		{
 			/*
@@ -1482,6 +1531,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function removeNamespace(ns:*):XML
 		{
 			/*
@@ -1543,6 +1593,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function replace(propertyName:Object, value:*):XML
 		{
 			/*
@@ -1575,6 +1626,7 @@ package
 			return null;
 		}
 
+		COMPILE::JS
 		private function replaceChild(idx:int,v:*):void
 		{
 			/*
@@ -1628,6 +1680,7 @@ package
 			}
 		}
 
+		COMPILE::JS
 		private function isAncestor(xml:XML):Boolean
 		{
 			var p:XML = parent();
@@ -1640,6 +1693,7 @@ package
 			return false;
 		}
 
+		COMPILE::JS
 		public function setAttribute(attr:*,value:String):void
 		{
 			var i:int;
@@ -1691,6 +1745,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function setChild(elementName:*, elements:Object):void
 		{
 			
@@ -1809,6 +1864,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function setChildren(value:Object):XML
 		{
 			var i:int;
@@ -1861,6 +1917,7 @@ package
 		 * @param name
 		 * 
 		 */
+		COMPILE::JS
 		public function setLocalName(name:String):void
 		{
 			if(!_name)
@@ -1875,6 +1932,7 @@ package
 		 * @param name
 		 * 
 		 */
+		COMPILE::JS
 		public function setName(name:*):void
 		{
 			if(name is QName)
@@ -1889,6 +1947,7 @@ package
 		 * @param ns
 		 * 
 		 */
+		COMPILE::JS
 		public function setNamespace(ns:Object):void
 		{
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
@@ -1916,6 +1975,7 @@ package
 			_nodeKind = value;
 		}
 		
+		COMPILE::JS
 		public function setParent(parent:XML):void
 		{
 			var oldParent:XML = _parent;
@@ -1936,6 +1996,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function text():XMLList
 		{
 			var list:XMLList = new XMLList();
@@ -1969,6 +2030,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function toString():String
 		{
 			// text, comment, processing-instruction, attribute, or element
@@ -1981,6 +2043,7 @@ package
 			return toXMLString();
 		}
 
+		COMPILE::JS
 		private function toAttributeName(name:*):QName
 		{
 			var qname:QName;
@@ -1994,6 +2057,7 @@ package
 			qname.isAttribute = true;
 			return qname;
 		}
+		COMPILE::JS
 		private function toXMLName(name:*):QName
 		{
 			var qname:QName;
@@ -2049,6 +2113,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function toXMLString(indentLevel:int=0,ancestors:Array=null):String
 		{
 			/*
@@ -2264,6 +2329,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		override public function valueOf():*
 		{
 			return this;
@@ -2271,4 +2337,4 @@ package
 		
 	}
 }
-}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a5ea916d/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index cacbfc1..ef16906 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -16,16 +16,16 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-COMPILE::JS
-{
 package
 {
 	public class XMLList
 	{
+		COMPILE::JS
 		public function XMLList()
 		{
 			addIndex(0);
 		}
+		COMPILE::JS
 		private var _xmlArray:Array = [];
 		/*
 			9.2.1.2 [[Put]] (P, V)
@@ -108,6 +108,7 @@ package
 			  b. Call the [[Put]] method of x[0] with arguments P and V
 			4. Return
 		*/
+		COMPILE::JS
 		private function addIndex(idx:int):void
 		{
 			var idxStr:String = "" + idx;
@@ -145,6 +146,7 @@ package
 			);
 		}
 		
+		COMPILE::JS
 		public function appendChild(child:XML):void
 		{
 			addIndex(_xmlArray.length);
@@ -158,6 +160,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function attribute(attributeName:*):XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -176,6 +179,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function attributes():XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -195,6 +199,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function child(propertyName:Object):XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -213,6 +218,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function children():XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -231,6 +237,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function comments():XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -244,6 +251,7 @@ package
 			return retVal;
 		}
 		
+		COMPILE::JS
 		public function concat(list:*):XMLList
 		{
 			if(list is XML)
@@ -269,6 +277,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function contains(value:XML):Boolean
 		{
 			
@@ -287,6 +296,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function copy():XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -304,6 +314,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function descendants(name:Object = "*"):XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -324,6 +335,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function elements(name:Object = "*"):XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -337,6 +349,7 @@ package
 			return retVal;
 		}
 
+		COMPILE::JS
 		public function equals(list:*):Boolean
 		{
 			/*
@@ -364,6 +377,7 @@ package
 			return false;
 		}
 		
+		COMPILE::JS
 		public function hasComplexContent():Boolean
 		{
 			//what to do with multiple nodes? If anything is complex, we return true.
@@ -378,6 +392,7 @@ package
 			return false;
 		}
 
+		COMPILE::JS
 		override public function hasOwnProperty(propertyName:*):Boolean
 		{
 			/*
@@ -410,6 +425,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function hasSimpleContent():Boolean
 		{
 			//what to do with multiple nodes? If anything is complex, we return false.
@@ -430,6 +446,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function length():int
 		{
 			return _xmlArray.length;
@@ -442,6 +459,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function normalize():XMLList
 		{
 			/*
@@ -472,6 +490,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function parent():Object
 		{
 			if(_xmlArray.length == 0)
@@ -493,6 +512,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function processingInstructions(name:String = "*"):XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -513,6 +533,7 @@ package
 			return retVal;
 		}
 
+		COMPILE::JS
 		public function removeChild(child:*):void
 		{
 			var i:int;
@@ -538,6 +559,7 @@ package
 			}
 		}
 
+		COMPILE::JS
 		public function removeChildAt(idx:int):void
 		{
 			if(idx >= 0 && idx < _xmlArray.length)
@@ -580,6 +602,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function text():XMLList
 		{
 			var retVal:XMLList = new XMLList();
@@ -599,6 +622,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		override public function toLocaleString():String
 		{
 			var retVal:Array = [];
@@ -618,6 +642,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function toString():String
 		{
 			var retVal:Array = [];
@@ -637,6 +662,7 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		public function toXMLString():String
 		{
 			var retVal:Array = [];
@@ -656,10 +682,11 @@ package
 		 * @return 
 		 * 
 		 */
+		COMPILE::JS
 		override public function valueOf():*
 		{
 			return this;
 		}
 	}
 }
-}
+