XML books test case (not part of the build so don't shoot me).
BIN
content/xml/tests/books/bethlehem.gif
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
content/xml/tests/books/bill.gif
Normal file
After Width: | Height: | Size: 4.9 KiB |
97
content/xml/tests/books/books.js
Normal file
@ -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);
|
||||
|
101
content/xml/tests/books/books.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?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/TR/REC-html40">
|
||||
|
||||
<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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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>
|
BIN
content/xml/tests/books/charing.gif
Normal file
After Width: | Height: | Size: 5.8 KiB |
78
content/xml/tests/books/classic.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
43
content/xml/tests/books/common.css
Normal file
@ -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;
|
||||
}
|
BIN
content/xml/tests/books/kerouac.gif
Normal file
After Width: | Height: | Size: 49 KiB |
61
content/xml/tests/books/list.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
BIN
content/xml/tests/books/road.gif
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
content/xml/tests/books/welville.gif
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
layout/xml/tests/books/bethlehem.gif
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
layout/xml/tests/books/bill.gif
Normal file
After Width: | Height: | Size: 4.9 KiB |
97
layout/xml/tests/books/books.js
Normal file
@ -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);
|
||||
|
101
layout/xml/tests/books/books.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?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/TR/REC-html40">
|
||||
|
||||
<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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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 xml:link="simple" show="replace" 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>
|
BIN
layout/xml/tests/books/charing.gif
Normal file
After Width: | Height: | Size: 5.8 KiB |
78
layout/xml/tests/books/classic.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
43
layout/xml/tests/books/common.css
Normal file
@ -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;
|
||||
}
|
BIN
layout/xml/tests/books/kerouac.gif
Normal file
After Width: | Height: | Size: 49 KiB |
61
layout/xml/tests/books/list.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
BIN
layout/xml/tests/books/road.gif
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
layout/xml/tests/books/welville.gif
Normal file
After Width: | Height: | Size: 4.4 KiB |