gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ./ChangeLog ./autogen.sh ./Makefile.am te...


From: Rob Savoye
Subject: [Gnash-commit] gnash ./ChangeLog ./autogen.sh ./Makefile.am te...
Date: Thu, 09 Feb 2006 02:33:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         
Changes by:     Rob Savoye <address@hidden>     06/02/09 02:33:53

Modified files:
        .              : ChangeLog autogen.sh Makefile.am 
        testsuite/actionscript.all: XML.as 
        server         : Makefile.am action.cpp xml.cpp xml.h 
        doc            : omf.make xmldocs.make 
        doc/C          : Makefile.am appendix.xml internals.xml 
        macros         : docbook.m4 firefox.m4 ghelp.m4 
Added files:
        server         : xmlattrs.cpp xmlattrs.h xmlnode.cpp xmlnode.h 
        doc/C          : gnash-C.omf 
Removed files:
        doc/C          : gnash.omf 

Log message:
        * Makefile.am: Rearrange directories for SUBDIRS and
        DIST_SUBDIRS.
        * autogen.sh: Remove hardcoded path to /usr/bin.
        * doc/C/appendix.xml: Add section to "Coding Style" about Doxygen
        style somments.
        * doc/C/internals.xml: Metion code generatrion scripts in
        CVS. Expand "Adding ActionScript" section  Add sectioj on
        parameter passing for callbacks. Add section on testing Gnash.
        * server/Makefile.am: Add xmlattrs and xmlnodes to the list of
        headers and source files.
        * server/xml.h: Move XMLAttrs and XMLNode to their own source
        files to reduce clutter. Use std::vector instead of "tu
        array". Add new accessors to use for testing. Move a few method
        definitions to the source file.
        * server/xml.cpp:  Move XMLAttrs and XMLNode to their own source
        files to reduce clutter. Use std::vector instead of "tu array".
        Add new accessors to use for testing. Move a few method
        definitions from the header file. Implement XML::appendChild(),
        XMLNode::appendChild(), XML::createElement(), XML::cloneNode(),
        and XML::createTextNode().
        * testsuite/actionscript/XML.as: Add tests for the new methods.
        * server/xmlattrs.{h,cpp}: New file for XMLAttr class moved out of
        xml.h.
        * server/xmlnode.{h,cpp}:  New file for XMLAttr class moved out of
        xml.h.
        2006-02-06  Patrice Dumas  <pertusus at free.fr>
        * macros/docbook.m4: enable by default. Add an AM_CONDITIONNAL for
        each of the formats.
        * macros/ghelp.m4: enable by default. Correct AC_PATH_PROG 3rd arg.
        Don't check for the user is root (the user needs to be root only
        for make install, in case he wants to run scrollkeeper-update).
        * doc/omf.make: don't use $(GHELP) it is never set. Test for the
        user being root only when running scrollkeeper-update, any user
        may install the files. Use $(omffile) instead of $(srcdir)/*.omf.
        Add $(DESTDIR).
        * doc/xmldocs.make: move general stuff to doc/C/Makefile.am
        (EXTRA_DIST, CLEANFILES, xml_files). Similarly, define all-local
        and not all. Add amissing $(DESTDIR). Take dist-hook and
        install-data-hook from doc/C/Makefile.am.
        * doc/C/Makefile.am: use the GHELP automake conditionnal to
        conditionnally include scrollkeeper stuff. Remove XML_FILES, as
        xml_files from the scrollkeeper code is the same. Distribute
        info and texi files. Simplify rules to build docs and
        conditionnalize on automake conditionnals. If the tools aren't
        there, touch the files. As the doc files requires specific
        tools to build, flag them as MAINTAINERCLEANFILES.
        * doc/C/gnash.omf: rename to gnash-C.omf and minor changes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.107&tr2=1.108&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/autogen.sh.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/Makefile.am.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/XML.as.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Makefile.am.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlattrs.cpp?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlattrs.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlnode.cpp?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlnode.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/omf.make.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/xmldocs.make.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/C/Makefile.am.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/C/appendix.xml.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/C/gnash-C.omf?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/C/internals.xml.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/macros/docbook.m4.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/macros/firefox.m4.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/macros/ghelp.m4.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.107 gnash/ChangeLog:1.108
--- gnash/ChangeLog:1.107       Thu Feb  9 00:37:25 2006
+++ gnash/ChangeLog     Thu Feb  9 02:33:53 2006
@@ -1,3 +1,56 @@
+2006-02-08  Rob Savoye  <address@hidden>
+
+       * Makefile.am: Rearrange directories for SUBDIRS and
+       DIST_SUBDIRS.
+       * autogen.sh: Remove hardcoded path to /usr/bin.
+       * doc/C/appendix.xml: Add section to "Coding Style" about Doxygen
+       style somments.
+       * doc/C/internals.xml: Metion code generatrion scripts in
+       CVS. Expand "Adding ActionScript" section  Add sectioj on
+       parameter passing for callbacks. Add section on testing Gnash.
+       * server/Makefile.am: Add xmlattrs and xmlnodes to the list of
+       headers and source files.
+       * server/xml.h: Move XMLAttrs and XMLNode to their own source
+       files to reduce clutter. Use std::vector instead of "tu
+       array". Add new accessors to use for testing. Move a few method
+       definitions to the source file.
+       * server/xml.cpp:  Move XMLAttrs and XMLNode to their own source
+       files to reduce clutter. Use std::vector instead of "tu array".
+       Add new accessors to use for testing. Move a few method
+       definitions from the header file. Implement XML::appendChild(),
+       XMLNode::appendChild(), XML::createElement(), XML::cloneNode(),
+       and XML::createTextNode().
+       * testsuite/actionscript/XML.as: Add tests for the new methods.
+       
+       * server/xmlattrs.{h,cpp}: New file for XMLAttr class moved out of
+       xml.h.
+       * server/xmlnode.{h,cpp}:  New file for XMLAttr class moved out of
+       xml.h.
+
+2006-02-06  Patrice Dumas  <pertusus at free.fr>
+
+       * macros/docbook.m4: enable by default. Add an AM_CONDITIONNAL for
+       each of the formats.
+       * macros/ghelp.m4: enable by default. Correct AC_PATH_PROG 3rd arg.
+       Don't check for the user is root (the user needs to be root only
+       for make install, in case he wants to run scrollkeeper-update).
+       * doc/omf.make: don't use $(GHELP) it is never set. Test for the
+       user being root only when running scrollkeeper-update, any user
+       may install the files. Use $(omffile) instead of $(srcdir)/*.omf.
+       Add $(DESTDIR).
+       * doc/xmldocs.make: move general stuff to doc/C/Makefile.am 
+       (EXTRA_DIST, CLEANFILES, xml_files). Similarly, define all-local 
+       and not all. Add amissing $(DESTDIR). Take dist-hook and 
+       install-data-hook from doc/C/Makefile.am.
+       * doc/C/Makefile.am: use the GHELP automake conditionnal to 
+       conditionnally include scrollkeeper stuff. Remove XML_FILES, as
+       xml_files from the scrollkeeper code is the same. Distribute
+       info and texi files. Simplify rules to build docs and 
+       conditionnalize on automake conditionnals. If the tools aren't
+       there, touch the files. As the doc files requires specific 
+       tools to build, flag them as MAINTAINERCLEANFILES.
+       * doc/C/gnash.omf: rename to gnash-C.omf and minor changes.
+
 2006-02-08 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/Global.as: _global functions tests
Index: gnash/Makefile.am
diff -u gnash/Makefile.am:1.11 gnash/Makefile.am:1.12
--- gnash/Makefile.am:1.11      Sun Feb  5 16:14:36 2006
+++ gnash/Makefile.am   Thu Feb  9 02:33:53 2006
@@ -15,14 +15,15 @@
 
 STD_DIRS = libbase libgeometry server backend utilities
 if PLUGIN
-PLUG_DIR = $(STD_DIRS) plugin
+PLUG_DIR = plugin
 endif
 if DOCBOOK
-DOC_DIRS = $(STD_DIRS) doc
+DOC_DIRS = doc
 endif
-SUBDIRS = $(STD_DIRS) $(PLUG_DIR)
-DIST_SUBDIRS = $(STD_DIRS)  $(PLUG_DIR) $(DOC_DIRS) testsuite
-EXTRA_DIST = macros
+SUBDIRS      = $(STD_DIRS) $(PLUG_DIR) $(DOC_DIRS)
+DIST_SUBDIRS = $(STD_DIRS) $(PLUG_DIR) $(DOC_DIRS) testsuite
+
+#EXTRA_DIST = macros
 # if HTTP
 # SUBDIRS += net $(STD_DIRS)
 # else
Index: gnash/autogen.sh
diff -u gnash/autogen.sh:1.3 gnash/autogen.sh:1.4
--- gnash/autogen.sh:1.3        Thu Jan 19 23:50:11 2006
+++ gnash/autogen.sh    Thu Feb  9 02:33:53 2006
@@ -21,8 +21,6 @@
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
-PATH=/usr/bin:$PATH    # FIXME
-
 DIE=0
 
 if [ -n "$GNOME2_DIR" ]; then
Index: gnash/doc/C/Makefile.am
diff -u gnash/doc/C/Makefile.am:1.7 gnash/doc/C/Makefile.am:1.8
--- gnash/doc/C/Makefile.am:1.7 Sat Feb  4 19:57:37 2006
+++ gnash/doc/C/Makefile.am     Thu Feb  9 02:33:53 2006
@@ -18,39 +18,20 @@
 #
 
 # Building a PDF using Apache FOP only works with fop-0.20.5 for now.
+if GHELP
 include $(top_srcdir)/doc/xmldocs.make
+endif
 
 STYLESDIR = @docbook_styles@
 
 figdir = images
 docname = gnash
 lang = C
-omffile = gnash.omf
-entities = legal.xml
-
-# additional documentation files
-docudir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
-imagesdir = $(docudir)/$(figdir)
-# dist_docu_DATA = gnash.html 
-dist_man_MANS = gnash.1
-
-noinst_SCRIPTS = gen-doc.sh
-
-html: gnash.html
-pdf:  gnash.pdf
-man:  gnash.1
-texi: gnash.texi
-info: gnash.info
-gnash.pdf gnash.html gnash.texi gnash.info: \
-       gnash.xml       \
-       sources.xml     \
-       internals.xml   \
-       $(XML_FILES)
-
-SUFFIXES = .xml .html .texi .pdf .info .1
-
-gnash.xml: 
-XML_FILES = \
+omffile = gnash-C.omf
+entities = legal.xml           \
+       gnash.xml               \
+       sources.xml             \
+       internals.xml           \
        accessibility.xml       \
        appendix.xml            \
        array.xml               \
@@ -62,6 +43,7 @@
        customactions.xml       \
        date.xml                \
        error.xml               \
+       fdl-appendix.xml        \
        function.xml            \
        key.xml                 \
        legal.xml               \
@@ -79,7 +61,6 @@
        selection.xml           \
        sharedobject.xml        \
        sound.xml               \
-       sources.xml             \
        stage.xml               \
        string.xml              \
        system.xml              \
@@ -90,97 +71,85 @@
        xml.xml                 \
        xmlsocket.xml
 
-EXTRA_DIST += $(XML_FILES)     \
-       $(noinst_SCRIPTS)       \
-       gnash-man.xml           \
-       gnash.html              \
-       gnash.pdf               \
+xml_files = $(entities) $(docname).xml
+
+#noinst_SCRIPT = gen-doc.sh
+#dist_man_MANS = gnash.1
+
+html: gnash.html
+pdf:  gnash.pdf
+man:  gnash.1
+texi: gnash.texi
+info: gnash.info
+gnash.pdf gnash.html gnash.texi: $(xml_files)
+
+SUFFIXES = .xml .html .texi .pdf .info .1
+
+EXTRA_DIST = \
+       $(xml_files)            \
+       $(omffile)              \
+       gnash.info              \
+       gnash.html              \
        gnash.1
 
 .xml.html:
-       @echo "Making HTML from XML source..."
-       @if test x"$(XSLTPROC)" != x; then \
-         $(XSLTPROC) --output $@ --nonet $(STYLESDIR)/html/docbook.xsl $< ; \
-       else \
-         echo "You need to install the xsltproc package"; \
-       fi
+if ENABLE_HTML
+       $(XSLTPROC) --output $@ --nonet $(STYLESDIR)/html/docbook.xsl $<
+else
+        touch $@
+endif
 
 .xml.pdf:
-       @echo "Making PDF from XML source..."
-       @if test x"$(FOP)" != x; then \
-         $(FOP) -xsl $(STYLESDIR)/fo/docbook.xsl -xml $< -pdf $@; \
-       else \
-         echo "You need to install the fop package"; \
-       fi
+if ENABLE_FOP
+       $(FOP) -xsl $(STYLESDIR)/fo/docbook.xsl -xml $< -pdf $@
+else
+        touch $@
+endif
 
 .xml.texi:
-       @echo "Making Texinfo from XML source..."
-       @if test x"$(DB2X_XSLTPROC)" != x -a x"$(DB2X_TEXIXML)" != x; then \
-         $(DB2X_XSLTPROC) -s texi $(srcdir)/gnash.xml -o gnash.txml; \
-         $(DB2X_TEXIXML) gnash.txml; \
-       fi
-       address@hidden(RM) gnash.txml
+if ENABLE_TEXI
+       basefile=$(notdir $(basename $<)); \
+       $(DB2X_XSLTPROC) -s texi $< --output $${basefile}.txml; \
+       $(DB2X_TEXIXML) --to-stdout $${basefile}.txml; \
+       sed -e '/setfilename/d' $${basefile}_manual_v*.texi > 
$${basefile}.texi; \
+       $(RM) $${basefile}_manual_v*.texi
+else
+       touch $@
+endif
 
 .texi.info:
-       @echo "Making INFO from Texinfo source..."
-       @if test x"$(MAKEINFO)" != x; then \
-         $(MAKEINFO) --force gnash.texi; \
-       else \
-         echo "You need to install the texinfo package"; \
-       fi
-       address@hidden(RM) gnash.texi
+       $(MAKEINFO) --force gnash.texi
 
-alldocs: html pdf man info
+gnash.1: gnash-man.xml
+if ENABLE_MAN
+       $(DB2X_XSLTPROC) -s man $(srcdir)/gnash-man.xml -o gnash.mxml
+       $(DB2X_MANXML) gnash.mxml
+       $(RM) gnash.mxml
+else
+        touch gnash.1
+endif
 
-dist-hook: app-dist-hook
+alldocs: html pdf man info
 
 lint:
        @xmllint $(srcdir)/gnash.xml
 
-CLEANFILES += \
-       gnash.pdf  \
-       gnash.rtf  \
-       gnash.html \
+CLEANFILES = \
        gnash.omf.out \
        manpage.links  \
        manpage.refs  \
        gnash.tex  \
        gnash.log  \
-       gnash.info \
-       gnash.texi \
+        gnash.texi \
+       gnash_manual_*.texi \
        gnash.txml \
-       gnash.1    \
        gnash.mxml \
        omf_timestamp
 
-#      @xsltproc --output pgd.1 --nonet $(STYLESDIR)/manpages/docbook.xsl 
$(srcdir)/gnash-man.xml
-gnash.1: gnash-man.xml
-       @echo "Making man pages from XML source..."
-       @if test x"$(DB2X_XSLTPROC)" != x -a x"$(DB2X_MANXML)" != x; then \
-         $(DB2X_XSLTPROC) -s man $(srcdir)/gnash-man.xml -o gnash.mxml;\
-         $(DB2X_MANXML) gnash.mxml;\
-       fi
-       address@hidden(RM) gnash.mxml
-
-#$(INSTALL_DATA) gnash.html $(DESTDIR)$(datadir)/doc/$(PACKAGE)-$(VERSION);
-#$(INSTALL_DATA) gnash.pdf  $(DESTDIR)$(datadir)/doc/$(PACKAGE)-$(VERSION);
-install-data-hook: install-data-hook-omf
-       @$(NORMAL_INSTALL)
-       test -z "$(imagesdir)" || $(mkdir_p) "$(DESTDIR)$(imagesdir)"
-       for png in $(srcdir)/images/*.png; do \
-           if test -f $$png; then \
-             $(INSTALL_DATA) $$png $(DESTDIR)$(imagedir)/; \
-           fi \
-         done
-
-uninstall-hook:
-       $(DESTDIR)$(imagesdir)/*.png
-
-# install GNOME help files, which are basically the html output
-# install-ghelp: gnash.html
-#      $(mkinstalldirs) $(gnash_helpdir)/images
-#      $(INSTALL_DATA) gnash.html $(gnash_helpdir)
-#      $(INSTALL_DATA) images/*.png $(gnash_helpdir)/images
+MAINTAINERCLEANFILES = \
+        gnash.pdf       \
+        gnash.1         \
+        gnash.info      \
+        gnash.html
 
-#      $(INSTALL_DATA) $(srcdir)/images/*.png $(gnash_helpdir)/images
 
Index: gnash/doc/C/appendix.xml
diff -u gnash/doc/C/appendix.xml:1.2 gnash/doc/C/appendix.xml:1.3
--- gnash/doc/C/appendix.xml:1.2        Sun Jan 29 06:25:55 2006
+++ gnash/doc/C/appendix.xml    Thu Feb  9 02:33:53 2006
@@ -76,6 +76,49 @@
 
     </para>
     
+    <para>
+      Other coding considerations are comments are good! Over
+      commenting isn't good, as some things like:
+
+      <programlisting>
+       counter++;              // increment counter
+      </programlisting>
+      
+      Gnash also uses <ulink type="http"
+      url="http://www.doxygen.org";>Doxygen</ulink>. style
+      comments. These get processed by Doxygen when building a cross
+      reference of all the classes, and is a good way to help push
+      internals documentation from the depths of the code into
+      documentation where it can be seen by others.
+    </para>
+
+    <para>
+      <code>Doxygen</code> style comments for <code>C++</code> code is
+      simply using three slashes <code>///</code> instead of the
+      standard two slashes <code>//</code> used for C++
+      comments. Here's a short comment block for the
+      <code>XML::cloneNode()</code> method:
+
+      <programlisting>
+       /// \brief copy a node
+       ///
+       /// Method; constructs and returns a new XML node of the same type,
+       /// name, value, and attributes as the specified XML object. If deep
+       /// is set to true, all child nodes are recursively cloned, resulting
+       /// in an exact copy of the original object's document tree.
+       XMLNode &amp;
+       XML::cloneNode(XMLNode &amp;newnode, bool deep) {
+       ...
+       }
+      </programlisting> 
+    </para>
+    
+    <para>
+      The <code>\brief</code> keyword has that text get associated
+      when listing all the classes on the generated web pages. The
+      text after the blank link becomes the detailed description that
+      is on the generated web page for that class and method.
+    </para>
   </sect2>
 
   <sect2 id="opcodes">
@@ -114,4 +157,6 @@
 
   </sect2>
 
-</sect1>
\ No newline at end of file
+</sect1>
+
+
Index: gnash/doc/C/internals.xml
diff -u gnash/doc/C/internals.xml:1.6 gnash/doc/C/internals.xml:1.7
--- gnash/doc/C/internals.xml:1.6       Tue Jan 31 05:22:49 2006
+++ gnash/doc/C/internals.xml   Thu Feb  9 02:33:53 2006
@@ -157,7 +157,11 @@
        associated header file. The file name is usually the name of
        the ActionScript class iself, something like
        <code>XML</code>. All implementations are written in
-       <code>C++</code>. 
+       <code>C++</code>. In the CVS source tree for Gnash, there is a
+       utility file called <code>gen-files.sh</code> that can be used
+       to generate a template for a new ActionScript class. At this
+       time templates have been generated for all documented
+       ActionScript classes.
       </para>
 
       <sect4 id="defclass">
@@ -176,10 +180,34 @@
          just encapsulates an object of the desired class.
          
          <programlisting>
-           struct xml_as_object : public gnash::as_object {
-               XML obj;
+           class Foo {
+               public:
+                   foo() {};
+                   ~foo() {};
+                   bool GetBar() { return _bar; }
+               private:
+                   bool _bar;
            }
-         </programlisting>     
+           struct foo_as_object : public gnash::as_object {
+               Foo obj;
+           }
+         </programlisting>
+         The <code>obj</code> is an instantiation of the data for
+         this object. It isn't required unless this object needs
+         internal data that has to stay resident in the player.
+       </para>
+
+       <para>
+         Whenever this object is being handled the code for this
+         class, it is initially accessed by it's derived
+         binding. Internal data for this object can be accessed
+         through the <code>obj</code>.
+
+         <programlisting>
+           foo_as_object *foo = env.top(0).to_object();
+           bool result = foo->obj.GetBar();
+         </programlisting>
+
        </para>
        
        <para>
@@ -189,13 +217,13 @@
          statement is printed.
          
          <programlisting>
-           struct xml_as_object : public gnash::as_object {
-               XML obj;
-               xmlnode_as_object() {
-                   log_msg("\tCreating xmlnode_as_object at %p \n", this);
+           struct foo_as_object : public gnash::as_object {
+               Foo obj;
+               foo_as_object() {
+                   log_msg("\tCreating foo_as_object at %p \n", this);
                };
-               ~xmlnode_as_object() {
-                   log_msg("\tDeleting xmlnode_as_object at %p \n", this);
+               ~foo_as_object() {
+                   log_msg("\tDeleting foo_as_object at %p \n", this);
                };
            }:
          </programlisting>     
@@ -351,6 +379,179 @@
       </sect4>
     </sect3>
     
+    <sect3 id="parameters">
+      <title>Parameter Passing</title>
+
+      <para>
+       Parameters are passed to the callback functions for a class's
+       methods and properties using the <code>fn_call</code> data
+       structure. This data structure contains all the incoming
+       parameters for a callback, as well as it contains the final
+       result from the callback to be pased back into the
+       player.
+      </para>
+
+      <sect4 id="parain">
+       <title>Getting Parameter Data</title>
+       <para>
+         Parameter data is passed on the stack in a similar way to
+         any function call in any language. There are several fields
+         of the <code>fn_call</code> data structure that get used in
+         this example:
+
+         <programlisting>
+           xml_as_object *xml_obj = (xml_as_object*)fn.this_ptr;
+           if (fn.nargs) {
+               filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string;
+           }
+         </programlisting>
+       </para>
+       <para>
+         Using the <code>fn</code> variable which was passed as the
+         sole parameter of the callback, we can access the data. The
+         <code>fn.this_ptr</code> returns a reference to the class
+         that is invoking this method. This is how the object data
+         can be retrieved. The <code>fn.nargs</code> is a count of
+         how many objects are being passed into the callback.
+       </para>
+
+       <para>
+         The current stack of the player is passed in via the
+         <code>fn.env</code> field. This is used to access the data
+         passes to this callback. To find the location of this
+         particular stack frame, the
+         <code>fn.first_arg_bottom_index</code> field is used to
+         point to the stack frame. More detail on the environment stack
+         can <link linkend="envstack">be found here.</link>.
+       </para>
+
+       <para>
+         For this example, the stack has a
+         <code>as_environment::top()</code> and a
+         <code>as_environment::bottom()</code> that are used to pull
+         arguments off the stack. When using
+         <code>fn.first_arg_bottom_index</code>, the
+         <code>as_environment::bottom()</code> method should be used
+         as in the example.
+       </para>
+       
+       <para>
+         The top of the stack for this frame can also be accessed
+         using the <code>as_environment::top()</code> method. Top
+         takes an integer index as to which value to retrieve,
+       </para>
+
+       <programlisting>
+         if (fn.nargs > 0) {
+          name = fn.env->top(0).to_string);
+         }
+       </programlisting>
+         
+       <para>
+         If the type of the object is needed, that can be accessed by
+         using the <code>as_value::get_type()</code> method. There
+         are more details on the types of values in the 
+         <link linkend="handval">Handling Values</link> section of
+         this manual.
+       </para>
+
+       <programlisting>
+         if (fn.nargs > 0) {
+             if (fn.env->top(0).get_type() == as_value::STRING) {
+                 name = fn.env->top(0).to_string);
+             } 
+             if (fn.env->top(0).get_type() == as_value::NUMBER) {
+                 value = fn.env->top(0).to_number);
+             } 
+         }
+       </programlisting>
+
+       <para>
+         The internal data for this object can be accessed through
+         the base class. Any data set using this object will stay
+         resident in the player.
+
+         <programlisting>
+            foo_as_object *foo_obj = (foo_as_object*)fn.this_ptr;
+            bool bar = foo_obj->obj.GetBar();
+         </programlisting>
+
+       </para>
+
+      </sect4>
+      
+      <sect4 id="paramout">
+       <title>Returning Data</title>
+
+       <para>
+         Data is also returned in the data structure passed to the
+         callback. This example calls a method of the object passed
+         in on the stack, and then sets the return code to be the
+         return code of calling the method.
+         <programlisting>
+           // Set the argument to the function event handler based on
+           // whether the load was successful or failed.
+           ret = xml_obj->obj.load(filespec);
+           fn.result->set_bool(ret);
+         </programlisting>
+       </para>
+
+       <para>
+         The <code>result</code> field of the <code>fn</code>
+         variable is a <code>gnash::as_value</code> object., so it's
+         possible to set the value of several data types.
+       </para>
+       
+       <para>
+         Here is a short list of the most often used data types
+         returned from callbacks:
+         <variablelist>
+           <varlistentry>
+             <term>as_value::set_bool()</term>
+             <listitem>
+               <para>
+                 Set the result to a boolean value.
+               </para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term>as_value::set_int()</term>
+             <listitem>
+               <para>
+                 Set the result to an integer value.
+               </para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term>as_value::set_double()</term>
+             <listitem>
+               <para>
+                 Set the result to a floating point double value.
+               </para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term>as_value::set_string()</term>
+             <listitem>
+               <para>
+                 Set the result to a <code>const char*</code> value.
+               </para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term>as_value::set_as_object_interface()</term>
+             <listitem>
+               <para>
+                 Set the result to an object value.
+               </para>
+             </listitem>
+           </varlistentry>
+         </variablelist>
+       </para>
+      </sect4>
+      
+    </sect3>
+      
     <sect3 id="exists">
       <title>Level of Conformance</title>
 
@@ -886,7 +1087,7 @@
                </entry>
                <entry valign="top" align="center">
                  <para>
-                   swf v5has an unknown status.
+                   swf v5
                  </para>
                </entry>TextFormat
                <entry valign="top"  align="center">
@@ -977,6 +1178,162 @@
       </para>
     </sect3>
     
+    <sect3 id="handval">
+      <title>Handling Values</title>
+      <para>
+       FIXME:
+      </para>
+    </sect3>
+    
+    <sect3 id="handobj">
+      <title>Handling Objects</title>
+      <para>
+       FIXME:
+      </para>
+    </sect3>
+    
+    <sect3 id="envstack">
+      <title>The Environment Stack</title>
+      <para>
+       FIXME:
+      </para>
+    </sect3>
+    
+  </sect2>
+
+  <sect2 id="testing">
+    <title>Testing Support</title>
+
+    <sect3 id="testtools">
+      <title>Testing Tools</title>
+
+      <para>
+       Currently Gnash uses other three tools to help with
+       testing. Two of these are free compilers for the Flash
+       format. This lets us write simple test cases for Gnash to test
+       specific features, and how they need to operate.
+      </para>
+
+      <para>
+       The primary compiler used at this time is <ulink type="http"
+       url="http://www.ming.org";>Ming</ulink>. The latest release of
+       <code>Ming</code> included the compiler,
+       <code>makeswf</code>. This lets test case development happen
+       purely with free tools.
+      </para>
+      
+      <para>
+       The other tools used, although optional, is 
+       <ulink type="http"
+              url="http://www.gnu.org/software/dejagnu";>DejaGnu</ulink>.
+       This is used to run multiple test cases in an automated
+       manner. <code>DejaGnu </code> is used by many other <ulink
+       type="http" url="http://www.gnu.org";>GNU</ulink> projects like 
+       <ulink type="http" url="http://gcc.gnu.org";>GCC</ulink> and 
+       <ulink type="http" url="http://www.samba.org";>Samba</ulink>.
+      </para>
+      
+    </sect3>
+    <sect3 id="testcases">
+      <title>Test Cases</title>
+
+      <para>
+      </para>
+
+    </sect3>
+    <sect3 id="runtests">
+      <title>Running The Tests</title>
+
+      <sect4 id="dejagnu">
+       <title>Using DejaGnu</title>
+
+       <para>
+         The simple way to run the tests is to install
+         <code>DejaGnu</code>, and use that to run the tests. That
+         handles all the details to compile and execute the tests. To
+         run the tests using DejaGnu, change to the
+         <code>testsuite</code> directory and type:
+         <programlisting>
+           make check
+         </programlisting>
+       </para>
+       
+       <para>
+         You can get more details by ading command line option when
+         invoking <code>make</code>. The <code>make check</code> target
+         in the Makefile supports a variable, <code>RUNTESTFLAGS</code>
+         that gets passed to DejaGnu when it's invoked by <code>make</code>.
+         
+         <programlisting>
+           make check RUNTESTFLAGS="-v -a"
+         </programlisting>
+         
+         This adds the<code>verbose (-v)</code> option and the
+         <code>all (-a)</code> option. Verbose prints much more
+         information about how DejaGnu is running the test. It may be
+         too much information, but if you think you are having a
+         problem with running a test case, this is a good way to track
+         it down. The <code>all</code> option tells DejaGnu to print
+         all the tests that <code>PASS</code>, as well as those that
+         <code>FAIL</code>.
+       </para>
+      </sect4>
+
+      <sect4 id="manually">
+       <title>Manually Running Tests</title>
+
+       <para>
+         You can also run all the test cases by hand, which is useful
+         if you want to see all the debug output from the test
+         case. Often the debug messags that come deep from within
+         Gnash are the most useful during development.
+       </para>
+
+       <para>
+         The first step is to compile the test case. Ming's
+         <code>makeswf</code> program is used to compile the test
+         case into Flash. By default, no options are
+         required. Running <code>makeswf</code> looks like this:
+
+         <programlisting>
+           shellprompt> makeswf XML.as
+           Output file name: out.swf
+           Output compression level: 9
+           Output SWF version: 6
+           Preprocessing XML.as... done.
+           Compiling `XML.as.pp' into frame 1... done.
+           Saving output to out.swf... done.
+         </programlisting>
+       </para>
+
+       <para>
+         Once you have the flash movie version of the test case, you
+         can run it through the Gnash standalone player with a few
+         options that enable a simple test cases to be run that has no
+         associated graphics display, and consists only of unit level
+         tests for an ActionScript class.
+       </para>
+       <programlisting>
+         shellprompt> gnash -1 -r 0 -v out.swf
+         PASSED: XML::XML() constructor
+         PASSED: XML::addRequestHeader() exists
+         PASSED: XML::appendChild() exists
+         ...
+       </programlisting>
+
+       <para>
+         There is 
+         <link linkend="options">more detail here</link> about all
+         the command options for the standalone player. For this
+         example, the options work out as follows. <code>-1</code>
+         has the player only execute the test case a single
+         time. Looping endless is the default otherwise. <code>-r
+         0</code> has the player not start any graphics or windows,
+         it just plays the movie without any display at all.
+       </para>
+
+      </sect4>
+    </sect3>
   </sect2>
 </sect1>
 
Index: gnash/doc/omf.make
diff -u gnash/doc/omf.make:1.4 gnash/doc/omf.make:1.5
--- gnash/doc/omf.make:1.4      Wed Feb  1 23:58:31 2006
+++ gnash/doc/omf.make  Thu Feb  9 02:33:53 2006
@@ -32,30 +32,30 @@
 omf: omf_timestamp
 
 omf_timestamp: $(omffile)
-       address@hidden test x"$(GHELP)" = x"yes"; then \
-         for file in $(omffile); do \
+       @for file in $(omffile); do \
            $(SCROLLINSTALL) $(docdir)/$(docname).xml $(srcdir)/$$file 
$(srcdir)/$$file.out; \
-         done; \
-       fi
+       done
        touch omf_timestamp
 
 install-data-hook-omf:
-       address@hidden test x"$(GHELP)" = x"yes"; then \
-         if test x"$(USER)" != x"root" ; then \
+       $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
+       for file in $(omffile); do \
+         $(INSTALL_DATA) $(srcdir)/$$file.out 
$(DESTDIR)$(omf_dest_dir)/$$file; \
+       done
+       if test x"$(USER)" = x"root" ; then \
+           $(SCROLLUPDATE) -v -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o 
$(DESTDIR)$(omf_dest_dir);\
+       else \
            echo "ERROR: you must be root to install scrollkeeper files!";\
-           exit;\
-         fi;\
-         $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir);\
-         for file in $(omffile); do \
-           $(INSTALL_DATA) $(srcdir)/$$file.out 
$(DESTDIR)$(omf_dest_dir)/$$file; \
-         done; \
-         $(SCROLLUPDATE) -p $(scrollkeeper_localstate_dir) -o 
$(DESTDIR)$(omf_dest_dir); \
        fi
 
+
 uninstall-local-omf:
-       -for file in $(srcdir)/*.omf; do \
-               basefile=`basename $$file`; \
-               rm -f $(omf_dest_dir)/$$basefile; \
+       address@hidden file in $(omffile); do \
+           $(RM) $(DESTDIR)$(omf_dest_dir)/$$file; \
        done
-       -rmdir $(omf_dest_dir)
-       -$(SCROLLUPDATE) -p $(scrollkeeper_localstate_dir)
+       -rmdir $(DESTDIR)$(omf_dest_dir)
+       if test x"$(USER)" = x"root" ; then \
+           $(SCROLLUPDATE) -v -p $(DESTDIR)$(scrollkeeper_localstate_dir);\
+       else \
+           echo "ERROR: you must be root to uninstall scrollkeeper files!";\
+       fi
Index: gnash/doc/xmldocs.make
diff -u gnash/doc/xmldocs.make:1.2 gnash/doc/xmldocs.make:1.3
--- gnash/doc/xmldocs.make:1.2  Wed Feb  1 23:58:31 2006
+++ gnash/doc/xmldocs.make      Thu Feb  9 02:33:53 2006
@@ -39,15 +39,11 @@
 docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang)
 
 # **************  You should not have to edit below this line  
*******************
-xml_files = $(entities) $(docname).xml
 omf_dir=$(top_srcdir)/omf-install
 
-EXTRA_DIST = $(xml_files) $(omffile)
-CLEANFILES = omf_timestamp
-
 include $(top_srcdir)/doc/omf.make
 
-all: omf
+all-local: omf
 
 # this interferes with make establishing the proper depandancies, since
 # we use SUFFIX rules to build the docs.
@@ -56,6 +52,8 @@
 #      cd $(srcdir);   \
 #      cp $(entities) $$ourdir
 
+dist-hook: app-dist-hook
+
 app-dist-hook:
        if test "$(figdir)"; then \
          $(mkinstalldirs) $(distdir)/$(figdir); \
@@ -78,13 +76,15 @@
          done \
        fi
 
+install-data-hook: install-data-hook-omf
+
 uninstall-local: uninstall-local-doc uninstall-local-omf
 
 uninstall-local-doc:
        -if test "$(figdir)"; then \
          for file in $(srcdir)/$(figdir)/*.png; do \
            basefile=`echo $$file | sed -e  's,^.*/,,'`; \
-           rm -f $(docdir)/$(figdir)/$$basefile; \
+           rm -f $(DESTDIR)/$(figdir)/$$basefile; \
          done; \
          rmdir $(DESTDIR)$(docdir)/$(figdir); \
        fi
