summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--include/dom/dom.h1
-rw-r--r--include/dom/html/html_area_element.h62
-rw-r--r--src/html/Makefile5
-rw-r--r--src/html/html_area_element.c215
-rw-r--r--src/html/html_area_element.h45
-rw-r--r--src/html/html_collection.c2
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement01.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement01.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement02.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement02.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement03.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement03.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement04.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement04.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement05.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement05.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement06.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement06.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement07.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement07.xml.notimpl)0
-rw-r--r--test/testcases/tests/level1/html/HTMLAreaElement08.xml (renamed from test/testcases/tests/level1/html/HTMLAreaElement08.xml.notimpl)0
-rw-r--r--test/testcases/tests/level2/html/files/area.html14
-rw-r--r--test/testcases/tests/level2/html/files/area.xhtml17
-rw-r--r--test/testcases/tests/level2/html/files/area.xml17
-rw-r--r--test/testcases/tests/level2/html/files/area2.html15
-rw-r--r--test/testcases/tests/level2/html/files/area2.xhtml16
-rw-r--r--test/testcases/tests/level2/html/files/area2.xml16
21 files changed, 422 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d3c73cc..6be20eb 100644
--- a/Makefile
+++ b/Makefile
@@ -120,6 +120,7 @@ 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) $(I):$(Is)/html_area_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 2a2e1cc..69a4f77 100644
--- a/include/dom/dom.h
+++ b/include/dom/dom.h
@@ -79,6 +79,7 @@
#include <dom/html/html_object_element.h>
#include <dom/html/html_param_element.h>
#include <dom/html/html_applet_element.h>
+#include <dom/html/html_area_element.h>
/* DOM Events header */
#include <dom/events/events.h>
diff --git a/include/dom/html/html_area_element.h b/include/dom/html/html_area_element.h
index 2e182d5..c57202b 100644
--- a/include/dom/html/html_area_element.h
+++ b/include/dom/html/html_area_element.h
@@ -3,5 +3,67 @@
* 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 <rsk1access_keyr99@gmail.com>
*/
+#ifndef dom_html_area_element_h_
+#define dom_html_area_element_h_
+
+#include <stdbool.h>
+#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
+
+#include <dom/html/html_form_element.h>
+#include <dom/html/html_document.h>
+
+typedef struct dom_html_area_element dom_html_area_element;
+
+dom_exception dom_html_area_element_get_access_key(
+ dom_html_area_element *area, dom_string **access_key);
+
+dom_exception dom_html_area_element_set_access_key(
+ dom_html_area_element *area, dom_string *access_key);
+
+dom_exception dom_html_area_element_get_alt(
+ dom_html_area_element *area, dom_string **alt);
+
+dom_exception dom_html_area_element_set_alt(
+ dom_html_area_element *area, dom_string *alt);
+
+dom_exception dom_html_area_element_get_coords(
+ dom_html_area_element *area, dom_string **coords);
+
+dom_exception dom_html_area_element_set_coords(
+ dom_html_area_element *area, dom_string *coords);
+
+dom_exception dom_html_area_element_get_href(
+ dom_html_area_element *area, dom_string **href);
+
+dom_exception dom_html_area_element_set_href(
+ dom_html_area_element *area, dom_string *href);
+
+dom_exception dom_html_area_element_get_no_href(
+ dom_html_area_element *ele, bool *no_href);
+
+dom_exception dom_html_area_element_set_no_href(
+ dom_html_area_element *ele, bool no_href);
+
+dom_exception dom_html_area_element_get_shape(
+ dom_html_area_element *area, dom_string **shape);
+
+dom_exception dom_html_area_element_set_shape(
+ dom_html_area_element *area, dom_string *shape);
+
+dom_exception dom_html_area_element_get_tab_index(
+ dom_html_area_element *area, int32_t *tab_index);
+
+dom_exception dom_html_area_element_set_tab_index(
+ dom_html_area_element *area, uint32_t tab_index);
+
+dom_exception dom_html_area_element_get_target(
+ dom_html_area_element *area, dom_string **target);
+
+dom_exception dom_html_area_element_set_target(
+ dom_html_area_element *area, dom_string *target);
+
+#endif
diff --git a/src/html/Makefile b/src/html/Makefile
index 0d8bcae..ba76d6c 100644
--- a/src/html/Makefile
+++ b/src/html/Makefile
@@ -14,11 +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_applet_element.c
+ html_param_element.c html_applet_element.c html_area_element.c
UNINMPLEMENTED_SOURCES := \
- html_map_element.c \
- html_area_element.c html_script_element.c html_table_element.c \
+ html_map_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 \
html_frame_element.c html_iframe_element.c
diff --git a/src/html/html_area_element.c b/src/html/html_area_element.c
index 2e182d5..85a2a3e 100644
--- a/src/html/html_area_element.c
+++ b/src/html/html_area_element.c
@@ -3,5 +3,220 @@
* 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_area_element.h>
+
+#include "html/html_document.h"
+#include "html/html_area_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_AREA_ELEMENT
+ },
+ DOM_HTML_AREA_ELEMENT_PROTECT_VTABLE
+};
+
+/**
+ * Create a dom_html_area_element object
+ *
+ * \param doc The document object
+ * \param ele The returned element object
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_area_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_area_element **ele)
+{
+ struct dom_node_internal *node;
+
+ *ele = malloc(sizeof(dom_html_area_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_area_element_initialise(doc, namespace, prefix, *ele);
+}
+
+/**
+ * Initialise a dom_html_area_element object
+ *
+ * \param doc The document object
+ * \param ele The dom_html_area_element object
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_area_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_area_element *ele)
+{
+ return _dom_html_element_initialise(doc, &ele->base,
+ doc->memoised[hds_AREA],
+ namespace, prefix);
+}
+
+/**
+ * Finalise a dom_html_area_element object
+ *
+ * \param ele The dom_html_area_element object
+ */
+void _dom_html_area_element_finalise(struct dom_html_area_element *ele)
+{
+ _dom_html_element_finalise(&ele->base);
+}
+
+/**
+ * Destroy a dom_html_area_element object
+ *
+ * \param ele The dom_html_area_element object
+ */
+void _dom_html_area_element_destroy(struct dom_html_area_element *ele)
+{
+ _dom_html_area_element_finalise(ele);
+ free(ele);
+}
+
+/**
+ * Get the no_href property
+ *
+ * \param ele The dom_html_area_element object
+ * \param no_href The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_area_element_get_no_href(dom_html_area_element *ele,
+ bool *no_href)
+{
+ return dom_html_element_get_bool_property(&ele->base, "nohref",
+ SLEN("nohref"), no_href);
+}
+
+/**
+ * Set the no_href property
+ *
+ * \param ele The dom_html_area_element object
+ * \param no_href The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_area_element_set_no_href(dom_html_area_element *ele,
+ bool no_href)
+{
+ return dom_html_element_set_bool_property(&ele->base, "nohref",
+ SLEN("nohref"), no_href);
+}
+
+/**
+ * Set the tab_index property
+ *
+ * \param ele The dom_html_area_element object
+ * \param no_href The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_area_element_get_tab_index(
+ dom_html_area_element *area, int32_t *tab_index)
+{
+ return dom_html_element_get_int32_t_property(&area->base, "tabindex",
+ SLEN("tabindex"), tab_index);
+}
+
+/**
+ * Set the tab_index property
+ *
+ * \param ele The dom_html_area_element object
+ * \param no_href The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_area_element_set_tab_index(
+ dom_html_area_element *area, uint32_t tab_index)
+{
+ return dom_html_element_set_int32_t_property(&area->base, "tabindex",
+ SLEN("tabindex"), tab_index);
+}
+
+/*------------------------------------------------------------------------*/
+/* The protected virtual functions */
+
+/* The virtual function used to parse attribute value, see src/core/element.c
+ * for detail */
+dom_exception _dom_html_area_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_area_element_destroy(dom_node_internal *node)
+{
+ _dom_html_area_element_destroy((struct dom_html_area_element *) node);
+}
+
+/* The virtual copy function, see src/core/node.c for detail */
+dom_exception _dom_html_area_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_area_element_get_##attr( \
+ dom_html_area_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_area_element_set_##attr( \
+ dom_html_area_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(access_key);
+SIMPLE_GET_SET(alt);
+SIMPLE_GET_SET(coords);
+SIMPLE_GET_SET(href);
+SIMPLE_GET_SET(shape);
+SIMPLE_GET_SET(target);
diff --git a/src/html/html_area_element.h b/src/html/html_area_element.h
index 2e182d5..a45d1df 100644
--- a/src/html/html_area_element.h
+++ b/src/html/html_area_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_area_element_h_
+#define dom_internal_html_area_element_h_
+
+#include <dom/html/html_area_element.h>
+#include "html/html_element.h"
+
+
+struct dom_html_area_element {
+ struct dom_html_element base;
+ /**< The base class */
+};
+
+/* Create a dom_html_area_element object */
+dom_exception _dom_html_area_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_area_element **ele);
+
+/* Initialise a dom_html_area_element object */
+dom_exception _dom_html_area_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_area_element *ele);
+
+/* Finalise a dom_html_area_element object */
+void _dom_html_area_element_finalise(struct dom_html_area_element *ele);
+
+/* Destroy a dom_html_area_element object */
+void _dom_html_area_element_destroy(struct dom_html_area_element *ele);
+
+/* The protected virtual functions */
+dom_exception _dom_html_area_element_parse_attribute(dom_element *ele,
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
+void _dom_virtual_html_area_element_destroy(dom_node_internal *node);
+dom_exception _dom_html_area_element_copy(dom_node_internal *old,
+ dom_node_internal **copy);
+
+#define DOM_HTML_AREA_ELEMENT_PROTECT_VTABLE \
+ _dom_html_area_element_parse_attribute
+
+#define DOM_NODE_PROTECT_VTABLE_HTML_AREA_ELEMENT \
+ _dom_virtual_html_area_element_destroy, \
+ _dom_html_area_element_copy
+
+#endif
diff --git a/src/html/html_collection.c b/src/html/html_collection.c
index a99297f..fb801d9 100644
--- a/src/html/html_collection.c
+++ b/src/html/html_collection.c
@@ -25,7 +25,7 @@
* \param doc The document
* \param root The root element of the collection
* \param ic The callback function used to determin whether certain node
- * beint32_ts to the collection
+ * belongs to the collection
* \param col The result collection object
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement01.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement01.xml
index 58db920..58db920 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement01.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement01.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement02.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement02.xml
index e90e643..e90e643 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement02.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement02.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement03.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement03.xml
index e0d2114..e0d2114 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement03.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement03.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement04.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement04.xml
index c464ae0..c464ae0 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement04.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement04.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement05.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement05.xml
index 31bff76..31bff76 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement05.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement05.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement06.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement06.xml
index 407f72a..407f72a 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement06.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement06.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement07.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement07.xml
index c03b07d..c03b07d 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement07.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement07.xml
diff --git a/test/testcases/tests/level1/html/HTMLAreaElement08.xml.notimpl b/test/testcases/tests/level1/html/HTMLAreaElement08.xml
index 9d485fe..9d485fe 100644
--- a/test/testcases/tests/level1/html/HTMLAreaElement08.xml.notimpl
+++ b/test/testcases/tests/level1/html/HTMLAreaElement08.xml
diff --git a/test/testcases/tests/level2/html/files/area.html b/test/testcases/tests/level2/html/files/area.html
new file mode 100644
index 0000000..dddff68
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Area</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain">
+</MAP>
+</P>
+</BODY>
+</HTML>
diff --git a/test/testcases/tests/level2/html/files/area.xhtml b/test/testcases/tests/level2/html/files/area.xhtml
new file mode 100644
index 0000000..1e497f3
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain"/>
+</map>
+</p>
+</body>
+</html>
+
diff --git a/test/testcases/tests/level2/html/files/area.xml b/test/testcases/tests/level2/html/files/area.xml
new file mode 100644
index 0000000..1e497f3
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain"/>
+</map>
+</p>
+</body>
+</html>
+
diff --git a/test/testcases/tests/level2/html/files/area2.html b/test/testcases/tests/level2/html/files/area2.html
new file mode 100644
index 0000000..f1ae081
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Area</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA HREF="./files/dletter.html" ALT="Domain" TARGET="dynamic">
+</MAP>
+</P>
+</BODY>
+</HTML>
diff --git a/test/testcases/tests/level2/html/files/area2.xhtml b/test/testcases/tests/level2/html/files/area2.xhtml
new file mode 100644
index 0000000..5476bee
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area2.xhtml
@@ -0,0 +1,16 @@
+<?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 - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter.html" alt="Domain" target="dynamic"/>
+</map>
+</p>
+</body>
+</html>
diff --git a/test/testcases/tests/level2/html/files/area2.xml b/test/testcases/tests/level2/html/files/area2.xml
new file mode 100644
index 0000000..5476bee
--- /dev/null
+++ b/test/testcases/tests/level2/html/files/area2.xml
@@ -0,0 +1,16 @@
+<?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 - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter.html" alt="Domain" target="dynamic"/>
+</map>
+</p>
+</body>
+</html>