summaryrefslogtreecommitdiffstats
path: root/dom/xml/test/old/books
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/xml/test/old/books
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/xml/test/old/books')
-rw-r--r--dom/xml/test/old/books/bethlehem.gifbin0 -> 5565 bytes
-rw-r--r--dom/xml/test/old/books/bill.gifbin0 -> 5022 bytes
-rw-r--r--dom/xml/test/old/books/books.js97
-rw-r--r--dom/xml/test/old/books/books.xml103
-rw-r--r--dom/xml/test/old/books/charing.gifbin0 -> 5947 bytes
-rw-r--r--dom/xml/test/old/books/classic.css78
-rw-r--r--dom/xml/test/old/books/common.css43
-rw-r--r--dom/xml/test/old/books/kerouac.gifbin0 -> 50387 bytes
-rw-r--r--dom/xml/test/old/books/list.css61
-rw-r--r--dom/xml/test/old/books/road.gifbin0 -> 8004 bytes
-rw-r--r--dom/xml/test/old/books/welville.gifbin0 -> 4535 bytes
11 files changed, 382 insertions, 0 deletions
diff --git a/dom/xml/test/old/books/bethlehem.gif b/dom/xml/test/old/books/bethlehem.gif
new file mode 100644
index 000000000..db41f52fb
--- /dev/null
+++ b/dom/xml/test/old/books/bethlehem.gif
Binary files differ
diff --git a/dom/xml/test/old/books/bill.gif b/dom/xml/test/old/books/bill.gif
new file mode 100644
index 000000000..4b00f890c
--- /dev/null
+++ b/dom/xml/test/old/books/bill.gif
Binary files differ
diff --git a/dom/xml/test/old/books/books.js b/dom/xml/test/old/books/books.js
new file mode 100644
index 000000000..3e4a01d11
--- /dev/null
+++ b/dom/xml/test/old/books/books.js
@@ -0,0 +1,97 @@
+
+// An inefficient, but effective bubble sort
+function sort(collection, key)
+{
+ var i, j;
+ var count = collection.length;
+ var parent, child;
+
+ for (i = count-1; i >= 0; i--) {
+ for (j = 1; j <= i; j++) {
+ if (collection[j-1][key] > collection[j][key]) {
+ // Move the item both in the local array and
+ // in the tree
+ child = collection[j];
+ parent = child.parentNode;
+
+ collection[j] = collection[j-1];
+ collection[j-1] = child;
+
+ parent.removeChild(child);
+ parent.insertBefore(child, collection[j]);
+ }
+ }
+ }
+}
+
+// Set user properties on the nodes in the collection
+// based on information found in its children. For example,
+// make a property "Author" based on the content of the
+// "Author" element found in the childNode list of the node.
+// This makes later sorting more efficient
+function collectInfo(nodes, propNames)
+{
+ var i, j, k;
+ var ncount = nodes.length;
+ var pcount = propNames.length;
+
+ for (i = 0; i < ncount; i++) {
+ var node = nodes[i];
+ var childNodes = node.childNodes;
+ var ccount = childNodes.length;
+
+ for (j = 0; j < ccount; j++) {
+ var child = childNodes[j];
+
+ if (child.nodeType == Node.ELEMENT_NODE) {
+ var tagName = child.tagName;
+
+ for (k = 0; k < pcount; k++) {
+ var prop = propNames[k];
+ if (prop == tagName) {
+ node[prop] = child.firstChild.data;
+ }
+ }
+ }
+ }
+ }
+}
+
+var enabled = true;
+function toggleStyleSheet()
+{
+ if (enabled) {
+ document.styleSheets[2].disabled = true;
+ }
+ else {
+ document.styleSheets[2].disabled = false;
+ }
+
+ enabled = !enabled;
+}
+
+// XXX This is a workaround for a bug where
+// changing the disabled state of a stylesheet can't
+// be done in an event handler. For now, we do it
+// in a zero-delay timeout.
+function initiateToggle()
+{
+ setTimeout(toggleStyleSheet, 0);
+}
+
+var sortableProps = new Array("Author", "Title", "ISBN");
+var books = new Array();
+
+// We uppercase the tagName as a workaround for a bug
+// that loses the original case of the tag.
+var bookset = document.getElementsByTagName("Book");
+
+// We need to create a "non-live" array to operate on. Since
+// we'll be moving things around in this array, we can't use
+// the read-only, live one returned by getElementsByTagName.
+for (var i=0; i < bookset.length; i++) {
+ books[i] = bookset[i];
+}
+
+collectInfo(books, sortableProps);
+
diff --git a/dom/xml/test/old/books/books.xml b/dom/xml/test/old/books/books.xml
new file mode 100644
index 000000000..2067487d8
--- /dev/null
+++ b/dom/xml/test/old/books/books.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="common.css" type="text/css"?>
+<?xml-stylesheet href="classic.css" type="text/css"?>
+<?xml-stylesheet href="list.css" type="text/css"?>
+
+<!DOCTYPE SearchResult>
+
+<SearchResult xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<Header>
+ <Toolbar>
+ <html:form>
+ <Label>Sort by:</Label>
+ <html:input type="button" id="Author" onclick="sort(books,this.id)" value="Author"/>
+ <html:input type="button" id="Title" onclick="sort(books,this.id)" value="Title"/>
+ <html:input type="button" id="ISBN" onclick="sort(books,this.id)" value="ISBN #"/>
+ <html:input type="button" id="toggle" value="Toggle Style" onclick="initiateToggle(); return false;"/>
+ </html:form>
+ </Toolbar>
+
+ <SearchTitle>Amazon.com Search Results for: the keywords include "Road"</SearchTitle>
+</Header>
+
+<BookSet>
+
+ <Book>
+ <BookCover><html:img src="kerouac.gif" width="100" height="140"/></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/0140042598/002-5969498-2733628">On the Road</Title>
+ <Author>Kerouac, Jack</Author>
+ <ISBN>0140042598</ISBN>
+ <Synopsis>
+On The Road, the most famous of Jack Kerouac's works, is not only the soul of the Beat movement and literature, but one of the most important novels of the century. Like nearly all of Kerouac's writing, On The Road is thinly fictionalized autobiography, filled with a cast made of Kerouac's real life friends, lovers, and fellow travelers. Narrated by Sal Paradise, one of Kerouac's alter-egos, On the Road is a cross-country bohemian odyssey that not only influenced writing in the years since its 1957 publication but penetrated into the deepest levels of American thought and culture.
+ </Synopsis>
+ <ListPrice>$12.95</ListPrice>
+ <Price>$10.36</Price>
+ </Book>
+
+ <Book>
+ <BookCover><html:img src="bill.gif" width="100" height="140" /></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/0140260404/002-5969498-2733628">The Road Ahead</Title>
+ <Author>Gates, Bill</Author>
+ <ISBN>666666666</ISBN>
+ <Synopsis>
+In a study, the founder of Microsoft presents his vision for the future in which he sees the digital technologies of the coming years changing the way we buy, work, learn, and communicate. But he doesn't mention XML!
+ </Synopsis>
+ <ListPrice>$15.95</ListPrice>
+ <Price>$12.76</Price>
+ </Book>
+
+ <Book>
+ <BookCover><html:img src="welville.gif" width="100" height="140" /></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/0140167188/002-5969498-2733628">The Road to Wellville</Title>
+ <Author>Boyle, T. Coraghessan</Author>
+ <ISBN>0140167188</ISBN>
+ <Synopsis>
+A snobbish wife and her henpecked husband travel to Dr. Kellogg's spa in turn-of-the-century Battle Creek, where the youth-crazed affluent succumb to quackery. By the author of East is East.
+ </Synopsis>
+ <ListPrice>$12.95</ListPrice>
+ <Price>$10.36</Price>
+ </Book>
+
+ <Book>
+ <BookCover><html:img src="road.gif" width="100" height="140" /></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/1562512625/002-5969498-2733628">AAA Road Atlas 1999</Title>
+ <Author>A. A. A.</Author>
+ <ISBN>1562512625</ISBN>
+ <Synopsis>
+The definitive road atlas to the United States, Canada and Mexico.
+ </Synopsis>
+ <ListPrice>$9.95</ListPrice>
+ <Price>$9.95</Price>
+ </Book>
+
+ <Book>
+ <BookCover><html:img src="bethlehem.gif" width="100" height="140" /></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/0449219143/002-5969498-2733628">Bethlehem Road</Title>
+ <Author>Perry, Anne</Author>
+ <ISBN>0449219143</ISBN>
+ <Synopsis>
+He might be elegant, but there's no mistaking it--the gentleman tied to the lamppost on Westminster Bridge is definitely dead. Before Inspector Thomas Pitt can even speculate on why anyone should want to kill the eminent M.P., Sir Lockwood, a colleague of his, meets the same fate at the same spot. The public is outraged, and clever Charlotte Pitt, Thomas's well-born wife, helps her hard-pressed husband by scouting society's drawing rooms for clues to these appalling crimes. Meanwhile, another victim is being stalked....
+ </Synopsis>
+ <ListPrice>$6.99</ListPrice>
+ <Price>$5.59</Price>
+ </Book>
+
+ <Book>
+ <BookCover><html:img src="charing.gif" width="100" height="140" /></BookCover>
+ <Title xlink:type="simple" xlink:show="replace" xlink:href="http://www.amazon.com/exec/obidos/ASIN/0140143505/002-5969498-2733628">84 Charing Cross Road</Title>
+ <Author>Hanff, Helene</Author>
+ <ISBN>0140143505</ISBN>
+ <Synopsis>
+84, Charing Cross Road is a charming record of bibliophilia, cultural difference, and imaginative sympathy. For 20 years, an outspoken New York writer and a rather more restrained London bookseller carried on an increasingly touching correspondence...
+ </Synopsis>
+ <ListPrice>$9.95</ListPrice>
+ <Price>$7.96</Price>
+ </Book>
+
+</BookSet>
+
+<html:script src="books.js" />
+
+</SearchResult>
diff --git a/dom/xml/test/old/books/charing.gif b/dom/xml/test/old/books/charing.gif
new file mode 100644
index 000000000..9a63fb0b2
--- /dev/null
+++ b/dom/xml/test/old/books/charing.gif
Binary files differ
diff --git a/dom/xml/test/old/books/classic.css b/dom/xml/test/old/books/classic.css
new file mode 100644
index 000000000..1ebc92f6e
--- /dev/null
+++ b/dom/xml/test/old/books/classic.css
@@ -0,0 +1,78 @@
+
+
+BookSet {
+ display: block;
+}
+
+Book {
+ float: left;
+ display: block;
+ width: 300px;
+ background-color: #f1f1f1;
+ border: 1px solid #cccccc;
+ margin-right: 8px;
+ margin-top: 8px;
+}
+
+BookCover {
+ display: inline;
+ float: left;
+ margin-right: 10px;
+ padding: 5px;
+ width: 100px;
+ height: 140px;
+}
+
+Title {
+ display: block;
+ font-weight: bold;
+ color: blue;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+Author {
+ display: block;
+ font-style: italic;
+}
+
+Synopsis {
+ display: block;
+ overflow: scroll;
+ height: 100px;
+ width: 155px;
+ padding: 3px;
+ background-color: #ddddff;
+}
+
+
+ListPrice {
+ display: block;
+ text-align: right;
+ padding-right: 15px;
+ text-decoration: line-through;
+}
+
+
+Price {
+ display: block;
+ color: rgb(20,100,0);
+ text-align:right;
+ padding-right: 15px;
+ font-weight: bold;
+}
+
+
+Price:before {
+ content: "Our Price: ";
+}
+
+ISBN {
+ display: block;
+ font-family: monospace;
+ font-size: 8pt;
+}
+
+
+
+
diff --git a/dom/xml/test/old/books/common.css b/dom/xml/test/old/books/common.css
new file mode 100644
index 000000000..d63f09585
--- /dev/null
+++ b/dom/xml/test/old/books/common.css
@@ -0,0 +1,43 @@
+SearchResult {
+ display: block;
+ margin-top: 8px;
+ margin-left: 8px;
+}
+
+Header {
+ width: 612px;
+ display: block;
+}
+
+SearchTitle {
+ display: block;
+ width: 280px;
+ border-bottom: thin solid black;
+ padding-bottom: 6px;
+ margin-bottom: 12px;
+}
+
+SearchTitle:first-line {
+ font-family: Verdana, Sans-Serif;
+ color: #cc6600;
+ font-size: 14pt;
+}
+
+Toolbar {
+ font-family: Verdana, Sans-Serif;
+ float: right;
+ font-size: 7pt;
+ display: block;
+ border: ridge #ddddff 4px;
+ width: 220px;
+ margin-right: 0px;
+ text-align: center;
+}
+
+Label {
+ font-weight: bold;
+}
+
+input {
+ margin-top: 2px;
+} \ No newline at end of file
diff --git a/dom/xml/test/old/books/kerouac.gif b/dom/xml/test/old/books/kerouac.gif
new file mode 100644
index 000000000..df2b371d0
--- /dev/null
+++ b/dom/xml/test/old/books/kerouac.gif
Binary files differ
diff --git a/dom/xml/test/old/books/list.css b/dom/xml/test/old/books/list.css
new file mode 100644
index 000000000..3b5d40891
--- /dev/null
+++ b/dom/xml/test/old/books/list.css
@@ -0,0 +1,61 @@
+
+BookSet {
+ display: block;
+}
+
+Book {
+ display: list-item;
+ float: none;
+ border: none;
+ background: inherit;
+}
+
+BookCover {
+ display: none;
+}
+
+Title {
+ display: block;
+ font-weight: bold;
+ color: blue;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+Author {
+ display: block;
+ font-style: italic;
+}
+
+Synopsis {
+ display: none;
+}
+
+
+ListPrice {
+ display: none;
+ text-align: right;
+ padding-right: 15px;
+ text-decoration: line-through;
+}
+
+
+Price {
+ display: block;
+ color: rgb(20,100,0);
+ font-weight: bold;
+ text-align:left;
+}
+
+
+Price:before {
+ content: "Our Price: ";
+}
+
+ISBN {
+ display: block;
+ font-family: monospace;
+ font-size: 8pt;
+}
+
+
diff --git a/dom/xml/test/old/books/road.gif b/dom/xml/test/old/books/road.gif
new file mode 100644
index 000000000..5ba7920c7
--- /dev/null
+++ b/dom/xml/test/old/books/road.gif
Binary files differ
diff --git a/dom/xml/test/old/books/welville.gif b/dom/xml/test/old/books/welville.gif
new file mode 100644
index 000000000..7ff24a99e
--- /dev/null
+++ b/dom/xml/test/old/books/welville.gif
Binary files differ