Index: gnash/macros/docbook.m4
diff -u gnash/macros/docbook.m4:1.8 gnash/macros/docbook.m4:1.9
--- gnash/macros/docbook.m4:1.8 Fri Feb  3 21:10:11 2006
+++ gnash/macros/docbook.m4     Thu Feb  9 02:33:53 2006
@@ -18,12 +18,12 @@
 
 AC_DEFUN([GNASH_DOCBOOK], [
 
-  AC_ARG_ENABLE(docbook, [  --enable-docbook            Enable support for the 
GNOME help system],
+  AC_ARG_ENABLE(docbook, [  --disable-docbook            Disable support for 
building documentation],
   [case "${enableval}" in
     yes) docbook=yes ;;
     no)  docbook=no ;;
     *)   AC_MSG_ERROR([bad value ${enableval} for enable-docbook option]) ;;
-  esac], docbook=no)
+  esac], docbook=yes)
 
   if test x"$docbook" = x"yes"; then
     AC_ARG_WITH(docbook_styles, [  --with-docbook-styles  directory where 
Docbook stylesheets are], with_docbook_styles=${withval})
@@ -48,8 +48,8 @@
     AC_MSG_NOTICE([checking for other programs needed to process the DocBook 
files])
     AC_PATH_PROG(FOP, fop.sh, [""],
        
[$PATH:/usr/local/fop-0.20.5/:/usr/fop-0.20.5/:/usr/local/fop:/usr/lib/java/fop])
-    if test x"${FOP}" = x"" ; then
-      AC_MSG_WARN(No fop.sh found! PDF format files can't be generated)
+    if test x"${FOP}" = x ; then
+      AC_MSG_WARN([No fop.sh found! PDF format files can't be generated])
     fi
 
     dirlist="/usr/lib/jre /usr/jre /opt/local/Java/JavaSDK ~/ReQuest/jre"
@@ -78,7 +78,7 @@
       AC_MSG_RESULT(not found)
       AC_MSG_WARN([You need to install Sun Java and the JAI toolkit to run 
fop])
     else
-      AC_MSG_RESULT($JAVA)
+      AC_MSG_RESULT([$JAVA])
     fi
 
     AC_PATH_PROG(XSLTPROC, xsltproc, [],
@@ -99,12 +99,16 @@
     if test x"$XSLTPROC" = x; then
       AC_MSG_WARN([You need to install xsltproc before HTML output can be 
generated])
     fi
-    if test x"$DB2X_XSLTPROC" = x -o x"$DB2X_TEXIXML" = x -o x"$MAKEINFO" = x; 
then
+    if test x"$DB2X_XSLTPROC" = x -o x"$DB2X_TEXIXML" = x  -o x"$DB2X_MANXML" 
= x -o x"$MAKEINFO" = x; then
       AC_MSG_WARN([You need to install the docbook2X package before Texi 
output can be generated])
     fi
   fi
 
   AM_CONDITIONAL(HAVE_JAVA, [test x$JAVA != x])
+  AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_XSLTPROC" != x -a 
x"$DB2X_TEXIXML" != x -a x"$MAKEINFO" != x ])
+  AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x ])
+  AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x ])
+  AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_XSLTPROC" != x -a x"$DB2X_MANXML" 
!= x ])
   AC_SUBST(JAVA)
 
   AC_SUBST(docbook_styles)
