summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsk1994 <rsk1coder99@gmail.com>2014-05-16 22:18:13 (GMT)
committer Rupinder Singh Khokhar <rsk1coder99@gmail.com>2014-06-21 12:07:12 (GMT)
commitfc102fd14a29d7d738ce4e6053755a49c9ded314 (patch)
tree7770190dbfed7784a959732722565076f7a60ded
parentc82cd22ba5d791404345ec75251b3136581e89e5 (diff)
downloadlibdom-fc102fd14a29d7d738ce4e6053755a49c9ded314.tar.gz
libdom-fc102fd14a29d7d738ce4e6053755a49c9ded314.tar.bz2
Applet Element
-rw-r--r--Makefile1
-rw-r--r--include/dom/dom.h1
-rw-r--r--include/dom/html/html_applet_element.h78
-rw-r--r--src/html/Makefile4
-rw-r--r--src/html/html_applet_element.c191
-rw-r--r--src/html/html_applet_element.h45
-rw-r--r--src/html/html_document.c4
-rw-r--r--src/html/html_document_strings.h1
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement01.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement01.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement02.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement02.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement03.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement03.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement04.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement04.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement05.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement05.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement06.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement06.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement07.xml.kfail (renamed from test/testcases/tests/level1/html/HTMLAppletElement07.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement08.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement08.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement09.xml.kfail (renamed from test/testcases/tests/level1/html/HTMLAppletElement09.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement10.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement10.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAppletElement11.xml (renamed from test/testcases/tests/level1/html/HTMLAppletElement11.xml.notimpl)0
-rw-r--r--test/testcases/tests/level2/html/HTMLAppletElement07.xml (renamed from test/testcases/tests/level2/html/HTMLAppletElement07.xml.kfail)0
-rw-r--r--test/testcases/tests/level2/html/HTMLAppletElement09.xml (renamed from test/testcases/tests/level2/html/HTMLAppletElement09.xml.kfail)0
-rw-r--r--test/testcases/tests/level2/html/files/applet.html12
-rw-r--r--test/testcases/tests/level2/html/files/applet.xhtml15
-rw-r--r--test/testcases/tests/level2/html/files/applet.xml15
-rw-r--r--test/testcases/tests/level2/html/files/applet2.html12
-rw-r--r--test/testcases/tests/level2/html/files/applet2.xhtml15
-rw-r--r--test/testcases/tests/level2/html/files/applet2.xml15
27 files changed, 407 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 93d4e61..d3c73cc 100644
--- a/Makefile
+++ b/Makefile
@@ -119,6 +119,7 @@ INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_basefont_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_image_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_object_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_param_element.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_applet_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT)
diff --git a/include/dom/dom.h b/include/dom/dom.h
index d8edf7e..2a2e1cc 100644
--- a/include/dom/dom.h
+++ b/include/dom/dom.h
@@ -78,6 +78,7 @@
#include <dom/html/html_image_element.h>
#include <dom/html/html_object_element.h>
#include <dom/html/html_param_element.h>
+#include <dom/html/html_applet_element.h>
/* DOM Events header */
#include <dom/events/events.h>
diff --git a/include/dom/html/html_applet_element.h b/include/dom/html/html_applet_element.h
index 2e182d5..29e5c62 100644
--- a/include/dom/html/html_applet_element.h
+++ b/include/dom/html/html_applet_element.h
@@ -3,5 +3,83 @@
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2014 Rupinder Singh Khokhar <rsk1coder99@gmail.com>
*/
+#ifndef dom_html_applet_element_h_
+#define dom_html_applet_element_h_
+
+#include <stdbool.h>
+#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
+
+typedef struct dom_html_applet_element dom_html_applet_element;
+
+dom_exception dom_html_applet_element_get_align(
+ dom_html_applet_element *applet, dom_string **align);
+
+dom_exception dom_html_applet_element_set_align(
+ dom_html_applet_element *applet, dom_string *align);
+
+dom_exception dom_html_applet_element_get_alt(
+ dom_html_applet_element *applet, dom_string **alt);
+
+dom_exception dom_html_applet_element_set_alt(
+ dom_html_applet_element *applet, dom_string *alt);
+
+dom_exception dom_html_applet_element_get_archive(
+ dom_html_applet_element *applet, dom_string **archive);
+
+dom_exception dom_html_applet_element_set_archive(
+ dom_html_applet_element *applet, dom_string *archive);
+
+dom_exception dom_html_applet_element_get_code(
+ dom_html_applet_element *applet, dom_string **code);
+
+dom_exception dom_html_applet_element_set_code(
+ dom_html_applet_element *applet, dom_string *code);
+
+dom_exception dom_html_applet_element_get_code_base(
+ dom_html_applet_element *applet, dom_string **code_base);
+
+dom_exception dom_html_applet_element_set_code_base(
+ dom_html_applet_element *applet, dom_string *code_base);
+
+dom_exception dom_html_applet_element_get_height(
+ dom_html_applet_element *applet, dom_string **height);
+
+dom_exception dom_html_applet_element_set_height(
+ dom_html_applet_element *applet, dom_string *height);
+
+dom_exception dom_html_applet_element_get_name(
+ dom_html_applet_element *applet, dom_string **name);
+
+dom_exception dom_html_applet_element_set_name(
+ dom_html_applet_element *applet, dom_string *name);
+
+dom_exception dom_html_applet_element_get_object(
+ dom_html_applet_element *applet, dom_string **object);
+
+dom_exception dom_html_applet_element_set_object(
+ dom_html_applet_element *applet, dom_string *object);
+
+dom_exception dom_html_applet_element_get_width(
+ dom_html_applet_element *applet, dom_string **width);
+
+dom_exception dom_html_applet_element_set_width(
+ dom_html_applet_element *applet, dom_string *width);
+
+
+dom_exception dom_html_applet_element_get_hspace(
+ dom_html_applet_element *applet, int32_t *hspace);
+
+dom_exception dom_html_applet_element_set_hspace(
+ dom_html_applet_element *applet, uint32_t hspace);
+
+dom_exception dom_html_applet_element_get_vspace(
+ dom_html_applet_element *applet, int32_t *vspace);
+
+dom_exception dom_html_applet_element_set_vspace(
+ dom_html_applet_element *applet, uint32_t vspace);
+#endif
+
diff --git a/src/html/Makefile b/src/html/Makefile
index bd9f935..0d8bcae 100644
--- a/src/html/Makefile
+++ b/src/html/Makefile
@@ -14,10 +14,10 @@ DIR_SOURCES := \
html_ulist_element.c html_olist_element.c html_li_element.c \
html_font_element.c html_mod_element.c html_anchor_element.c \
html_basefont_element.c html_image_element.c html_object_element.c \
- html_param_element.c
+ html_param_element.c html_applet_element.c
UNINMPLEMENTED_SOURCES := \
- html_applet_element.c html_map_element.c \
+ html_map_element.c \
html_area_element.c html_script_element.c html_table_element.c \
html_tablecaption_element.c html_tablecol_element.c html_tablesection_element.c \
html_tablerow_element.c html_tablecell_element.c html_frameset_element.c \
diff --git a/src/html/html_applet_element.c b/src/html/html_applet_element.c
index 2e182d5..9f6c16f 100644
--- a/src/html/html_applet_element.c
+++ b/src/html/html_applet_element.c
@@ -3,5 +3,196 @@
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2014 Rupinder Singh Khokhar <rsk1coder99@gmail.com>
*/
+#include <assert.h>
+#include <stdlib.h>
+
+#include <dom/html/html_applet_element.h>
+
+#include "html/html_document.h"
+#include "html/html_applet_element.h"
+
+#include "core/node.h"
+#include "core/attr.h"
+#include "utils/utils.h"
+
+static struct dom_element_protected_vtable _protect_vtable = {
+ {
+ DOM_NODE_PROTECT_VTABLE_HTML_APPLET_ELEMENT
+ },
+ DOM_HTML_APPLET_ELEMENT_PROTECT_VTABLE
+};
+
+/**
+ * Create a dom_html_applet_element applet
+ *
+ * \param doc The document applet
+ * \param ele The returned element applet
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_applet_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_applet_element **ele)
+{
+ struct dom_node_internal *node;
+
+ *ele = malloc(sizeof(dom_html_applet_element));
+ if (*ele == NULL)
+ return DOM_NO_MEM_ERR;
+
+ /* Set up vtables */
+ node = (struct dom_node_internal *) *ele;
+ node->base.vtable = &_dom_html_element_vtable;
+ node->vtable = &_protect_vtable;
+
+ return _dom_html_applet_element_initialise(doc, namespace, prefix, *ele);
+}
+
+/**
+ * Initialise a dom_html_applet_element applet
+ *
+ * \param doc The document applet
+ * \param ele The dom_html_applet_element applet
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_applet_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_applet_element *ele)
+{
+ return _dom_html_element_initialise(doc, &ele->base,
+ doc->memoised[hds_APPLET],
+ namespace, prefix);
+}
+
+/**
+ * Finalise a dom_html_applet_element applet
+ *
+ * \param ele The dom_html_applet_element applet
+ */
+void _dom_html_applet_element_finalise(struct dom_html_applet_element *ele)
+{
+ _dom_html_element_finalise(&ele->base);
+}
+
+/**
+ * Destroy a dom_html_applet_element applet
+ *
+ * \param ele The dom_html_applet_element applet
+ */
+void _dom_html_applet_element_destroy(struct dom_html_applet_element *ele)
+{
+ _dom_html_applet_element_finalise(ele);
+ free(ele);
+}
+
+/*------------------------------------------------------------------------*/
+/* The protected virtual functions */
+
+/* The virtual function used to parse attribute value, see src/core/element.c
+ * for detail */
+dom_exception _dom_html_applet_element_parse_attribute(dom_element *ele,
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
+{
+ UNUSED(ele);
+ UNUSED(name);
+
+ dom_string_ref(value);
+ *parsed = value;
+
+ return DOM_NO_ERR;
+}
+
+/* The virtual destroy function, see src/core/node.c for detail */
+void _dom_virtual_html_applet_element_destroy(dom_node_internal *node)
+{
+ _dom_html_applet_element_destroy((struct dom_html_applet_element *) node);
+}
+
+/* The virtual copy function, see src/core/node.c for detail */
+dom_exception _dom_html_applet_element_copy(dom_node_internal *old,
+ dom_node_internal **copy)
+{
+ return _dom_html_element_copy(old, copy);
+}
+
+/*-----------------------------------------------------------------------*/
+/* API functions */
+
+#define SIMPLE_GET(attr) \
+ dom_exception dom_html_applet_element_get_##attr( \
+ dom_html_applet_element *element, \
+ dom_string **attr) \
+{ \
+ dom_exception ret; \
+ dom_string *_memo_##attr; \
+ \
+ _memo_##attr = \
+ ((struct dom_html_document *) \
+ ((struct dom_node_internal *)element)->owner)->\
+ memoised[hds_##attr]; \
+ \
+ ret = dom_element_get_attribute(element, _memo_##attr, attr); \
+ \
+ return ret; \
+}
+#define SIMPLE_SET(attr) \
+ dom_exception dom_html_applet_element_set_##attr( \
+ dom_html_applet_element *element, \
+ dom_string *attr) \
+{ \
+ dom_exception ret; \
+ dom_string *_memo_##attr; \
+ \
+ _memo_##attr = \
+ ((struct dom_html_document *) \
+ ((struct dom_node_internal *)element)->owner)->\
+ memoised[hds_##attr]; \
+ \
+ ret = dom_element_set_attribute(element, _memo_##attr, attr); \
+ \
+ return ret; \
+}
+
+#define SIMPLE_GET_SET(attr) SIMPLE_GET(attr) SIMPLE_SET(attr)
+
+SIMPLE_GET_SET(align);
+SIMPLE_GET_SET(alt);
+SIMPLE_GET_SET(archive);
+SIMPLE_GET_SET(code);
+SIMPLE_GET_SET(code_base);
+SIMPLE_GET_SET(height);
+SIMPLE_GET_SET(name);
+SIMPLE_GET_SET(object);
+SIMPLE_GET_SET(width);
+
+dom_exception dom_html_applet_element_get_hspace(
+ dom_html_applet_element *applet, int32_t *hspace)
+{
+ return dom_html_element_get_int32_t_property(&applet->base, "hspace",
+ SLEN("hspace"), hspace);
+}
+
+dom_exception dom_html_applet_element_set_hspace(
+ dom_html_applet_element *applet, uint32_t hspace)
+{
+ return dom_html_element_set_int32_t_property(&applet->base, "hspace",
+ SLEN("hspace"), hspace);
+}
+
+dom_exception dom_html_applet_element_get_vspace(
+ dom_html_applet_element *applet, int32_t *vspace)
+{
+ return dom_html_element_get_int32_t_property(&applet->base, "vspace",
+ SLEN("vspace"), vspace);
+}
+
+dom_exception dom_html_applet_element_set_vspace(
+ dom_html_applet_element *applet, uint32_t vspace)
+{
+ return dom_html_element_set_int32_t_property(&applet->base, "vspace",
+ SLEN("vspace"), vspace);
+}
+
diff --git a/src/html/html_applet_element.h b/src/html/html_applet_element.h
index 2e182d5..21e6d7a 100644
--- a/src/html/html_applet_element.h
+++ b/src/html/html_applet_element.h
@@ -3,5 +3,50 @@
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2014 Rupinder Singh Khokhar <rsk1coder99@gmail.com>
*/
+#ifndef dom_internal_html_applet_element_h_
+#define dom_internal_html_applet_element_h_
+
+#include <dom/html/html_applet_element.h>
+#include "html/html_element.h"
+
+
+struct dom_html_applet_element {
+ struct dom_html_element base;
+ /**< The base class */
+};
+
+/* Create a dom_html_applet_element object */
+dom_exception _dom_html_applet_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_applet_element **ele);
+
+/* Initialise a dom_html_applet_element object */
+dom_exception _dom_html_applet_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_applet_element *ele);
+
+/* Finalise a dom_html_applet_element object */
+void _dom_html_applet_element_finalise(struct dom_html_applet_element *ele);
+
+/* Destroy a dom_html_applet_element object */
+void _dom_html_applet_element_destroy(struct dom_html_applet_element *ele);
+
+/* The protected virtual functions */
+dom_exception _dom_html_applet_element_parse_attribute(dom_element *ele,
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
+void _dom_virtual_html_applet_element_destroy(dom_node_internal *node);
+dom_exception _dom_html_applet_element_copy(dom_node_internal *old,
+ dom_node_internal **copy);
+
+#define DOM_HTML_APPLET_ELEMENT_PROTECT_VTABLE \
+ _dom_html_applet_element_parse_attribute
+
+#define DOM_NODE_PROTECT_VTABLE_HTML_APPLET_ELEMENT \
+ _dom_virtual_html_applet_element_destroy, \
+ _dom_html_applet_element_copy
+
+#endif
diff --git a/src/html/html_document.c b/src/html/html_document.c
index a2d007f..08dbe23 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -46,6 +46,7 @@
#include "html/html_image_element.h"
#include "html/html_object_element.h"
#include "html/html_param_element.h"
+#include "html/html_applet_element.h"
#include "core/attr.h"
#include "core/string.h"
@@ -315,6 +316,9 @@ _dom_html_document_create_element_internal(dom_html_document *html,
} else if (dom_string_caseless_isequal(tag_name, html->memoised[hds_PARAM])) {
exc = _dom_html_param_element_create(html, namespace, prefix,
(dom_html_param_element **) result);
+ } else if (dom_string_caseless_isequal(tag_name, html->memoised[hds_APPLET])) {
+ exc = _dom_html_applet_element_create(html, namespace, prefix,
+ (dom_html_applet_element **) result);
} else {
exc = _dom_html_element_create(html, tag_name, namespace,
prefix, result);
diff --git a/src/html/html_document_strings.h b/src/html/html_document_strings.h
index 0805915..ad8e602 100644
--- a/src/html/html_document_strings.h
+++ b/src/html/html_document_strings.h
@@ -95,6 +95,7 @@ HTML_DOCUMENT_STRINGS_ACTION1(archive)
HTML_DOCUMENT_STRINGS_ACTION1(data)
HTML_DOCUMENT_STRINGS_ACTION1(height)
HTML_DOCUMENT_STRINGS_ACTION1(standby)
+HTML_DOCUMENT_STRINGS_ACTION1(object)
HTML_DOCUMENT_STRINGS_ACTION(tab_index,tabindex)
HTML_DOCUMENT_STRINGS_ACTION(html_for,for)
HTML_DOCUMENT_STRINGS_ACTION(date_time,datetime)
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement01.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement01.xml
index 7be4ac6..7be4ac6 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement01.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement01.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement02.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement02.xml
index 2042f0a..2042f0a 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement02.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement02.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement03.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement03.xml
index a68e3e0..a68e3e0 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement03.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement03.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement04.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement04.xml
index 23e8bb6..23e8bb6 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement04.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement04.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement05.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement05.xml
index 81076d1..81076d1 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement05.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement05.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement06.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement06.xml
index 1d280da..1d280da 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement06.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement06.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement07.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement07.xml.kfail
index d3b4858..d3b4858 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement07.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement07.xml.kfail
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement08.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement08.xml
index a473f23..a473f23 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement08.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement08.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement09.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement09.xml.kfail
index 98d2413..98d2413 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement09.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement09.xml.kfail
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement10.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement10.xml
index 2cf1b6a..2cf1b6a 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement10.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement10.xml
diff --git a/test/testcases/tests/level1/html/HTMLAppletElement11.xml.notimpl b/test/testcases/tests/level1/html/HTMLAppletElement11.xml
index 91cba8b..91cba8b 100644
--- a/test/testcases/tests/level1/html/HTMLAppletElement11.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAppletElement11.xml
diff --git a/test/testcases/tests/level2/html/HTMLAppletElement07.xml.kfail b/test/testcases/tests/level2/html/HTMLAppletElement07.xml
index 07a6c0d..07a6c0d 100644
--- a/test/testcases/tests/level2/html/HTMLAppletElement07.xml.kfail
+++ b/test/testcases/tests/level2/html/HTMLAppletElement07.xml
diff --git a/test/testcases/tests/level2/html/HTMLAppletElement09.xml.kfail b/test/testcases/tests/level2/html/HTMLAppletElement09.xml
index b602397..b602397 100644
--- a/test/testcases/tests/level2/html/HTMLAppletElement09.xml.kfail
+++ b/test/testcases/tests/level2/html/HTMLAppletElement09.xml
diff --git a/test/testcases/tests/level2/html/files/applet.html b/test/testcases/tests/level2/html/files/applet.html
new file mode 100644
index 0000000..d721cf1
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Applet</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" CODE="org/w3c/domts/DOMTSApplet.class" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
+</P>
+</BODY>
+</HTML>
diff --git a/test/testcases/tests/level2/html/files/applet.xhtml b/test/testcases/tests/level2/html/files/applet.xhtml
new file mode 100644
index 0000000..cf2070c
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/test/testcases/tests/level2/html/files/applet.xml b/test/testcases/tests/level2/html/files/applet.xml
new file mode 100644
index 0000000..cf2070c
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/test/testcases/tests/level2/html/files/applet2.html b/test/testcases/tests/level2/html/files/applet2.html
new file mode 100644
index 0000000..0379ed1
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Applet</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" OBJECT="DOMTSApplet.dat" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
+</P>
+</BODY>
+</HTML>
diff --git a/test/testcases/tests/level2/html/files/applet2.xhtml b/test/testcases/tests/level2/html/files/applet2.xhtml
new file mode 100644
index 0000000..43b27da
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet2.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/test/testcases/tests/level2/html/files/applet2.xml b/test/testcases/tests/level2/html/files/applet2.xml
new file mode 100644
index 0000000..43b27da
--- a/dev/null
+++ b/test/testcases/tests/level2/html/files/applet2.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+