From a61e198b1a53e485d009a91a83711e55622862a8 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Thu, 12 Nov 1998 23:57:54 +0000 Subject: [PATCH] XML example with scripting git-svn-id: svn://10.0.0.236/trunk@14555 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xml/tests/docbook.css | 5 -- mozilla/content/xml/tests/script.xml | 67 +++++++++++++++++++++++++++ mozilla/layout/xml/tests/docbook.css | 5 -- mozilla/layout/xml/tests/script.xml | 67 +++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 mozilla/content/xml/tests/script.xml create mode 100644 mozilla/layout/xml/tests/script.xml diff --git a/mozilla/content/xml/tests/docbook.css b/mozilla/content/xml/tests/docbook.css index 502600d3c79..a4cc80e5ba6 100644 --- a/mozilla/content/xml/tests/docbook.css +++ b/mozilla/content/xml/tests/docbook.css @@ -1,8 +1,4 @@ -XML { - background-color: inherit; -} - Book { display: block; @@ -260,7 +256,6 @@ Link { ListItem { margin-left: 25pt; display: list-item; - list-style-position: inside; } Literal { diff --git a/mozilla/content/xml/tests/script.xml b/mozilla/content/xml/tests/script.xml new file mode 100644 index 00000000000..2f0050176ee --- /dev/null +++ b/mozilla/content/xml/tests/script.xml @@ -0,0 +1,67 @@ + + + + + The Book + + Chapter 1. + Yada yada yada. + + +"); + + // get the children + var children = node.childNodes; + var length = children.length; + var count = 0; + while(count < length) { + child = children[count]; + list(child); + count++; + } + dump(""); + } + else { + // close tag + dump("/>"); + } + + + } + // if it's a piece of text just dump the text + else if (type == Node.TEXT_NODE) { + dump(node.data); + } +} + +list(document.documentElement); +dump("\n"); +]]> + + diff --git a/mozilla/layout/xml/tests/docbook.css b/mozilla/layout/xml/tests/docbook.css index 502600d3c79..a4cc80e5ba6 100644 --- a/mozilla/layout/xml/tests/docbook.css +++ b/mozilla/layout/xml/tests/docbook.css @@ -1,8 +1,4 @@ -XML { - background-color: inherit; -} - Book { display: block; @@ -260,7 +256,6 @@ Link { ListItem { margin-left: 25pt; display: list-item; - list-style-position: inside; } Literal { diff --git a/mozilla/layout/xml/tests/script.xml b/mozilla/layout/xml/tests/script.xml new file mode 100644 index 00000000000..2f0050176ee --- /dev/null +++ b/mozilla/layout/xml/tests/script.xml @@ -0,0 +1,67 @@ + + + + + The Book + + Chapter 1. + Yada yada yada. + + +"); + + // get the children + var children = node.childNodes; + var length = children.length; + var count = 0; + while(count < length) { + child = children[count]; + list(child); + count++; + } + dump(""); + } + else { + // close tag + dump("/>"); + } + + + } + // if it's a piece of text just dump the text + else if (type == Node.TEXT_NODE) { + dump(node.data); + } +} + +list(document.documentElement); +dump("\n"); +]]> + +