You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/08/14 18:10:23 UTC

[16/51] [abbrv] [partial] incubator-corinthia git commit: added js test files

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-figure05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-figure05-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-figure05-input.html
new file mode 100644
index 0000000..41f6a46
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-figure05-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var figcaptions = document.getElementsByTagName("figcaption");
+
+    // Change figure caption
+    for (var i = 0; i < figcaptions.length; i++) {
+        DOM_setNodeValue(figcaptions[i].lastChild,"Figure "+String.fromCharCode(65+i));
+    }
+
+    // Add another set of references
+    for (var i = 0; i < figcaptions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+figcaptions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<figure id="item1"><figcaption>Figure 9: First figure</figcaption></figure>
+<figure id="item2"><figcaption>Figure 9: Second figure</figcaption></figure>
+<figure id="item3"><figcaption>Third figure</figcaption></figure>
+<figure id="item4"><figcaption>Fourth figure</figcaption></figure>
+<p>First ref: Figure <a href="#item1"></a></p>
+<p>Second ref: Figure <a href="#item2"></a></p>
+<p>Third ref: Figure <a href="#item3"></a></p>
+<p>Fourth ref: Figure <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-expected.html
new file mode 100644
index 0000000..15d7200
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-expected.html
@@ -0,0 +1,41 @@
+Sections:
+Figures:
+    1 First figure (item1)
+    Second figure (item2)
+    Third figure (item3)
+    Fourth figure (item4)
+Tables:
+<html>
+  <head>
+  </head>
+  <body>
+    <figure id="item1">
+      <figcaption>First figure</figcaption>
+    </figure>
+    <figure id="item2">
+      <figcaption class="Unnumbered">Second figure</figcaption>
+    </figure>
+    <figure id="item3">
+      <figcaption class="Unnumbered">Third figure</figcaption>
+    </figure>
+    <figure id="item4">
+      <figcaption class="Unnumbered">Fourth figure</figcaption>
+    </figure>
+    <p>
+      First ref: Figure
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Figure
+      <a href="#item2">Second figure</a>
+    </p>
+    <p>
+      Third ref: Figure
+      <a href="#item3">Third figure</a>
+    </p>
+    <p>
+      Fourth ref: Figure
+      <a href="#item4">Fourth figure</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-input.html
new file mode 100644
index 0000000..56c3435
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-figure06-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item2",false);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<figure id="item1"><figcaption>Figure 9: First figure</figcaption></figure>
+<figure id="item2"><figcaption>Figure 9: Second figure</figcaption></figure>
+<figure id="item3"><figcaption>Third figure</figcaption></figure>
+<figure id="item4"><figcaption>Fourth figure</figcaption></figure>
+<p>First ref: Figure <a href="#item1"></a></p>
+<p>Second ref: Figure <a href="#item2"></a></p>
+<p>Third ref: Figure <a href="#item3"></a></p>
+<p>Fourth ref: Figure <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-expected.html
new file mode 100644
index 0000000..d6bc652
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-expected.html
@@ -0,0 +1,41 @@
+Sections:
+Figures:
+    1 First figure (item1)
+    2 Second figure (item2)
+    3 Third figure (item3)
+    Fourth figure (item4)
+Tables:
+<html>
+  <head>
+  </head>
+  <body>
+    <figure id="item1">
+      <figcaption>First figure</figcaption>
+    </figure>
+    <figure id="item2">
+      <figcaption>Second figure</figcaption>
+    </figure>
+    <figure id="item3">
+      <figcaption>Third figure</figcaption>
+    </figure>
+    <figure id="item4">
+      <figcaption class="Unnumbered">Fourth figure</figcaption>
+    </figure>
+    <p>
+      First ref: Figure
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Figure
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Figure
+      <a href="#item3">3</a>
+    </p>
+    <p>
+      Fourth ref: Figure
+      <a href="#item4">Fourth figure</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-input.html
new file mode 100644
index 0000000..0a51714
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-figure07-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item3",true);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<figure id="item1"><figcaption>Figure 9: First figure</figcaption></figure>
+<figure id="item2"><figcaption>Figure 9: Second figure</figcaption></figure>
+<figure id="item3"><figcaption>Third figure</figcaption></figure>
+<figure id="item4"><figcaption>Fourth figure</figcaption></figure>
+<p>First ref: Figure <a href="#item1"></a></p>
+<p>Second ref: Figure <a href="#item2"></a></p>
+<p>Third ref: Figure <a href="#item3"></a></p>
+<p>Fourth ref: Figure <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section01-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section01-expected.html
new file mode 100644
index 0000000..efd80dc
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section01-expected.html
@@ -0,0 +1,39 @@
+Sections:
+    1 First heading (item1)
+    2 Second heading (item2)
+    Third heading (item3)
+    Fourth heading (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <h1 id="item2">Second heading</h1>
+    <h1 class="Unnumbered" id="item3">Third heading</h1>
+    <h1 class="Unnumbered" id="item4">Fourth heading</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">Third heading</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Fourth heading</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Third heading</a></p>
+    <p><a href="#item4">Fourth heading</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section01-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section01-input.html
new file mode 100644
index 0000000..524886f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section01-input.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var headings = document.getElementsByTagName("h1");
+
+    // Add another set of references
+    for (var i = 0; i < headings.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+headings[i].getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section02-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section02-expected.html
new file mode 100644
index 0000000..6a82676
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section02-expected.html
@@ -0,0 +1,51 @@
+Sections:
+    1 First headingXYZ (item1)
+    2 Second headingXYZ (item2)
+    Third headingXYZ (item3)
+    Fourth headingXYZ (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">
+      First heading
+      XYZ
+    </h1>
+    <h1 id="item2">
+      Second heading
+      XYZ
+    </h1>
+    <h1 class="Unnumbered" id="item3">
+      Third heading
+      XYZ
+    </h1>
+    <h1 class="Unnumbered" id="item4">
+      Fourth heading
+      XYZ
+    </h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">Third headingXYZ</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Fourth headingXYZ</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Third headingXYZ</a></p>
+    <p><a href="#item4">Fourth headingXYZ</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section02-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section02-input.html
new file mode 100644
index 0000000..627c12a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section02-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var headings = document.getElementsByTagName("h1");
+
+    // Change heading text
+    for (var i = 0; i < headings.length; i++) {
+        DOM_appendChild(headings[i],DOM_createTextNode(document,"XYZ"));
+    }
+
+    // Add another set of references
+    for (var i = 0; i < headings.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+headings[i].getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section03-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section03-expected.html
new file mode 100644
index 0000000..f12c26d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section03-expected.html
@@ -0,0 +1,39 @@
+Sections:
+    1 FiXYZrst heading (item1)
+    2 SeXYZcond heading (item2)
+    ThXYZird heading (item3)
+    FoXYZurth heading (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">FiXYZrst heading</h1>
+    <h1 id="item2">SeXYZcond heading</h1>
+    <h1 class="Unnumbered" id="item3">ThXYZird heading</h1>
+    <h1 class="Unnumbered" id="item4">FoXYZurth heading</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">ThXYZird heading</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">FoXYZurth heading</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">ThXYZird heading</a></p>
+    <p><a href="#item4">FoXYZurth heading</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section03-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section03-input.html
new file mode 100644
index 0000000..47a41e7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section03-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var headings = document.getElementsByTagName("h1");
+
+    // Change heading text
+    for (var i = 0; i < headings.length; i++) {
+        DOM_insertCharacters(headings[i].lastChild,2,"XYZ");
+    }
+
+    // Add another set of references
+    for (var i = 0; i < headings.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+headings[i].getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section04-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section04-expected.html
new file mode 100644
index 0000000..58af1fd
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section04-expected.html
@@ -0,0 +1,39 @@
+Sections:
+    1 Fit heading (item1)
+    2 Send heading (item2)
+    Thd heading (item3)
+    Foth heading (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">Fit heading</h1>
+    <h1 id="item2">Send heading</h1>
+    <h1 class="Unnumbered" id="item3">Thd heading</h1>
+    <h1 class="Unnumbered" id="item4">Foth heading</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">Thd heading</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Foth heading</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Thd heading</a></p>
+    <p><a href="#item4">Foth heading</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section04-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section04-input.html
new file mode 100644
index 0000000..6a92318
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section04-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var headings = document.getElementsByTagName("h1");
+
+    // Change heading text
+    for (var i = 0; i < headings.length; i++) {
+        DOM_deleteCharacters(headings[i].lastChild,2,4);
+    }
+
+    // Add another set of references
+    for (var i = 0; i < headings.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+headings[i].getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section05-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section05-expected.html
new file mode 100644
index 0000000..5c98afe
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section05-expected.html
@@ -0,0 +1,39 @@
+Sections:
+    1 Heading A (item1)
+    2 Heading B (item2)
+    Heading C (item3)
+    Heading D (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">Heading A</h1>
+    <h1 id="item2">Heading B</h1>
+    <h1 class="Unnumbered" id="item3">Heading C</h1>
+    <h1 class="Unnumbered" id="item4">Heading D</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">Heading C</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Heading D</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Heading C</a></p>
+    <p><a href="#item4">Heading D</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section05-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section05-input.html
new file mode 100644
index 0000000..50489f6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section05-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var headings = document.getElementsByTagName("h1");
+
+    // Change heading text
+    for (var i = 0; i < headings.length; i++) {
+        DOM_setNodeValue(headings[i].lastChild,"Heading "+String.fromCharCode(65+i));
+    }
+
+    // Add another set of references
+    for (var i = 0; i < headings.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+headings[i].getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section06-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section06-expected.html
new file mode 100644
index 0000000..31c6336
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section06-expected.html
@@ -0,0 +1,35 @@
+Sections:
+    1 First heading (item1)
+    Second heading (item2)
+    Third heading (item3)
+    Fourth heading (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <h1 class="Unnumbered" id="item2">Second heading</h1>
+    <h1 class="Unnumbered" id="item3">Third heading</h1>
+    <h1 class="Unnumbered" id="item4">Fourth heading</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">Second heading</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">Third heading</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Fourth heading</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section06-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section06-input.html
new file mode 100644
index 0000000..3875b13
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section06-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item2",false);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section07-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section07-expected.html
new file mode 100644
index 0000000..eb74edd
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section07-expected.html
@@ -0,0 +1,35 @@
+Sections:
+    1 First heading (item1)
+    2 Second heading (item2)
+    3 Third heading (item3)
+    Fourth heading (item4)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <h1 id="item2">Second heading</h1>
+    <h1 id="item3">Third heading</h1>
+    <h1 class="Unnumbered" id="item4">Fourth heading</h1>
+    <p>
+      First ref: Section
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Section
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Section
+      <a href="#item3">3</a>
+    </p>
+    <p>
+      Fourth ref: Section
+      <a href="#item4">Fourth heading</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-section07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-section07-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-section07-input.html
new file mode 100644
index 0000000..582283e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-section07-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item3",true);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<h1 id="item2">9 Second heading</h1>
+<h1 id="item3">Third heading</h1>
+<h1 id="item4">Fourth heading</h1>
+<p>First ref: Section <a href="#item1"></a></p>
+<p>Second ref: Section <a href="#item2"></a></p>
+<p>Third ref: Section <a href="#item3"></a></p>
+<p>Fourth ref: Section <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table01-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table01-expected.html
new file mode 100644
index 0000000..0b7d604
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table01-expected.html
@@ -0,0 +1,45 @@
+Sections:
+Figures:
+Tables:
+    1 First table (item1)
+    2 Second table (item2)
+    Third table (item3)
+    Fourth table (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>First table</caption>
+    </table>
+    <table id="item2">
+      <caption>Second table</caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">Third table</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">Fourth table</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">Third table</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Fourth table</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Third table</a></p>
+    <p><a href="#item4">Fourth table</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table01-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table01-input.html
new file mode 100644
index 0000000..2b7d451
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table01-input.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var captions = document.getElementsByTagName("caption");
+
+    // Add another set of references
+    for (var i = 0; i < captions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+captions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table02-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table02-expected.html
new file mode 100644
index 0000000..d917488
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table02-expected.html
@@ -0,0 +1,57 @@
+Sections:
+Figures:
+Tables:
+    1 First tableXYZ (item1)
+    2 Second tableXYZ (item2)
+    Third tableXYZ (item3)
+    Fourth tableXYZ (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>
+        First table
+        XYZ
+      </caption>
+    </table>
+    <table id="item2">
+      <caption>
+        Second table
+        XYZ
+      </caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">
+        Third table
+        XYZ
+      </caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">
+        Fourth table
+        XYZ
+      </caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">Third tableXYZ</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Fourth tableXYZ</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Third tableXYZ</a></p>
+    <p><a href="#item4">Fourth tableXYZ</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table02-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table02-input.html
new file mode 100644
index 0000000..efc605a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table02-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var captions = document.getElementsByTagName("caption");
+
+    // Change table caption
+    for (var i = 0; i < captions.length; i++) {
+        DOM_appendChild(captions[i],DOM_createTextNode(document,"XYZ"));
+    }
+
+    // Add another set of references
+    for (var i = 0; i < captions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+captions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table03-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table03-expected.html
new file mode 100644
index 0000000..dd48fea
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table03-expected.html
@@ -0,0 +1,45 @@
+Sections:
+Figures:
+Tables:
+    1 FiXYZrst table (item1)
+    2 SeXYZcond table (item2)
+    ThXYZird table (item3)
+    FoXYZurth table (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>FiXYZrst table</caption>
+    </table>
+    <table id="item2">
+      <caption>SeXYZcond table</caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">ThXYZird table</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">FoXYZurth table</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">ThXYZird table</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">FoXYZurth table</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">ThXYZird table</a></p>
+    <p><a href="#item4">FoXYZurth table</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table03-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table03-input.html
new file mode 100644
index 0000000..cabd662
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table03-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var captions = document.getElementsByTagName("caption");
+
+    // Change table caption
+    for (var i = 0; i < captions.length; i++) {
+        DOM_insertCharacters(captions[i].lastChild,2,"XYZ");
+    }
+
+    // Add another set of references
+    for (var i = 0; i < captions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+captions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table04-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table04-expected.html
new file mode 100644
index 0000000..9d59ed2
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table04-expected.html
@@ -0,0 +1,45 @@
+Sections:
+Figures:
+Tables:
+    1 Fit table (item1)
+    2 Send table (item2)
+    Thd table (item3)
+    Foth table (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>Fit table</caption>
+    </table>
+    <table id="item2">
+      <caption>Send table</caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">Thd table</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">Foth table</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">Thd table</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Foth table</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Thd table</a></p>
+    <p><a href="#item4">Foth table</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table04-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table04-input.html
new file mode 100644
index 0000000..6307603
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table04-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var captions = document.getElementsByTagName("caption");
+
+    // Change table caption
+    for (var i = 0; i < captions.length; i++) {
+        DOM_deleteCharacters(captions[i].lastChild,2,4);
+    }
+
+    // Add another set of references
+    for (var i = 0; i < captions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+captions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table05-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table05-expected.html
new file mode 100644
index 0000000..6aff79a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table05-expected.html
@@ -0,0 +1,45 @@
+Sections:
+Figures:
+Tables:
+    1 Table A (item1)
+    2 Table B (item2)
+    Table C (item3)
+    Table D (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>Table A</caption>
+    </table>
+    <table id="item2">
+      <caption>Table B</caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">Table C</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">Table D</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">Table C</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Table D</a>
+    </p>
+    <p><a href="#item1">1</a></p>
+    <p><a href="#item2">2</a></p>
+    <p><a href="#item3">Table C</a></p>
+    <p><a href="#item4">Table D</a></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table05-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table05-input.html
new file mode 100644
index 0000000..f1951d8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table05-input.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var captions = document.getElementsByTagName("caption");
+
+    // Change table caption
+    for (var i = 0; i < captions.length; i++) {
+        DOM_setNodeValue(captions[i].lastChild,"Table "+String.fromCharCode(65+i));
+    }
+
+    // Add another set of references
+    for (var i = 0; i < captions.length; i++) {
+        var a = DOM_createElement(document,"A");
+        DOM_setAttribute(a,"href","#"+captions[i].parentNode.getAttribute("id"));
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,a);
+        DOM_appendChild(document.body,p);
+    }
+
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table06-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table06-expected.html
new file mode 100644
index 0000000..08b25ff
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table06-expected.html
@@ -0,0 +1,41 @@
+Sections:
+Figures:
+Tables:
+    1 First table (item1)
+    Second table (item2)
+    Third table (item3)
+    Fourth table (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>First table</caption>
+    </table>
+    <table id="item2">
+      <caption class="Unnumbered">Second table</caption>
+    </table>
+    <table id="item3">
+      <caption class="Unnumbered">Third table</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">Fourth table</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">Second table</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">Third table</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Fourth table</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table06-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table06-input.html
new file mode 100644
index 0000000..84641ab
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table06-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item2",false);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table07-expected.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table07-expected.html
new file mode 100644
index 0000000..5458f4e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table07-expected.html
@@ -0,0 +1,41 @@
+Sections:
+Figures:
+Tables:
+    1 First table (item1)
+    2 Second table (item2)
+    3 Third table (item3)
+    Fourth table (item4)
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="item1">
+      <caption>First table</caption>
+    </table>
+    <table id="item2">
+      <caption>Second table</caption>
+    </table>
+    <table id="item3">
+      <caption>Third table</caption>
+    </table>
+    <table id="item4">
+      <caption class="Unnumbered">Fourth table</caption>
+    </table>
+    <p>
+      First ref: Table
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      Second ref: Table
+      <a href="#item2">2</a>
+    </p>
+    <p>
+      Third ref: Table
+      <a href="#item3">3</a>
+    </p>
+    <p>
+      Fourth ref: Table
+      <a href="#item4">Fourth table</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refTitle-table07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refTitle-table07-input.html b/experiments/editorFramework/test/Layer0/outline/refTitle-table07-input.html
new file mode 100644
index 0000000..da88517
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refTitle-table07-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_setNumbered("item3",true);
+    PostponedActions_perform();
+
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<table id="item1"><caption>Table 9: First table</caption></table>
+<table id="item2"><caption>Table 9: Second table</caption></table>
+<table id="item3"><caption>Third table</caption></table>
+<table id="item4"><caption>Fourth table</caption></table>
+<p>First ref: Table <a href="#item1"></a></p>
+<p>Second ref: Table <a href="#item2"></a></p>
+<p>Third ref: Table <a href="#item3"></a></p>
+<p>Fourth ref: Table <a href="#item4"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-expected.html
new file mode 100644
index 0000000..5a1732e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-expected.html
@@ -0,0 +1,30 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure</figcaption>
+    </figure>
+    <p>
+      Default
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">Figure 1: Test figure</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">Test figure</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">Figure 1</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-input.html
new file mode 100644
index 0000000..5bd54bc
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-figure-numbered-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<figure>
+  (figure content)
+  <figcaption>Figure 3: Test figure</figcaption>
+</figure>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-expected.html
new file mode 100644
index 0000000..f2be451
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-expected.html
@@ -0,0 +1,30 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <figure id="item1">
+      (figure content)
+      <figcaption class="Unnumbered">Test figure</figcaption>
+    </figure>
+    <p>
+      Default
+      <a href="#item1">Test figure</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">?</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">Test figure</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">Test figure</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">?</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-input.html
new file mode 100644
index 0000000..e0ed328
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-figure-unnumbered-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<figure>
+  (figure content)
+  <figcaption>Test figure</figcaption>
+</figure>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-expected.html
new file mode 100644
index 0000000..6f69902
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-expected.html
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <p>
+      Default
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">Section 1</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-input.html
new file mode 100644
index 0000000..340b96a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-numbered-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<h1 id="item1">9 First heading</h1>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-expected.html
new file mode 100644
index 0000000..c676aa1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-expected.html
@@ -0,0 +1,27 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <p>
+      Default
+      <a href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">?</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">?</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-input.html
new file mode 100644
index 0000000..eda432f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<h1 id="item1">First heading</h1>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-expected.html
new file mode 100644
index 0000000..5b0758c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-expected.html
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 class="Unnumbered" id="item1">First heading</h1>
+    <p>
+      Default
+      <a href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">?</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">First heading</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">?</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-input.html b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-input.html
new file mode 100644
index 0000000..83474fa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-section-unnumbered2-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<h1 class="Unnumbered" id="item1">First heading</h1>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-expected.html
new file mode 100644
index 0000000..f960949
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-expected.html
@@ -0,0 +1,43 @@
+<html>
+  <head>
+    <style>
+td { border: thin solid black; }
+table { caption-side: bottom; }
+    </style>
+  </head>
+  <body>
+    <table id="item1" style="width: 100%">
+      <caption>Test table</caption>
+      <tbody>
+        <tr>
+          <td>a</td>
+          <td>a</td>
+        </tr>
+        <tr>
+          <td>a</td>
+          <td>a</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>
+      Default
+      <a href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">1</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">Table 1: Test table</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">Test table</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">Table 1</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-input.html
new file mode 100644
index 0000000..086f619
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-table-numbered-input.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+td { border: thin solid black; }
+table { caption-side: bottom; }
+</style>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<table id="item1" style="width: 100%">
+  <caption>Table 3: Test table</caption>
+  <tr>
+    <td>a</td>
+    <td>a</td>
+  </tr>
+  <tr>
+    <td>a</td>
+    <td>a</td>
+  </tr>
+</table>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-expected.html b/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-expected.html
new file mode 100644
index 0000000..7e8367c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-expected.html
@@ -0,0 +1,43 @@
+<html>
+  <head>
+    <style>
+td { border: thin solid black; }
+table { caption-side: bottom; }
+    </style>
+  </head>
+  <body>
+    <table id="item1" style="width: 100%">
+      <caption class="Unnumbered">Test table</caption>
+      <tbody>
+        <tr>
+          <td>a</td>
+          <td>a</td>
+        </tr>
+        <tr>
+          <td>a</td>
+          <td>a</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>
+      Default
+      <a href="#item1">Test table</a>
+    </p>
+    <p>
+      uxwrite-ref-num
+      <a class="uxwrite-ref-num" href="#item1">?</a>
+    </p>
+    <p>
+      uxwrite-ref-text
+      <a class="uxwrite-ref-text" href="#item1">Test table</a>
+    </p>
+    <p>
+      uxwrite-ref-caption-text
+      <a class="uxwrite-ref-caption-text" href="#item1">Test table</a>
+    </p>
+    <p>
+      uxwrite-ref-label-num
+      <a class="uxwrite-ref-label-num" href="#item1">?</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-input.html b/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-input.html
new file mode 100644
index 0000000..1a440ae
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refType-table-unnumbered-input.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+td { border: thin solid black; }
+table { caption-side: bottom; }
+</style>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<table id="item1" style="width: 100%">
+  <caption>Test table</caption>
+  <tr>
+    <td>a</td>
+    <td>a</td>
+  </tr>
+  <tr>
+    <td>a</td>
+    <td>a</td>
+  </tr>
+</table>
+<p>Default <a href="#item1"></a></p>
+<p>uxwrite-ref-num <a class="uxwrite-ref-num" href="#item1"></a></p>
+<p>uxwrite-ref-text <a class="uxwrite-ref-text" href="#item1"></a></p>
+<p>uxwrite-ref-caption-text <a class="uxwrite-ref-caption-text" href="#item1"></a></p>
+<p>uxwrite-ref-label-num <a class="uxwrite-ref-label-num" href="#item1"></a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert01-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-insert01-expected.html
new file mode 100644
index 0000000..5572628
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert01-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="one">One</h1>
+    <h1 id="two">Two</h1>
+    <h1 id="three">Three</h1>
+    <a href="#one">1</a>
+    <a href="#two">2</a>
+    <a href="#three">3</a>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert01-input.html b/experiments/editorFramework/test/Layer0/outline/reference-insert01-input.html
new file mode 100644
index 0000000..e2dac14
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert01-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var ref1 = DOM_createElement(document,"A");
+    var ref2 = DOM_createElement(document,"A");
+    var ref3 = DOM_createElement(document,"A");
+    DOM_setAttribute(ref1,"href","#one");
+    DOM_setAttribute(ref2,"href","#two");
+    DOM_setAttribute(ref3,"href","#three");
+
+    Clipboard_pasteNodes([ref1,ref2,ref3]);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<h1 id="one">4 One</h1>
+<h1 id="two">4 Two</h1>
+<h1 id="three">4 Three</h1>
+[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert02-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-insert02-expected.html
new file mode 100644
index 0000000..d24c302
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert02-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <figure id="one">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="two">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="three">
+      <figcaption></figcaption>
+    </figure>
+    <a href="#one">1</a>
+    <a href="#two">2</a>
+    <a href="#three">3</a>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert02-input.html b/experiments/editorFramework/test/Layer0/outline/reference-insert02-input.html
new file mode 100644
index 0000000..f7c4146
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert02-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var ref1 = DOM_createElement(document,"A");
+    var ref2 = DOM_createElement(document,"A");
+    var ref3 = DOM_createElement(document,"A");
+    DOM_setAttribute(ref1,"href","#one");
+    DOM_setAttribute(ref2,"href","#two");
+    DOM_setAttribute(ref3,"href","#three");
+
+    Clipboard_pasteNodes([ref1,ref2,ref3]);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<figure id="one"><figcaption>Figure 4</figcaption></figure>
+<figure id="two"><figcaption>Figure 4</figcaption></figure>
+<figure id="three"><figcaption>Figure 4</figcaption></figure>
+[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert03-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-insert03-expected.html
new file mode 100644
index 0000000..a1db37e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert03-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <table id="one">
+      <caption></caption>
+    </table>
+    <table id="two">
+      <caption></caption>
+    </table>
+    <table id="three">
+      <caption></caption>
+    </table>
+    <a href="#one">1</a>
+    <a href="#two">2</a>
+    <a href="#three">3</a>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-insert03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-insert03-input.html b/experiments/editorFramework/test/Layer0/outline/reference-insert03-input.html
new file mode 100644
index 0000000..38026ef
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-insert03-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var ref1 = DOM_createElement(document,"A");
+    var ref2 = DOM_createElement(document,"A");
+    var ref3 = DOM_createElement(document,"A");
+    DOM_setAttribute(ref1,"href","#one");
+    DOM_setAttribute(ref2,"href","#two");
+    DOM_setAttribute(ref3,"href","#three");
+
+    Clipboard_pasteNodes([ref1,ref2,ref3]);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<table id="one"><caption>Table 4</caption></table>
+<table id="two"><caption>Table 4</caption></table>
+<table id="three"><caption>Table 4</caption></table>
+[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static01-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-static01-expected.html
new file mode 100644
index 0000000..d4e03ae
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static01-expected.html
@@ -0,0 +1,35 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+    <h1 id="one">One</h1>
+    <h1 id="two">Two</h1>
+    <h1 id="three">Three</h1>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static01-input.html b/experiments/editorFramework/test/Layer0/outline/reference-static01-input.html
new file mode 100644
index 0000000..17bc6e4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static01-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<h1 id="one">4 One</h1>
+<h1 id="two">4 Two</h1>
+<h1 id="three">4 Three</h1>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static02-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-static02-expected.html
new file mode 100644
index 0000000..bba4355
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static02-expected.html
@@ -0,0 +1,39 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+    <figure id="one">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="two">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="three">
+      <figcaption></figcaption>
+    </figure>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static02-input.html b/experiments/editorFramework/test/Layer0/outline/reference-static02-input.html
new file mode 100644
index 0000000..37f7837
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static02-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<figure id="one"><figcaption>Figure 4</figcaption></figure>
+<figure id="two"><figcaption>Figure 4</figcaption></figure>
+<figure id="three"><figcaption>Figure 4</figcaption></figure>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static03-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-static03-expected.html
new file mode 100644
index 0000000..b2638e6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static03-expected.html
@@ -0,0 +1,39 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+    <table id="one">
+      <caption></caption>
+    </table>
+    <table id="two">
+      <caption></caption>
+    </table>
+    <table id="three">
+      <caption></caption>
+    </table>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">2</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">3</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-static03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-static03-input.html b/experiments/editorFramework/test/Layer0/outline/reference-static03-input.html
new file mode 100644
index 0000000..0573746
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-static03-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<table id="one"><caption>Table 4</caption></table>
+<table id="two"><caption>Table 4</caption></table>
+<table id="three"><caption>Table 4</caption></table>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-update01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update01-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-update01-expected.html
new file mode 100644
index 0000000..d96de51
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update01-expected.html
@@ -0,0 +1,36 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+    <h1 id="one">One</h1>
+    <h1 id="item1">New Heading</h1>
+    <h1 id="two">Two</h1>
+    <h1 id="three">Three</h1>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-update01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update01-input.html b/experiments/editorFramework/test/Layer0/outline/reference-update01-input.html
new file mode 100644
index 0000000..69e0b5c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update01-input.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var two = document.getElementById("two");
+    var h1 = DOM_createElement(document,"h1");
+    DOM_appendChild(h1,DOM_createTextNode(document,"New Heading"));
+    DOM_insertBefore(document.body,h1,two);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<h1 id="one">4 One</h1>
+<h1 id="two">4 Two</h1>
+<h1 id="three">4 Three</h1>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>