Index: gnash/macros/firefox.m4
diff -u gnash/macros/firefox.m4:1.8 gnash/macros/firefox.m4:1.9
--- gnash/macros/firefox.m4:1.8 Wed Feb  1 23:58:31 2006
+++ gnash/macros/firefox.m4     Thu Feb  9 02:33:53 2006
@@ -34,14 +34,19 @@
     AC_DEFINE([PLUGIN_SUPPORT], [], [Build plugin support for Mozilla/Firefox])
 fi
 
-AC_ARG_WITH(firefox,[  --with-firefox=PFX   Prefix where firefox is installed 
(optional)], firefox_prefix="$withval", firefox_prefix="")
-AC_ARG_WITH(firefox-libraries,[  --with-firefox-libraries=DIR   Directory 
where firefox library is installed (optional)], firefox_libraries="$withval", 
firefox_libraries="")
-AC_ARG_WITH(firefox-includes,[  --with-firefox-includes=DIR   Directory where 
firefox header files are installed (optional)], firefox_includes="$withval", 
firefox_includes="")
-
-  if test "x$firefox_libraries" != "x" ; then
+AC_ARG_WITH(firefox,[  --with-firefox=PFX   Prefix where firefox is installed 
(optional)], 
+  [firefox_prefix=$withval], [firefox_prefix=""])
+AC_ARG_WITH(firefox-libraries,[  --with-firefox-libraries=DIR   Directory 
where firefox library is installed (optional)], 
+  [firefox_libraries=$withval], [firefox_libraries=""])
+AC_ARG_WITH(firefox-includes,[  --with-firefox-includes=DIR   Directory where 
firefox header files are installed (optional)], 
+  [firefox_includes=$withval], [firefox_includes=""])
+AC_ARG_WITH(plugin-dir, [  --with-plugin-dir=DIR        Mozilla plugin dir],
+  [FIREFOX_PLUGINS=$withval], [FIREFOX_PLUGINS="${libdir}/mozilla/plugins/"])
+ 
+  if test "x${firefox_libraries}" != "x" ; then
     FIREFOX_LIBS="-L$firefox_libraries"
-  elif test "x$firefox_prefix" != "x" ; then
-    FIREFOX_LIBS="-L$firefox_prefix/lib"
+  elif test "x${firefox_prefix}" != "x" ; then
+    FIREFOX_LIBS="-L${firefox_prefix}/lib"
   fi
 
   if test "x$firefox_includes" != "x" ; then
@@ -55,33 +60,35 @@
 
   AC_CHECK_PROG(mconfig, firefox-config, firefox-config)
 
-  if test x"$mconfig" = "x" ; then
+  if test x"${mconfig}" = "x" ; then
     AC_CHECK_PROG(mconfig, mozilla-config, mozilla-config)
   fi
 
-  if test x"$mconfig" = "x" ; then
+  if test x"${mconfig}" = "x" ; then
     plugin="no"
     FIREFOX_CFLAGS=""
     FIREFOX_LIBS=""
     FIREFOX_DEFS=""
-    FIREFOX_PLUGINS="$HOME/.mozilla/plugins"
   else
-    AC_MSG_CHECKING(for Firefox/Mozilla SDK)
-    if test "x$FIREFOX_CFLAGS" = "x" ; then
-      FIREFOX_CFLAGS=`$mconfig --cflags java plugin`
+    AC_MSG_CHECKING([for Firefox/Mozilla SDK])
+    if test "x${FIREFOX_CFLAGS}" = "x" ; then
+      FIREFOX_CFLAGS=`${mconfig} --cflags java plugin`
     fi
 
-    if test "x$FIREFOX_LIBS" = "x" ; then
-      FIREFOX_LIBS=`$mconfig --libs java plugin`
+    if test "x${FIREFOX_LIBS}" = "x" ; then
+      FIREFOX_LIBS=`${mconfig} --libs java plugin`
     fi
 
-    if test "x$FIREFOX_LIBS" != "x" ; then
-      FIREFOX_DEFS=`$mconfig --defines java plugin`
-      FIREFOX_PLUGINS=`echo $FIREFOX_LIBS | sed -e 's:-L::'`/plugins
+    if test "x${FIREFOX_LIBS}" != "x" ; then
+      FIREFOX_DEFS=`${mconfig} --defines java plugin`
+dnl   if we don't have a path for the plugin by now, pick a default one
+      if test x"${FIREFOX_PLUGINS}" != "x" ; then
+        FIREFOX_PLUGINS=`echo ${FIREFOX_LIBS} | sed -e 's:-L::'`/plugins
+      fi
     fi
   fi
 
-  if test "x$FIREFOX_CFLAGS" != "x" -a  "x$FIREFOX_LIBS" != "x"; then
+  if test x"${FIREFOX_CFLAGS}" != "x" -a  x"${FIREFOX_LIBS}" != "x"; then
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_FIREFOX,1,[Define this if you have firefox support 
available])
   fi
Index: gnash/macros/ghelp.m4
diff -u gnash/macros/ghelp.m4:1.3 gnash/macros/ghelp.m4:1.4
--- gnash/macros/ghelp.m4:1.3   Wed Feb  1 23:58:31 2006
+++ gnash/macros/ghelp.m4       Thu Feb  9 02:33:53 2006
@@ -17,19 +17,19 @@
 
 AC_DEFUN([GNASH_PATH_GHELP],
 [
-  AC_ARG_ENABLE(ghelp, [  --enable-ghelp            Enable support for the 
GNOME help system],
+  AC_ARG_ENABLE(ghelp, [  --disable-ghelp            Disable support for the 
GNOME help system],
   [case "${enableval}" in
     yes) ghelp=yes ;;
     no)  ghelp=no ;;
     *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
-  esac], ghelp=no)
+  esac], ghelp=yes)
 
   if test x"$ghelp" = x"yes" ; then
-    AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [SCROLLKEEPER=""],
+    AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [],
        [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
-    AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [SCROLLUPDATE=""],
+    AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [],
        [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
-    AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [SCROLLINSTALL=""],
+    AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [],
        [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
     if test x"${SCROLLKEEPER}" != x"" ; then
       AC_MSG_CHECKING([the path to install under scrollkeeper])
@@ -40,6 +40,10 @@
       fi
     fi
   fi
+  if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = 
x ; then
+    ghelp=no
+    AC_MSG_WARN([You need to install scrollkeeper for gnome help])
+  fi
 
   AM_CONDITIONAL(GHELP, [test x$ghelp = xyes])
 ])
Index: gnash/server/Makefile.am
diff -u gnash/server/Makefile.am:1.19 gnash/server/Makefile.am:1.20
--- gnash/server/Makefile.am:1.19       Mon Feb  6 04:11:04 2006
+++ gnash/server/Makefile.am    Thu Feb  9 02:33:53 2006
@@ -95,6 +95,8 @@
         textformat.cpp   \
         timers.cpp       \
         xml.cpp          \
+        xmlattrs.cpp     \
+        xmlnode.cpp      \
         MovieClipLoader.cpp\
         xmlsocket.cpp    \
         string.cpp       \
@@ -151,6 +153,8 @@
        timers.h        \
        types.h         \
        xml.h           \
+        xmlattrs.h      \
+        xmlnode.h       \
        xmlsocket.h
 
 #libserver_la_LDFLAGS = -module -avoid-version -no-undefined
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.31 gnash/server/action.cpp:1.32
--- gnash/server/action.cpp:1.31        Thu Feb  9 00:33:06 2006
+++ gnash/server/action.cpp     Thu Feb  9 02:33:53 2006
@@ -1197,6 +1197,7 @@
                        s_global->set_member("TextFormat", 
as_value(textformat_new));
 #ifdef HAVE_LIBXML
                        s_global->set_member("XML", as_value(xml_new));
+                       s_global->set_member("XMLNode", as_value(xmlnode_new));
                        //s_global->set_member("XML", 
as_value(xmlsocket_xml_new));
                        s_global->set_member("XMLSocket", 
as_value(xmlsocket_new));
 #endif // HAVE_LIBXML
Index: gnash/server/xml.cpp
diff -u gnash/server/xml.cpp:1.7 gnash/server/xml.cpp:1.8
--- gnash/server/xml.cpp:1.7    Mon Feb  6 21:42:00 2006
+++ gnash/server/xml.cpp        Thu Feb  9 02:33:53 2006
@@ -22,105 +22,37 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <string>
+#include <vector>
 
 #include "log.h"
 #include "action.h"
 #include "impl.h"
 #include "smart_ptr.h"
-#include "gstring.h"
 #include "tu_config.h"
 #include "Function.h"
 
 #ifdef HAVE_LIBXML
 
 #include <unistd.h>
+#include "xmlattrs.h"
+#include "xmlnode.h"
 #include "xml.h"
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xmlreader.h>
 
+using namespace std;
+
 namespace gnash {
   
 //#define DEBUG_MEMORY_ALLOCATION 1
   
-//array<as_object *> _xmlobjs;    // FIXME: hack alert
-
-XMLAttr::XMLAttr()
-{
-#ifdef DEBUG_MEMORY_ALLOCATION
-    log_msg("\t\tCreating XMLAttr data at %p \n", this);
-#endif
-    _name = 0;
-    _value = 0;
-}
-
-XMLAttr::~XMLAttr()
-{
-#ifdef DEBUG_MEMORY_ALLOCATION
-    log_msg("\t\tDeleting XMLAttr data %s at %p \n", this->_name, this);
-#endif
-    //log_msg("%s: %p \n", __FUNCTION__, this);
-    if (_name) {
-        delete _name;
-    }
-    if (_value) {
-        delete _value;
-    }  
-}
-  
-XMLNode::XMLNode()
-{
-    //log_msg("%s: %p \n", __FUNCTION__, this);
-#ifdef DEBUG_MEMORY_ALLOCATION
-    log_msg("\tCreating XMLNode data at %p \n", this);
-#endif
-    _name = 0;
-    _value = 0;
-}
-
-XMLNode::~XMLNode()
-{
-    int i;
-    //log_msg("%s: %p \n", __FUNCTION__, this);
-#ifdef DEBUG_MEMORY_ALLOCATION
-    log_msg("\tDeleting XMLNode data %s at %p\n", this->_name, this);
-#endif
-  
-    for (i=0; i<_children.size(); i++) {
-//     if (_children[i]->_name) {
-//       delete _children[i]->_name;
-//     }
-//     if (_children[i]->_value) {
-//       delete _children[i]->_value;
-//     }
-        delete _children[i];
-    }
-
-    for (i=0; i<_attributes.size(); i++) {
-        //     if (_attributes[i]->_name) {
-//       delete _attributes[i]->_name;
-//     }
-//     if (_attributes[i]->_value) {
-//       delete _attributes[i]->_value;
-//     }
-        delete _attributes[i];
-    }
-
-    _children.clear();
-    _attributes.clear();
-
-    if (_name) {
-        delete _name;
-    }
-    if (_value) {
-        delete _value;
-    }
-    //  _value.set_undefined();
-}
+//std::vector<as_object *> _xmlobjs;    // FIXME: hack alert
 
 XML::XML() 
-    :_loaded(false),  _nodename(0), _bytes_loaded(0), _bytes_total(0)
+    :_loaded(false),  _nodename(0), _nodes(0), _bytes_loaded(0), 
_bytes_total(0)
 {
 #ifdef DEBUG_MEMORY_ALLOCATION
     log_msg("Creating XML data at %p \n", this);
@@ -163,6 +95,54 @@
     delete _nodes;
 }
 
+#ifdef ENABLE_TESTING
+const char *
+XML::nodeName()
+{
+  printf("%s: XML %p _nodes at %p\n", __PRETTY_FUNCTION__, this, _nodes);
+  if (_nodes) {
+    return _nodes->nodeName();
+  }
+  return "undefined";
+}
+
+const char *
+XML::nodeValue()
+{
+  printf("%s: XML _nodes at %p\n", __PRETTY_FUNCTION__, _nodes);
+  if (_nodes) {
+    return _nodes->nodeValue();
+  }
+  return "undefined";
+}
+
+void
+XML::nodeNameSet(char *name)
+{
+  if (!_nodes) {
+    _nodes = new XMLNode;
+    printf("%s: New XML %p _nodes at %p\n", __PRETTY_FUNCTION__, this, _nodes);
+  }
+  _nodes->nodeNameSet(name);
+  printf("%s: XML %p _name at %p, %s\n", __PRETTY_FUNCTION__, this,
+        _nodes->nodeName(),_nodes->nodeName() );
+}
+
+void
+XML::nodeValueSet(char *value)
+{
+  if (!_nodes) {
+    _nodes = new XMLNode;
+    printf("%s: New XML _nodes at %p\n", __PRETTY_FUNCTION__, _nodes);
+  }
+  
+  _nodes->nodeValueSet(value);
+  printf("%s: XML _nodes at %p\n", __PRETTY_FUNCTION__, _nodes);
+}
+
+#endif
+
+
 // Dispatch event handler(s), if any.
 bool
 XML::on_event(event_id id)
@@ -385,8 +365,7 @@
 //     XML_READER_TYPE_END_ELEMENT = 15,
 //
 // processNode:
-// 2 1 IP 0
-// processNode:
+// 2 1 IP 0// processNode:
 // 3 3 #text 0 192.168.2.50
 // processNode:
 // 2 15 IP 0
@@ -568,6 +547,17 @@
 #endif
 }
 
+
+vector<XMLNode *>
+XML::childNodes() 
+{
+  if (_nodes) {
+    return _nodes->_children;
+  } else {
+    return static_cast< vector<XMLNode*> >(0);
+  }
+}
+
 bool
 XML::onLoad()
 {
@@ -591,7 +581,8 @@
 as_object *
 XML::setupFrame(as_object *obj, XMLNode *xml, bool mem)
 {
-    int           child, i;
+    int                 child;
+    unsigned int i;
     const char    *nodename;
     //const char    *nodevalue;
     //AS_value      nodevalue;
@@ -697,7 +688,7 @@
 
 /// \brief append a node the the XML object
 ///
-/// Method; appends the specified node to the XML object\ufffds child
+/// Method; appends the specified node to the XML object's child
 /// list. This method operates directly on the node referenced by the
 /// childNode parameter; it does not append a copy of the node. If the
 /// node to be appended already exists in another tree structure,
@@ -709,7 +700,11 @@
 void
 XML::appendChild(XMLNode *node)
 {
+    if (!_nodes) {
+      _nodes = new XMLNode;
+    }
     _nodes->_children.push_back(node);
+    //    log_msg("%s: %p at _nodes at %p\n", __PRETTY_FUNCTION__, this, 
_nodes);
 }
 
 /// \brief copy a node
@@ -717,11 +712,22 @@
 /// Method; constructs and returns a new XML node of the same type,
 /// name, value, and attributes as the specified XML object. If deep
 /// is set to true, all child nodes are recursively cloned, resulting
-/// in an exact copy of the original object\ufffds document tree. 
-XMLNode *
-XML::cloneNode(bool deep)
+/// in an exact copy of the original object's document tree. 
+XMLNode &
+XML::cloneNode(XMLNode &newnode, bool deep)
 {
-    log_msg("%s:unimplemented \n", __FUNCTION__);
+
+  if (deep) {
+    newnode = _nodes;
+  } else {
+    newnode.nodeNameSet((char *)_nodes->nodeName());
+    newnode.nodeValueSet((char *)_nodes->nodeValue());    
+  }
+  
+
+  return newnode;
+  
+  log_msg("%s:partially unimplemented \n", __PRETTY_FUNCTION__);
 }
 
 /// \brief create a new XML element
@@ -754,7 +760,7 @@
 
 /// \brief insert a node before a node
 ///
-/// Method; inserts a new child node into the XML object\ufffds child
+/// Method; inserts a new child node into the XML object's child
 /// list, before the beforeNode node. If the beforeNode parameter is
 /// undefined or null, the node is added using the appendChild()
 /// method. If beforeNode is not a child of my_xml, the insertion
@@ -801,30 +807,27 @@
 const char *
 XML::toString()
 {
-    log_msg("%s:unimplemented \n", __FUNCTION__);
+    if (_nodes) {
+       return stringify(_nodes);
+    }
+    return NULL;
 }
 
 // 
 const char *
 XML::stringify(XMLNode *xml)
 {
-    int           child, i;
+    int           child;
+    unsigned int  i;
     const char    *nodename;
     int           length;
-    as_value      inum;
-    XMLNode       *childnode;
-
-    //log_msg("\t%s: processing node %s for object %p, mem is %d\n", 
__FUNCTION__, xml->_name, obj, mem);
+    string       str;
+    
+    log_msg("%s: processing for object %p\n", __PRETTY_FUNCTION__, this);
   
-    // Get the data for this node
-    nodename   = xml->_name;
-    //nodename   = xml->_name.c_str();
-    //nodevalue  = xml->_value;
-    length     = xml->length();
-
     // Process the attributes, if any
     if (_nodes->_attributes.size() == 0) {
-        //log_msg("\t\tNo attributes for node %s, created empty object at 
%p\n", nodename, attr_obj);
+        log_msg("\t\tNo attributes for node\n");
     } else {
         for (i=0; i<xml->_attributes.size(); i++) {
             log_msg("\t\tAdding attribute as member %s, value is %s to node 
%s\n",
@@ -833,20 +836,32 @@
         }
     }
 
+    vector<XMLNode *>::iterator it;
+    for (it = _nodes->_children.begin(); it != _nodes->_children.end(); ++it) {
+       log_msg("Found One!!!! %p\n", *it);
+    }
+    
     // Process the children, if there are any
+    length = xml->_children.size();
+
     if (length) {
-        //log_msg("\tProcessing %d children nodes for %s\n", length, nodename);
-        inum = 0;
+        log_msg("\tProcessing %d children nodes\n", length);
         for (child=0; child<length; child++) {
-            // Create a new AS object for this node's children
-            inum += 1;
+           log_msg("Name %p\n", xml->_children[child]);
+           if (xml->_children[child]->_name) {
+//             log_msg("Name %p", xml->_children[child]);
+           }
+           if (xml->_children[child]->_value) {
+//             log_msg("Value %s", xml->_children[child]->_value);
+           }
+       
+//         str += stringify(xml->_children[child]);
         }
     } else {
-        //log_msg("\tNode %s has no children\n", nodename);
+        log_msg("\tNode %s has no children\n", nodename);
     }  
 }
 
-
 //
 // Callbacks. These are the wrappers for the C++ functions so they'll work as
 // callbacks from within gnash.
@@ -883,8 +898,8 @@
     }
     
     //env->bottom(first_arg) = ret;
-    array<with_stack_entry> with_stack;
-    array<with_stack_entry> dummy_stack;
+    std::vector<with_stack_entry> with_stack;
+    std::vector<with_stack_entry> dummy_stack;
     //  struct node *first_node = ptr->obj.firstChildGet();
   
     //const char *name = ptr->obj.nodeNameGet();
@@ -936,7 +951,7 @@
     as_value   method;
     as_value      val;
     static bool first = true;     // This event handler should only be 
executed once.
-    array<with_stack_entry>    empty_with_stack;
+    std::vector<with_stack_entry>      empty_with_stack;
     xml_as_object*     ptr = (xml_as_object*) (as_object*) fn.this_ptr;
     assert(ptr);
   
@@ -1028,7 +1043,7 @@
     xml_as_object *xml_obj;
     //const char    *data;
   
-//  log_msg("%s: nargs=%d\n", __FUNCTION__, fn.nargs);
+    // log_msg("%s: nargs=%d\n", __FUNCTION__, fn.nargs);
   
     if (fn.nargs > 0) {
         if (fn.env->top(0).get_type() == as_value::STRING) {
@@ -1067,6 +1082,10 @@
         xml_obj->set_member("send", &xml_send);
         xml_obj->set_member("sendAndLoad", &xml_sendandload);
         xml_obj->set_member("toString", &xml_tostring);
+#ifdef ENABLE_TESTING
+        xml_obj->set_member("getname", &xml_nodename); 
+        xml_obj->set_member("getvalue", &xml_nodevalue);       
+#endif
     }
 
     fn.result->set_as_object_interface(xml_obj);
@@ -1108,67 +1127,84 @@
 }
 void xml_appendchild(const fn_call& fn)
 {
-    log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
+  //    log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
     xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
     assert(ptr);
-    xml_as_object *xml_obj = (xml_as_object*)fn.env->top(0).to_object();
-
-//    fn.result->set_int(ptr->obj.getAllocated());
-//    ptr->obj.appendChild(xml_obj->obj);
-    log_msg("%s:unimplemented \n", __FUNCTION__);
+    xmlnode_as_object *xml_obj = 
(xmlnode_as_object*)fn.env->top(0).to_object();
+    
+    ptr->obj.appendChild(&(xml_obj->obj));
 }
 
 void xml_clonenode(const fn_call& fn)
 {
     log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
-    xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
+    xml_as_object      *ptr = (xml_as_object*)fn.this_ptr;
+    xmlnode_as_object   *xml_obj;
     assert(ptr);
-    
-    bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool();
 
-//    fn.result->set_int(ptr->obj.getAllocated());
-    ptr->obj.cloneNode(deep);
+    if (fn.nargs > 0) {
+      bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool();
+      xml_obj = new xmlnode_as_object;
+#ifdef ENABLE_TESTING
+      xml_obj->set_member("nodeName", &xmlnode_nodename);      
+      xml_obj->set_member("nodeValue", &xmlnode_nodevalue);    
+      xml_obj->set_member("appendChild", &xmlnode_appendchild);
+      ptr->obj.cloneNode(xml_obj->obj, deep);
+      fn.result->set_as_object_interface(xml_obj);
+#endif      
+   } else {
+        log_msg("ERROR: no Depth paramater!\n");
+    }
+
 }
 void xml_createelement(const fn_call& fn)
 {
-    log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
-    xmlnode_as_object *xmlnode_obj;
-    const char *text;
-    xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+  //    log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
+    xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
     assert(ptr);
+    xmlnode_as_object *xml_obj;
+    const char *text;
 
     if (fn.nargs > 0) {
         text = fn.env->bottom(fn.first_arg_bottom_index).to_string();
-         xmlnode_obj = new xmlnode_as_object;
-    } else {
+       xml_obj = new xmlnode_as_object;
+#ifdef ENABLE_TESTING
+       xml_obj->set_member("nodeName", &xmlnode_nodename);     
+       xml_obj->set_member("nodeValue", &xmlnode_nodevalue);   
+       xml_obj->set_member("appendChild", &xmlnode_appendchild);
+#endif
+       xml_obj->obj.nodeNameSet((char *)text);
+       xml_obj->obj._type = XML_ELEMENT_NODE; 
+       fn.result->set_as_object_interface(xml_obj);
+   } else {
         log_msg("ERROR: no text for element creation!\n");
     }
-    
-//    xmlNewNode(text);
-    
-    xmlnode_obj->obj.nodeNameSet((char *)text);
-    fn.result->set_as_object_interface(xmlnode_obj);
 }
 
+
 void xml_createtextnode(const fn_call& fn)
 {
-    xmlnode_as_object *xmlnode_obj;
-    char *text;
+  //    log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
     xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
     assert(ptr);
-    
-    
+    xmlnode_as_object *xml_obj;
+    const char *text;
+
     if (fn.nargs > 0) {
-        text = (char *)fn.env->bottom(fn.first_arg_bottom_index).to_string();
-        xmlnode_obj = new xmlnode_as_object;
+        text = fn.env->bottom(fn.first_arg_bottom_index).to_string();
+       xml_obj = new xmlnode_as_object;
+#ifdef ENABLE_TESTING
+       xml_obj->set_member("nodeName", &xmlnode_nodename);     
+       xml_obj->set_member("nodeValue", &xmlnode_nodevalue);   
+       xml_obj->set_member("appendChild", &xmlnode_appendchild);
+#endif
+       xml_obj->obj.nodeValueSet((char *)text);
+       xml_obj->obj._type = XML_TEXT_NODE;
+       fn.result->set_as_object_interface(xml_obj);
+//     log_msg("%s: xml obj is %p\n", __PRETTY_FUNCTION__, xml_obj);
     } else {
-        log_msg("ERROR: no text for element creation!\n");
+        log_msg("ERROR: no text for text node creation!\n");
     }
-
-//    xmlNewText(text)
-
-    xmlnode_obj->obj.valueSet(text);
-    fn.result->set_as_object_interface(xmlnode_obj);
 }
 
 void xml_getbytesloaded(const fn_call& fn)
@@ -1188,7 +1224,7 @@
 void xml_haschildnodes(const fn_call& fn)
 {
     xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
-    assert(ptr);    
+    assert(ptr);
     fn.result->set_bool(ptr->obj.hasChildNodes());
 }
 void xml_insertbefore(const fn_call& fn)
@@ -1240,6 +1276,25 @@
     fn.result->set_string(ptr->obj.toString());
 }
 
+#ifdef ENABLE_TESTING
+void xml_nodevalue(const fn_call& fn)
+{
+    log_msg("%s: \n", __PRETTY_FUNCTION__);
+    xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
+    assert(ptr);
+    
+    fn.result->set_string(ptr->obj.nodeValue());
+}
+void xml_nodename(const fn_call& fn)
+{
+    log_msg("%s: \n", __PRETTY_FUNCTION__);
+    xml_as_object *ptr = (xml_as_object*)fn.this_ptr;
+    assert(ptr);
+    
+    fn.result->set_string(ptr->obj.nodeName());
+}
+#endif
+
 int
 memadjust(int x)
 {
Index: gnash/server/xml.h
diff -u gnash/server/xml.h:1.9 gnash/server/xml.h:1.10
--- gnash/server/xml.h:1.9      Mon Feb  6 21:42:00 2006
+++ gnash/server/xml.h  Thu Feb  9 02:33:53 2006
@@ -24,166 +24,22 @@
 #endif
 
 //#define DEBUG_MEMORY_ALLOCATION 1
-
-#include "tu_config.h"
+#include <vector>
 #include "log.h"
 #include "action.h"
 #include "impl.h"
-#include "log.h"
 
 #ifdef HAVE_LIBXML
 
+#include "xmlattrs.h"
+#include "xmlnode.h"
+
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 #include <libxml/xmlreader.h>
 
 namespace gnash {
   
-/// XML Attribute class
-class XMLAttr {
-public:
-    XMLAttr();
-    ~XMLAttr();
-  
-    char                *_name;
-    char                *_value;
-    xmlAttributeType    _type;
-    
-    XMLAttr *operator = (XMLAttr node) {
-        log_msg("\t\tCopying XMLAttr object at %p\n", this);
-    
-        _name = new char[strlen(node._name)+2];
-        memset(_name, 0, strlen(node._name)+2);
-        strcpy(_name, node._name);
-
-        _value = new char[strlen(node._value)+2];
-        memset(_value, 0, strlen(node._value)+2);
-        strcpy(_value, node._value);
-
-        return this;
-    }
-};
-
-/// XML Attribute ActionScript Object
-struct xmlattr_as_object : public as_object
-{
-    //XMLAttr obj;
-    int   padding;
-#ifdef DEBUG_MEMORY_ALLOCATION
-    xmlattr_as_object() {
-        log_msg("\t\tCreating xmlattr_as_object at %p\n", this);
-    };
-    ~xmlattr_as_object() {
-        log_msg("\tDeleting xmlattr_as_object at %p \n", this);
-    };
-#endif
-};
- 
-/// XML Node 
-class XMLNode
-{
-public:
-    XMLNode();
-    ~XMLNode();
-
-    int length()                 { return _children.size(); }
-    const char *nodeName()       { return _name; }
-    
-    void nodeNameSet(char *name) { _name = name; }
-    char *valueGet()             { return _value; }
-    void valueSet(char *value)   { _value = value; }
-
-    const char *nodeValue()    { return _value; }
-  
-    //  nodeType       XML.nodeType
-
-    bool hasChildNodes() {
-        if (_children.size() > 0) {
-            return true;
-        }
-        return false;
-    }
-  
-    XMLNode *firstChild() {
-        return _children[0];
-    }
-  
-    array<XMLNode *>childNodes() {
-        return _children;
-    }  
-    
-    XMLNode *operator [] (int x) {
-        gnash::log_msg("%s: get element %d\n", __FUNCTION__, x);
-        
-        return _children[x];
-    }
-    
-    XMLNode *operator = (XMLNode &node) {
-        _name = node._name;
-        _value = node._value;
-        _children = node._children;
-        _attributes = node._attributes;
-        return this;
-    }
-    
-    XMLNode *operator = (XMLNode *node) {
-        _name = node->_name;
-        _value = node->_value;
-        _children = node->_children;
-        _attributes = node->_attributes;
-        return this;
-    }
-    
-    void appendChild(XMLNode *node) {
-        node->_children.push_back(node);
-    }
-    
-    void  change_stack_frame(int frame, gnash::as_object *xml, 
gnash::as_environment *env);
-
-    char                *_name;
-    char                *_value;
-    xmlElementType      _type;
-    array<XMLNode *>    _children;
-    array<XMLAttr *>    _attributes;
-};
-
-/// XML Node ActionScript object
-struct xmlnode_as_object : public gnash::as_object
-{
-    XMLNode obj;
-    int                _padding;
-
-#ifdef DEBUG_MEMORY_ALLOCATION
-    xmlnode_as_object() {
-        log_msg("\tCreating xmlnode_as_object at %p \n", this);
-    };
-    ~xmlnode_as_object() {
-        log_msg("\tDeleting xmlnode_as_object at %p \n", this);
-    };
-#endif
-    virtual bool get_member(const tu_stringi& name, as_value* val) {
-        //printf("GET XMLNode MEMBER: %s at %p for object %p\n", name.c_str(), 
val, this);
-        
-        if ((name == "firstChild") || (name == "childNodes")) {
-            //printf("Returning a self reference for %s for object at %p\n", 
name.c_str(), this);
-            val->set_as_object_interface(this);
-            return true;
-        }
-        
-#if 1
-        printf("%s(%d): ERROR: as_member::get() unimplemented!", 
__PRETTY_FUNCTION__, __LINE__);
-#else
-        if (m_members.get(name, val) == false) {
-            if (m_prototype != NULL) {
-                return m_prototype->get_member(name, val);
-            }
-            return false;
-        }
-#endif
-        return true;
-    }
-};
-
 /// XML class
 class XML {
 public:
@@ -191,7 +47,7 @@
     XML(tu_string xml_in);
     XML(struct node * childNode);
     virtual ~XML();
-
+  
     // Methods
     // This is the base method used by both parseXML() and load().
     bool parseDoc(xmlDocPtr document, bool mem);
@@ -223,16 +79,19 @@
     void clear() {
         delete _nodes;
     }
-    
-    array<XMLNode *> childNodes() {
-        return _nodes->_children;
-    }
-
+  
+  std::vector<XMLNode *> childNodes();
+  
     const char *stringify(XMLNode *xml);
     //  Returns true if the specified node has child nodes; otherwise, returns 
false.
-    bool hasChildNodes() {
-        return _nodes->_children.size();
+  bool hasChildNodes() {
+    if (_nodes) {
+      if (_nodes->_children.size()) {
+        return true;
+      } 
     }
+    return false;
+  }
     
     XMLNode *extractNode(xmlNodePtr node, bool mem);
     XMLNode *processNode(xmlTextReaderPtr reader, XMLNode *node);
@@ -243,13 +102,17 @@
     as_object *setupFrame(gnash::as_object *xml, XMLNode *data, bool src);
   
     const char *nodeNameGet()    { return _nodename; }
-    void nodeNameSet(const char *name)    { _nodename = name; }
-  
+#ifdef ENABLE_TESTING
+    const char *nodeName();
+    const char *nodeValue();
+    void nodeNameSet(char *name);
+    void nodeValueSet(char *value);
+#endif
     int length()                 { return _nodes->length(); }
   
     // These 6 have to 
     void addRequestHeader(const char *name, const char *value);
-    XMLNode *cloneNode(bool deep);
+    XMLNode &cloneNode(XMLNode &newnode, bool deep);
     XMLNode *createElement(const char *name);
     XMLNode *createTextNode(const char *name);
     void insertBefore(XMLNode *newnode, XMLNode *node);
@@ -270,10 +133,10 @@
     void       on_event_close() { on_event(gnash::event_id::SOCK_CLOSE); }
   
     XMLNode *operator [] (int x);
-#if 0
+#if 1
     XMLNode *operator = (XMLNode &node) {
-        gnash::log_msg("%s: copy element %s\n", __FUNCTION__, 
node._name.c_str());
-        _nodes = node;
+        gnash::log_msg("%s: copy element %s\n", __PRETTY_FUNCTION__, 
node._name);
+       //        _nodes = node.;
     }
 
 #endif
@@ -352,6 +215,10 @@
     }
 };
 
+#ifdef ENABLE_TESTING
+void xml_nodename(const fn_call& fn);
+void xml_nodevalue(const fn_call& fn);
+#endif
 void xml_load(const fn_call& fn);
 void xml_set_current(const fn_call& fn);
 void xml_new(const fn_call& fn);
@@ -376,7 +243,6 @@
 void xml_ondata(const fn_call& fn);
 void xml_loaded(const fn_call& fn);
 
-
 int memadjust(int x);
 
 
Index: gnash/testsuite/actionscript.all/XML.as
diff -u gnash/testsuite/actionscript.all/XML.as:1.2 
gnash/testsuite/actionscript.all/XML.as:1.3
--- gnash/testsuite/actionscript.all/XML.as:1.2 Sun Feb  5 22:17:50 2006
+++ gnash/testsuite/actionscript.all/XML.as     Thu Feb  9 02:33:53 2006
@@ -131,25 +131,25 @@
 if (tmp.load("testin.xml")) {
        trace("PASSED: XML::load() works");
 } else {
-       trace("FAILED: XML::load() doesn't works");
+       trace("FAILED: XML::load() doesn't work");
 }
 //
 if (tmp.hasChildNodes() == true) {
        trace("PASSED: XML::hasChildNodes() works");
 } else {
-       trace("FAILED: XML::hasChildNodes() works");
+       trace("FAILED: XML::hasChildNodes() doesn't work");
 }
 
 if (tmp.getBytesLoaded() > 1) {
        trace("PASSED: XML::getBytesLoaded() works");
 } else {
-       trace("FAILED: XML::getBytesLoaded() works");
+       trace("FAILED: XML::getBytesLoaded() doesn't work");
 }
 
 if (tmp.getBytesTotal() > 1) {
        trace("PASSED: XML::getBytesTotal() works");
 } else {
-       trace("FAILED: XML::getBytesTotal() works");
+       trace("FAILED: XML::getBytesTotal() doesn't work");
 }
 
 if (tmp.getBytesLoaded() == tmp.getBytesTotal()) {
@@ -157,3 +157,70 @@
 } else {
        trace("FAILED: bytes counts are not the same");
 }
+
+myXML = new XML();
+var before = myXML.hasChildNodes();
+//trace(before);
+
+getCourseElement = myXML.createElement("module");
+
+textElement = myXML.createTextNode("Hello World");
+nodevalue = textElement.nodeValue();
+
+//trace(nodevalue);
+if (nodevalue == "Hello World") {
+       trace("PASSED: XML::createTextNode() works");
+} else {
+       trace("FAILED: XML::createTextNode() doesn't work");
+}
+
+getCourseElement.appendChild(textElement);
+nodename = getCourseElement.nodeName();
+//trace(nodename);
+nodevalue = getCourseElement.nodeValue();
+//trace(nodevalue);
+if ((nodename == "module") && (nodevalue == "Hello World")) {
+       trace("PASSED: XML::createTextNode() works");
+} else {
+       trace("FAILED: XML::createTextNode() doesn't work");
+}
+
+nodename = getCourseElement.nodeName();
+myXML.appendChild(getCourseElement);
+var after = myXML.hasChildNodes();
+
+//trace(after);
+
+if ((before == false) && (after == true) && (nodename == "module")) {
+       trace("PASSED: XML::appendChild() works");
+} else {
+       trace("FAILED: XML::appendChild() doesn't work");
+}
+
+// trace(myXML.toString());
+
+newnode = myXML.cloneNode(false);
+
+trace(newnode.nodeName());
+trace(newnode.nodeValue());
+
+
+// for (var i=0; i < valueArray.length; i++) {
+//     getitemElement = myXML.createElement("activity");
+//     getCourseElement.appendChild(getitemElement);
+    
+//     getnameElement = myXML.createElement("name");
+//     getitemElement.appendChild(getnameElement);
+//     if (typeof(itemArray) == "object") {
+//         textElement = myXML.createTextNode(itemArray[i].questions);
+//     } else {
+//         textElement = myXML.createTextNode(itemArray[i]);
+//     }
+//     getnameElement.appendChild(textElement);
+    
+//     getvalueElement = myXML.createElement("value");
+//     getitemElement.appendChild(getvalueElement);
+    
+//     textElement = myXML.createTextNode(valueArray[i]);
+//     getvalueElement.appendChild(textElement);
+// }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]