b=325080, Feed Parsing Service tests, r=ben

This commit is contained in:
sayrer%gmail.com 2006-05-03 04:10:12 +00:00
parent 5a13686d84
commit 57eb4e301b
130 changed files with 4195 additions and 0 deletions

View File

@ -0,0 +1,41 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Feed Parser Unit Tests.
#
# The Initial Developer of the Original Code is Robert Sayre.
#
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
export MOZILLA_FIVE_HOME=../../../../fb-debug/dist/bin
export LD_LIBRARY_PATH=../../../../fb-debug/dist/bin
../../../../fb-debug/dist/bin/run-mozilla.sh ../../../../fb-debug/dist/bin/xpcshell ./shell.js
#perl ../../../../../js/src/xpconnect/tests/idispatch/Tests/jsDriver.pl -e xpcshell --shellpath=.. -k

View File

@ -0,0 +1,141 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Feed Parser Unit Tests.
*
* The Initial Developer of the Original Code is Robert Sayre.
*
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK *****/
// shell.js
// This file sets up the unit test environment by building an array of files
// to be tested. It assumes it lives in a folder adjacent to the a folder
// called 'xml', where the testcases live.
//
// The directory layout looks something like this:
//
// tests/ *shell.js*
// |
// - test.js
// |
// - xml/ -- rss1/...
// |
// -- rss2/...
// |
// -- atom/testcase.xml
function trimString(s)
{
return(s.replace(/^\s+/,'').replace(/\s+$/,''));
}
var tests = new Array();
const nsIDirectoryServiceProvider = Components.interfaces.nsIDirectoryServiceProvider;
const nsIDirectoryServiceProvider_CONTRACTID = "@mozilla.org/file/directory_service;1";
const ioService = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService);
// find the current directory containing our test XML
var dirServiceProvider = Components.classes[nsIDirectoryServiceProvider_CONTRACTID].getService(nsIDirectoryServiceProvider);
var persistent = new Object();
var topDir = dirServiceProvider.getFile("CurWorkD", persistent);
var entries = topDir.directoryEntries;
var xmlDir;
while(entries.hasMoreElements()){
xmlDir = entries.getNext();
xmlDir.QueryInterface(Components.interfaces.nsILocalFile);
if(xmlDir.leafName == "xml")
break;
else
xmlDir = null;
}
// if we got our xmldir, find our testcases
var testDir;
if(xmlDir){
entries = xmlDir.directoryEntries;
while(entries.hasMoreElements()){
testDir = entries.getNext();
testDir.QueryInterface(Components.interfaces.nsILocalFile);
if(testDir.exists() && testDir.isDirectory()){
var testfiles = testDir.directoryEntries;
while(testfiles.hasMoreElements()){ // inside an individual testdir, like "rss2"
var test = testfiles.getNext();
test.QueryInterface(Components.interfaces.nsILocalFile);
if(test.exists() && test.isFile()){
// Got a feed file, now we need to add it to our tests
// and parse out the Description and Expect headers.
// That lets us write one test.js file and keep the
// tests with the XML. Convenient method learned from
// Mark Pilgrim.
var istream = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance(Components.interfaces.nsIFileInputStream);
try{
// open an input stream from file
istream.init(test, 0x01, 0444, 0);
istream.QueryInterface(Components.interfaces.nsILineInputStream);
var line = {}, hasmore, testcase = {}, expectIndex, descIndex;
do {
hasmore = istream.readLine(line);
expectIndex = line.value.indexOf('Expect:');
descIndex = line.value.indexOf('Description:');
baseIndex = line.value.indexOf('Base:');
if(descIndex > -1)
testcase.desc = trimString(line.value.substring(line.value.indexOf(':')+1));
if(expectIndex > -1)
testcase.expect = trimString(line.value.substring(line.value.indexOf(':')+1));
if(baseIndex > -1)
testcase.base = ioService.newURI(trimString(line.value.substring(line.value.indexOf(':')+1)),null,null);
if(testcase.expect && testcase.desc){
// got our fields, let's add it to our array and break
testcase.path = xmlDir.leafName + '/' + testDir.leafName + '/' + test.leafName;
testcase.file = test;
tests.push(testcase);
break; // out of do-while
}
} while(hasmore);
}catch(e){
dump("FAILED! Error reading test case in file " + test.leafName + " " + e + "\n");
}finally{
istream.close();
}
}
}
}
}
}
load('test.js');

View File

@ -0,0 +1,107 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Robert Sayre.
*
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK *****/
var passed = 0;
var ran = 0;
if(tests.length < 1){
dump("FAILED! tests.length was " + tests.length + "\n");
}
function isIID(a,iid){
var rv = false;
try{
a.QueryInterface(iid);
rv = true;
}catch(e){}
return rv;
}
function TestListener(){}
TestListener.prototype = {
handleResult: function(result){
var feed = result.doc;
// QI to something
(isIID(feed, Components.interfaces.nsIFeed));
try {
if(!eval(testcase.expect)){
print("FAILED! Test was: \"" + testcase.desc + "\" |\n" + testcase.expect + '|\n');
}else{
passed += 1;
}
}
catch(e) {
print("FAILED! Test was: " + testcase.expect + "\nex: " + e.message + "\n");
}
ran += 1;
}
}
var startDate = new Date();
for(var i=0; i<tests.length; i++){
var testcase = tests[i];
var uri;
if (testcase.base == null)
uri = ioService.newURI('http://example.org/'+testcase.path, null,null);
else
uri = testcase.base
var parser = Components.classes["@mozilla.org/feed-processor;1"]
.createInstance(Components.interfaces.nsIFeedProcessor);
var stream = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance(Components.interfaces.nsIFileInputStream);
var listener = new TestListener();
try{
//print('Start: ' + testcase.path);
stream.init(testcase.file, 0x01, 0444, 0);
parser.listener = listener;
parser.parseFromStream(stream, uri);
}catch(e){
dump("FAILED! Error parsing file " + testcase.file.leafName +
"Error: " + e.message + "\n");
}finally{
stream.close();
}
}
var endDate = new Date();
print("Start: " + startDate);
print("End : " + endDate);
print("tests: " + tests.length);
print("ran: " + ran);
print("passed: " + passed);

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry summary works
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(false) == "test content";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<content>test content</content>
</entry>
</feed>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry content:encoded and xhtml works
Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "should appear";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<b>test</b> content
</div>
</summary>
<content:encoded>
should appear
</content:encoded>
</entry>
</feed>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry content html works
Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "test content";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<content type="html">&lt;b>test&lt;/b> content</content>
</entry>
</feed>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry content xhtml works
Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "test content";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<b>test</b> content
</div>
</content>
</entry>
</feed>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry content xhtml works
Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(false); content == "<b>test</b> content";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<b>test</b> content
</div>
</content>
</entry>
</feed>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom feed and entry with random attributes works
Expect: var parent = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).parent; parent.fields.getProperty('atom:title') == "hmm";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
</entry>
</feed>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry summary xhtml works
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).summary(true) == "test summary";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<b>test</b> summary
</div>
</summary>
</entry>
</feed>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom feed and entry with random attributes works
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('atom:title') == "test";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
</entry>
</feed>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry title normalized
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).title == "test";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
</entry>
</feed>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry content:encoded and xhtml works
Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(false); content == "<b>test</b> content";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<b>test</b> content
</div>
</content>
<content:encoded>
shouldn't appear
</content:encoded>
</entry>
</feed>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom rights works with HTML
Expect: feed.fields.getProperty('atom:rights') == '<i>test</i> rights'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
</summary>
</feed>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author count works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.length == 1;
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
</author>
</feed>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author count works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.length == 2;
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
</author>
<author>
</author>
</feed>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.queryElementAt(0, Components.interfaces.nsIPropertyBag).getProperty('atom:email')=='hmm@example.com';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
</feed>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.queryElementAt(1, Components.interfaces.nsIPropertyBag).getProperty('atom:email')=='bar@example.com';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
</feed>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.queryElementAt(0, Components.interfaces.nsIPropertyBag).getProperty('atom:name')=='foo';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
<name>foo</name>
</author>
</feed>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.queryElementAt(0, Components.interfaces.nsIPropertyBag).getProperty('atom:name')=='John Doe';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author uri works
Expect: var authors = feed.fields.getProperty('author'); authors.QueryInterface(Components.interfaces.nsIArray); authors.queryElementAt(1, Components.interfaces.nsIPropertyBag).getProperty('atom:uri')=='http://example.com';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
<uri>http://example.org</uri>
</author>
<author>
<email>bar@example.com</email>
<name>foo</name>
<uri>http://example.com</uri>
</author>
</feed>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: wfw works with extra attribute
Expect: feed.fields.getProperty('wfw:commentRss') == 'http://example.org'
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://example.org"
xmlns:bla="http://wellformedweb.org/CommentAPI/">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id foo:bar="baz">urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<bla:commentRss hmm="yeah">http://example.org</bla:commentRss>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom contributor uri works
Expect: var contributors = feed.fields.getProperty('contributor'); contributors.QueryInterface(Components.interfaces.nsIArray); contributors.queryElementAt(1, Components.interfaces.nsIPropertyBag).getProperty('atom:uri')=='http://example.com';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<contributor>
<email>hmm@example.com</email>
<name>foo</name>
<uri>http://example.org</uri>
</contributor>
<contributor>
<email>bar@example.com</email>
<name>foo</name>
<uri>http://example.com</uri>
</contributor>
</feed>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom entry count works
Expect: feed.items.length == 3
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<logo>http://example.org/logo.jpg</logo>
<entry></entry>
<entry></entry>
<entry></entry>
</feed>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom generator works
Expect: var gen = feed.fields.getProperty('generator'); gen.QueryInterface(Components.interfaces.nsIPropertyBag2); gen.getProperty('agent') == 'Hmm';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator>Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
</summary>
</feed>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom generator works
Expect: var gen = feed.fields.getProperty('generator'); gen.QueryInterface(Components.interfaces.nsIPropertyBag2); gen.getProperty('uri') == 'http://example.org';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
</summary>
</feed>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom generator works
Expect: var gen = feed.fields.getProperty('generator'); gen.QueryInterface(Components.interfaces.nsIPropertyBag2); gen.getProperty('version') == '1.1';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
</summary>
</feed>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom icon works
Expect: feed.fields.getProperty('atom:icon') == 'http://example.org/favicon.ico'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<icon>http://example.org/favicon.ico</icon>
</feed>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: feed.fields.getProperty('atom:id') == 'urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom feed id works with extra attribute
Expect: feed.fields.getProperty('atom:id') == 'urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6'
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://example.org">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id foo:bar="baz">urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom logo works
Expect: feed.fields.getProperty('atom:logo') == 'http://example.org/logo.jpg'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
<logo>http://example.org/logo.jpg</logo>
</feed>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom feed and entry with random attributes works
Expect: feed.title == "hmm" && feed.items.length == 2
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry foo:bar="baz"></entry>
<entry></entry>
</feed>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom rights works
Expect: feed.fields.getProperty('atom:rights') == '<b>test</b> rights'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> rights</div>
</rights>
</feed>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom rights works with nested divs
Expect: feed.fields.getProperty('atom:rights') == '<div><div>test</div> rights</div>'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> rights</div></div>
</rights>
</feed>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom subtitle works
Expect: feed.subtitle(false) == '<b>test</b> subtitle';
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<subtitle type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> subtitle</div>
</subtitle>
</feed>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom title works
Expect: feed.title == 'test title'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test title</title>
</feed>

View File

@ -0,0 +1,936 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Description: Feed title works with full entry
Expect: feed.title == 'ongoing'
-->
<feed xmlns='http://www.w3.org/2005/Atom'
xml:base='http://www.tbray.org/ongoing/ongoing.atom'
xml:lang='en-us'>
<title>ongoing</title>
<id>http://www.tbray.org/ongoing/</id>
<link href='./' />
<link rel='self' href='' />
<logo>rsslogo.jpg</logo>
<icon>/favicon.ico</icon>
<updated>2006-04-26T20:10:25-08:00</updated>
<author><name>Tim Bray</name></author>
<subtitle>ongoing fragmented essay by Tim Bray</subtitle>
<rights>All content written by Tim Bray and photos by Tim Bray Copyright Tim Bray, some rights reserved, see /ongoing/misc/Copyright</rights>
<generator uri='/misc/Colophon'>Generated from XML source code using Perl, Expat, XML::Parser, Emacs, Mysql, and ImageMagick. Industrial strength technology, baby.</generator>
<entry xml:base='When/200x/2006/04/26/'>
<title>Spring in White on White</title>
<link href='Spring-in-White-on-White' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Spring-in-White-on-White</id>
<published>2006-04-26T13:00:00-08:00</published>
<updated>2006-04-26T20:10:16-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Garden' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Garden' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Most people would generally prefer a climate where it&#x2019;s bright and warm most of the time. But for Canadians and others who live where it&#x2019;s not, there are compensations, and one is the experience of spring. I have a picture.</div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Most people would generally prefer a climate where its bright
and warm most of the time. But for Canadians and others who live where its
not, there are compensations, and one is the experience of
spring. I have a picture.</p>
<img src="IMGP3247.png" alt="Pear blossoms against cherry blossoms" />
<div class="caption"><p>The blossoms are pear in the foreground, cherry behind.</p></div>
<p>After all the months of 50° North Latitude winter—icy-sharp in most
of Canada, wet and dark here in Vancouver—the soul, the spirit, and the
libido all spring to life when the sun comes back. Weve had a solid year of
crappy weather, but this last Saturday through Monday were solidly summery,
bright
and warm; and in this season the days are already long and each gets
longer so fast you can feel it.</p>
<p>On the back porch, our pear trees branches were silhouetted against the
neighbors big wild old cherry; the cherry yields no edible fruit but who
cares, its beautiful
tree any time of year.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/26/'>
<title>Scott</title>
<link href='Scott' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Scott</id>
<published>2006-04-26T13:00:00-08:00</published>
<updated>2006-04-26T20:06:50-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Business/Sun' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Business' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Ive been watching our internal leadership conference and spending quite a
bit of time talking in the virtual hallways, and Ive been surprised at
the intensity of feeling about Mr. McNealy. Yes, there are those
here saying “About bloody time, now we can make some progress” but theres a
much bigger group that is genuinely emotional about this transition.
Maybe its a function of seniority: I never met nor corresponded with Scott, and
he hasnt been
much of a presence in the companys conversation in the time Ive been here.
But there are a lot of smart, seasoned, unsentimental people making it clear
that
hes been a major force in their lives, at a more personal level than Im
used to hearing when people speak about executives. I guess also that to a
lot of people, Suns vision, for which Scott gets some of the credit, was a
radical and wonderful thing. I first used Unix in 1979 and quit a nice
big-company job
to become a VAX-bsd sysadmin in 1983, so Ive always kind of
lived inside that vision.
But Ill tell you one thing, what Ive been hearing the last couple of days
makes me really regret that I didnt get to know Scott.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/26/'>
<title>Jacobs, Pictures, Spartans</title>
<link href='Jane-Jacobs' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Jane-Jacobs</id>
<published>2006-04-26T13:00:00-08:00</published>
<updated>2006-04-26T17:28:59-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p><a href="http://en.wikipedia.org/wiki/Jane_Jacobs">Jane Jacobs</a> died;
the city I live in, Vancouver, is pretty solidly Jacobsian both in its current
shape and its planning dogma. By choosing to live here Im empirically a
fan. Oddly, few have remarked how great Jacobs
<em>looked</em>; her face commanded the eye. Which leads me Alex
Waterhouse-Haywards wonderful
<a href="http://www.alexwaterhousehayward.com/blog/2006/04/jane-jacobs-viveca-lindfors_26.html">Jane Jacobs &amp; Viveca Lindfors</a>;
surprising portraits and thoughts on decoration. W-Hs blog has become one of
only two or three that I
stab at excitedly whenever I see something new. For example, see
<a href="http://www.alexwaterhousehayward.com/blog/archives/2006_04_01_archive.html#114476408248660848">Sex Crimes, Homicide and Drugs</a>
and yes, thats what its about.
Staying with the death-and-betrayal theme, and apparently (but not really)
shifting back 2&#xbd; millennia, see John Cowans
<a href="http://recycledknowledge.blogspot.com/2006/04/war-after-simonides.html">The
War (after Simonides)</a>, being careful to look closely at the links.
Ive
<a href="http://www.tbray.org/ongoing/When/200x/2003/03/24/Herodotus">written</a>
about those same wars.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/25/'>
<title>LAMP and MARS</title>
<link href='Scaling-Rails' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/25/Scaling-Rails</id>
<published>2006-04-25T13:00:00-08:00</published>
<updated>2006-04-26T07:24:06-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Sun' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>At
<a href="/ongoing/When/200x/2006/04/13/RoR">that Rails conference</a>, when I
was
<a href="http://blog.garbledygook.com/2006/04/17/ruby-on-rails-podcast-tim-bray-ruby-on-rails-podcast/">talking</a>
to
<a href="http://jroller.com/page/obie">Obie Fernandez</a>, he asked, more or
less “How can Sun love us? Were not Java” and I said, more or less, “Hey,
youre programmers, you write software and there have to be computers to run
it, we sell computers, why wouldnt we love you?” Anyhow, we touched on
parallelism a bit and I talked up the
<a href="http://www.sun.com/processors/UltraSPARC-T1/">T1</a>;
Obie took that ball and
<a href="http://jroller.com/page/obie?entry=will_ultrasparc_t1_emerge_as">ran with it</a>,
saying all sorts of positive things about synergy between Rails
shared-nothing architecture and our multicore systems. Yeah, well, good in
theory, but Im too old to make that kind of prediction without running some
tests. Hah, it turns out that
<a href="http://joyent.com/">Joyent</a> has been
<a href="http://scalewithrails.com/">doing that</a>, and have
<a href="http://scalewithrails.com/downloads/ScaleWithRails-April2006.pdf">76
PDF slides</a> on the subject.
If you care about big-system scaling issues, read the whole thing; a little
long, but amusing and with hardly any bullet lists. If youre a Sun
shareholder looking for a pick-me up, check out slides 40-41, 49, and 52-74.
Oh, I gather that the T1, Solaris, and ZFS are OK for Java too.
<i>[Update: The title was just “SAMR”, as in LAMP with two new letters.
Enough people didnt get it that I was forced to think about it, and MARS
works better anyhow.]</i></p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/25/'>
<title>Real-Time Journalism</title>
<link href='Talk-With-Berlind' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/25/Talk-With-Berlind</id>
<published>2006-04-25T13:00:00-08:00</published>
<updated>2006-04-26T06:40:19-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Journalism' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Journalism' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Syndication' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Syndication' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>I got email late yesterday from
<a href="http://blogs.zdnet.com/bio.php#berlind">David Berlind</a>: “Hey, can
I call you for a minute?” He wanted commentary on
<a href="http://blogs.zdnet.com/BTL/?p=2906">a story he was writing</a> that I
think is about the potential for intellectual-property lock-ins on RSS and Atom
extensions. I say “I think is about” because the headline is “Will or could
RSS get forked?”. After a few minutes chat, David asked if he could record
for a podcast, and even though I only had a cellphone, the audio came out OK.
The conversation was rhythmic: David brought up a succession of potential
issues and answered each along the lines of “Yes, its reasonable to worry
about that, but in this
case I dont see any particular problems.”
Plus I emitted a mercifully-brief rant on the difference between protocols,
data, and software.
On the one hand, I thought David could have been a
little clearer that I was pushing back against the thrust of his story, but on
the other hand he included the whole conversation right
there in the piece, so anyone who actually cares can listen and find out what
I actually said, not what I think I said nor what David reported I said.
I find this raw barely-intermediated journalism (we
talk on the phone this afternoon, its on the Web in hours) a little
shocking still.
On balance, its better than the way we used to do things.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/24/'>
<title>The Transition Explained</title>
<link href='CEO-Transition' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/24/CEO-Transition</id>
<published>2006-04-24T13:00:00-08:00</published>
<updated>2006-04-24T16:49:05-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Business/Sun' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Business' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Its not that complicated, really.
Bloggers are
<a href="http://www.sun.com/2006-0418/js/index.jsp">taking over the world</a>.
Resistance is futile; you will be assimilated.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/24/'>
<title>5&#x272d;&#x266b;: One More Cup of Coffee</title>
<link href='One-More-Cup-Of-Coffee' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/24/One-More-Cup-Of-Coffee</id>
<published>2006-04-24T13:00:00-08:00</published>
<updated>2006-04-24T13:00:00-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Music/Recordings' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Music' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Recordings' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Music/5 Stars' />
<category scheme='http://www.tbray.org/ongoing/What/' term='5 Stars' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I&#x2019;m not really a <a href='http://en.wikipedia.org/wiki/Bob_Dylan'>Bob Dylan</a> fan. A voice like that, and a tunesmithing talent like that, come along only a few times per century, but he&#x2019;s still kind of irritating. That aside, the song <cite>One More Cup of Coffee</cite>, from the 1976 album <a href='http://en.wikipedia.org/wiki/Desire_%28album%29'>Desire</a>, can&#x2019;t be ignored; wonderful tune, wonderful orchestration, wonderful performance. <i>(&#x201c;5&#x272d;&#x266b;&#x201d; series introduction <a href='/ongoing/When/200x/2006/01/23/5-Star-Music'>here</a>; with <a href='/ongoing/When/200x/2006/01/23/5-Star-Music#p-1'>an explanation</a> of why the title may look broken.)</i></div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Im not really a
<a href="http://en.wikipedia.org/wiki/Bob_Dylan">Bob Dylan</a> fan. A voice
like that, and a tunesmithing talent like that, come along only a few times
per century, but hes still kind of irritating.
That aside, the song <cite>One More Cup of Coffee</cite>, from the 1976 album
<a href="http://en.wikipedia.org/wiki/Desire_%28album%29">Desire</a>, cant be
ignored; wonderful tune, wonderful orchestration, wonderful performance.
<i>(“5✭♫” series introduction <a href="/ongoing/When/200x/2006/01/23/5-Star-Music">here</a>;
with <a href="/ongoing/When/200x/2006/01/23/5-Star-Music#p-1">an
explanation</a> of why the title may look broken.)</i></p>
<img src="Desire.png" class="inline" alt="Desire, by Bob Dylan" />
<h2 id='p-1'>The Context</h2>
<p>Nothing I can possibly write will add any wisdom to the
millions of words, some 90% of them in excess of needs, written on the subject
of this particular person.</p>
<p>A personal statement: Bob Dylan has long irritated me for, during the first
thirty years or
so of his career, never having given a straight answer to a straight question,
and for writing songs with dozens of boring verses. But theyll still be
listening
to lots of his performances long after Im dead, and in recent years hes
become a better, more direct, interview.</p>
<p>My taste in Dylan is a little unusual: once you get past <cite>One More Cup
of Coffee</cite>, my favorites would be <cite>Baby Let Me Follow You
Down</cite> (from the <cite>Last Waltz</cite> soundtrack) and
<cite>Crash on the Levee (Down in the Flood)</cite> from
<a href="http://en.wikipedia.org/wiki/The_Basement_Tapes">The Basement
Tapes</a>.</p>
<p><cite>Desire</cite>, the record, is hit and miss. <cite>Joey</cite>,
glorification of the life of some mafioso, is flawed in concept
and unlistenable in execution. <cite>Hurricane</cite>, whatever you think
about
<a href="http://en.wikipedia.org/wiki/Rubin_Carter">Mr. Carter</a>, that song
rocks; and <cite>Isis</cite> hits pretty hard too.</p>
<h2 id='p-2'>The Music</h2>
<p>Is there anything in <cite>One More Cup of Coffee</cite> thats not
perfect? Well yes, in the verses, the
lyrics on occasion drag (“He oversees his kingdom / So no stranger does
intrude / His voice it trembles as he calls out / For another plate of food”).
But apart from that, the sentiment is compelling,
<a href="http://en.wikipedia.org/wiki/Scarlet_Rivera">Scarlet Riveras</a>
violin is beautifully scored and played, the tune is to die for, and the
backing vocals are by Emmylou Harris, who you can bet is going to be here in
the 5-✭ series one of these days.
And while theres not much middle ground on the subject of Dylans singing, if
you like it, youll <em>really</em> like this song.</p>
<p>Listen to the choruses: Bob and Emmylou veer wildly around the rhythm, then
coalesce on the beat when it matters, and theyre making it
up as they go along, theyre wholly inhabiting the moment, and its
quite, quite perfect.</p>
<h2 id='p-3'>Sampling It</h2>
<p>Oh yeah, its out there. And theres a live version too; but the smart
thing would be to go buy the un-compressed un-DRMed shiny round silver
version of <cite>Desire</cite>; its a keeper.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/24/'>
<title>Atomic Monday</title>
<link href='Atomic-Monday' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/24/Atomic-Monday</id>
<published>2006-04-24T13:00:00-08:00</published>
<updated>2006-04-24T00:44:06-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Syndication' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Syndication' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Atom' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Atom' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>First of all, implementors of anything Atom-related need to spend some time
<a href="http://golem.ph.utexas.edu/~distler/blog/archives/000793.html">chez
Jacques Distler</a>; in particular, the conversation that plays out in the
comments. Second, theres this piece of software called
<a href="http://www.planetplanet.org/">Planet Planet</a> that allows you to
make an aggregate web page by reading lots of feeds; for example, see
<a href="http://www.planetapache.org/">Planet Apache</a> or
<a href="http://planetsun.org/">Planet Sun</a>.
Sam Ruby decided that its Atom support needed some work, so
<a href="http://www.intertwingly.net/blog/2006/04/23/Adding-Atom-support-to-PlanetPlanet">he did
it</a>. Now, heres the exciting part: he pinged me over the weekend and said
“Hey, look at this” wanting to show me his cleverly-Atomized
Planet Intertwingly feed.
I looked at it in
<a href="http://ranchero.com/netnewswire/">NetNewsWire</a> and was puzzled for
a moment; some but not all of the
things in the feed were highlighted as unread, even though this was the first
time Id seen it. Then the light went on.
This
is Atom doing <em>exactly what we went to all that trouble to make it do</em>.
NetNewsWire has good Atom support and, because Atom entries all have unique
IDs and timestamps, it can
tell that its seen lots of those entries before in other feeds that I
subscribe to. Thats how I found Jacques piece. This is huge; anyone who
uses synthetic or aggregated feeds knows that dupes are a big problem, showing
up all over the place.
No longer, Atom makes that problem go away.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/22/'>
<title>Hyatt on the High-Res Web</title>
<link href='High-Res-Web' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/22/High-Res-Web</id>
<published>2006-04-22T13:00:00-08:00</published>
<updated>2006-04-23T17:12:18-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Presentation' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Presentation' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Check out Dave Hyatts
<a href="http://webkit.opendarwin.org/blog/?p=55">excellent write-up</a> on
designing and rendering Web pages so they take advantage of the
higher-resolution screens that <em>may</em> be coming our way.
I emphasize “may” because Ive seen how slowly weve picked up pixels over
the years. The first really substantial screen I ever worked on was a
1988-vintage Sun workstation with about a million pixels. The Mac on my
lap right now, which has 125 times as much memory as that workstation, has
only 1.38 million pixels.
Anyhow, Hyatt has some smart things to say on the issues,
which are trickier than you might think. I suspect that sometime in a couple of
years, if I still care about <span class='o'>ongoing</span>, Im going to
have to go back and reprocess all the images so that higher-res versions are
available for those who have the screens and dont mind downloading bigger
files.
Anyhow, Daves piece may be slightly misleading in that he talks about SVG
as though
its something coming in the future. Not so, check out
<a href="http://zcorpan.1go.dk/sandbox/svg/atom/.xml">this nifty SVG Atom
logo</a>, which works fine in all the Mozilla browsers I have here.
Load it up, resize the window, and watch what happens. Then do a “view
source”.
<i>[Update:
<a href="http://blog.codedread.com">Jeff Schiller</a> writes to tell me that
Opera 9 does SVG (and Opera 8 “SVG Tiny”) too.]
[<a href="http://www.freeke.org/ffg">Dave Walker</a> writes: Though the shipping version of Safari doesnt support SVG,
<a href="http://nightly.webkit.org/builds/Latest-WebKit-SVN.dmg">the
nightlies</a> do.]
[<a href="http://www.davelemen.com/archives/2006/04/is_it_time_for_jpeg_2000_to_go_mainstream.html">Dave Lemen</a>
points to
<a href="http://en.wikipedia.org/wiki/JPEG-2000">JPEG 2000</a> as possibly
useful in a high-res context.]</i></p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/23/'>
<title>Wrong About the Infield Fly Rule</title>
<link href='Wrong-About-the-Infield-Fly-Rule' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/23/Wrong-About-the-Infield-Fly-Rule</id>
<published>2006-04-23T13:00:00-08:00</published>
<updated>2006-04-23T15:02:41-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Family' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Family' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>My brother
<a href="http://takingalongview.blogspot.com/">Rob</a> is really taking to
this blogging medium. Check out his recent
<a href="http://takingalongview.blogspot.com/2006/04/credo.html">Credo</a>,
and also the only instance Ive seen of
<a href="http://takingalongview.blogspot.com/2006/04/ode-to-96-chevy-lumina.html">Anglo-Saxon alliterative poetry</a>
applied to a mini-van.</p>
</div></content></entry>
<entry xml:base='When/200x/2004/12/12/'>
<title>Statistics</title>
<link href='BMS' />
<id>http://www.tbray.org/ongoing/When/200x/2004/12/12/BMS</id>
<published>2004-12-12T12:00:00-08:00</published>
<updated>2006-04-23T10:10:02-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Publishing' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Publishing' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Almost every Sunday I grab the week&#x2019;s <span class="o">ongoing</span> logfiles and update my numbers. I find it interesting and maybe others will too, so this entry is now the charts&#x2019; permanent home. I&#x2019;ll update it most weeks, probably. <i>[Updated: 2006/04/23.]</i></div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Almost every Sunday I grab the weeks <span class='o'>ongoing</span>
logfiles and update my numbers.
I find it interesting
and maybe others will too, so
this entry is now the charts permanent home. Ill update it most weeks,
probably.
<i>[Updated: 2006/04/23.]</i></p>
<img src="Browser-Market-Share.png" alt="Browser market shares at ongoing" />
<div class="caption"><p>Browsers visiting <span class='o'>ongoing</span>,
percent.</p></div>
<img src="Browsers-via-search.png" alt="Browser market shares at ongoing, visitors via search engines" />
<div class="caption"><p>Browsers visiting <span class='o'>ongoing</span> via
search engines, percent.</p></div>
<img src="Search-Engines.png" alt="Search engine market shares at ongoing" />
<div class="caption"><p>Search referrals to <span
class='o'>ongoing</span> .</p></div>
<img src="Feeds.png" alt="RSS and Atom feed fetches" />
<div class="caption"><p>Fetches of the RSS 2.0 and Atom 1.0 feeds.</p></div>
<p>The notes on usage and source code will return in coming weeks when I get
the cycles to rewrite this whole article.</p>
<h2 id='p-1'>What a “Hit” Means</h2>
<p>I recently
<a href="/ongoing/When/200x/2006/02/07/Thumbnail">updated</a> the
<a href="/ongoing/misc/Colophon"><span class='o'>ongoing</span> software</a>
(but havent updated the Colophon I see, oops).
Anyhow, the <code>XMLHttpRequest</code> now issued by each page seems to be a
pretty reliable counter of the number of actual browsers with humans behind
them reading the pages. I checked against
<a href="/ongoing/When/200x/2005/12/04/Google-Analytics">Google Analytics</a>
and the numbers agreed to within a dozen or two on days with 5,000 to 10,000
page views; interestingly, Google Analytics was always 10 or 20 views
higher.</p>
<p>Anyhow, do <em>not</em> conclude that now I know how many people are
reading whatever it is I write here; because I publish lots of short pieces
that are all there in my RSS feed, and anyone reading my Atom feed gets the
full content of everything.
I and I have <em>no #&amp;*!$ idea</em> how many people look at my feeds.</p>
<p>By the way, this was the first time in weeks and weeks that Id looked at the
Analytics numbers, and they showed almost exactly zero change from the report
linked above. So Im going to turn them off; theyre a little too intrusive
and I think may be slowing page loads.</p>
<p>Anyhow, I ran some detailed statistics on the traffic for Wednesday,
February 8th, 2006.</p>
<table cellspacing="3" cellpadding="2" class="wltable">
<tr valign="top"><td>Total connections to the server</td><td align="right">180,428</td></tr>
<tr valign="top"><td>Total successful GET transactions</td><td align="right">155,507</td></tr>
<tr valign="top"><td>Total fetches of the RSS and Atom feeds</td><td align="right">88,450</td></tr>
<tr valign="top"><td>Total GET transactions that actually fetched data (i.e. status code
200 as opposed to 304)</td><td align="right">87,271</td></tr>
<tr valign="top"><td>Total GETs of actual ongoing pages (i.e. not CSS, js, or
images)</td><td align="right">18,444</td></tr>
<tr valign="top"><td>Actual human page-views</td><td align="right">6,348</td>
</tr>
</table>
<p>So, there you have it. Doing a bit of rounding, if you take the 180K
transactions and subtract the 90K feed fetches and the 6000 actual human page
views, youre left with 84,000 or so “Web overhead” transactions, mostly
stylesheets and graphics and so on.
For every human who viewed a page, it was fetched almost twice again by
various kinds of robots and non-browser automated agents.</p>
<p>Its amazing that the whole thing works at all.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/18/'>
<title>XML Automaton</title>
<link href='XML-Grammar' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/18/XML-Grammar</id>
<published>2006-04-18T13:00:00-08:00</published>
<updated>2006-04-23T08:25:56-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/XML' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='XML' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Coding' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Coding' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>In December of 1996 I released a piece of software called <a href='http://www.textuality.com/Lark/'>Lark</a>, which was the world&#x2019;s first <a href='http://www.w3.org/TR/REC-xml/#dt-xml-proc'>XML Processor</a> (as the term is defined in the <a href='http://www.w3.org/TR/REC-xml/'>XML Specification</a>). It was successful, but I stopped maintaining it in 1998 because lots of other smart people, and some big companies like Microsoft, were shipping perfectly good processors. I never <em>quite</em> open-sourced it, holding back one clever bit in the moronic idea that I could make money out of Lark somehow. The magic sauce is a finite state machine that can be used to parse XML 1.0. Recently, someone out there needed one of those, so I thought I&#x2019;d publish it, with some commentary on Lark&#x2019;s construction and an amusing anecdote about the name. I doubt there are more than twelve people on the planet who care about this kind of parsing arcana. <i>[Rick Jelliffe <a href='http://www.oreillynet.com/xml/blog/2006/04/xml_in_xml.html'>has upgraded</a> the machine].</i></div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>In December of 1996 I released a piece of software called
<a href="http://www.textuality.com/Lark/">Lark</a>, which was
the worlds first
<a href="http://www.w3.org/TR/REC-xml/#dt-xml-proc">XML Processor</a> (as the
term is defined in the
<a href="http://www.w3.org/TR/REC-xml/">XML Specification</a>).
It was successful, but I stopped maintaining it in 1998 because lots of other
smart people, and some big companies like Microsoft, were shipping perfectly
good processors. I never <em>quite</em> open-sourced it, holding back one
clever bit in the moronic idea that I could make money out of Lark somehow.
The magic sauce is a finite state machine that can be used to parse XML 1.0.
Recently, someone out there needed one of those, so I thought Id publish
it, with some commentary on Larks construction and an amusing anecdote about
the name.
I doubt there are more than twelve people on the planet who care about
this kind of parsing arcana.
<i>[Rick Jelliffe
<a href="http://www.oreillynet.com/xml/blog/2006/04/xml_in_xml.html">has
upgraded</a> the machine].</i></p>
<h2 id='p-1'>Why “Lark”?</h2>
<p><a href="http://www.laurenwood.org/anyway/">Lauren</a> and I went to
Australia in late 1996 to visit her mother and to get married, which we
did on November 30th. Forty-eight hours later, Lauren twisted her knee
badly enough that she was pretty well
confined to a sofa for the rest of our Australian vacation.</p>
<p>So I broke out my computer and finished the work Id already started on my
XML processor, and decided to call it Lark for <b>La</b>urens <b>R</b>ight
<b>K</b>nee.</p>
<h2 id='p-2'>How Lark Worked</h2>
<p>Lark was a pure
<a href="http://en.wikipedia.org/wiki/Deterministic_finite_state_machine">deterministic
finite automaton</a> (DFA)
parser, with a little teeny state stack.
Some of its transitions were labeled with named “events” that would provoke
the parser to do something if, for example, it had just recognized a start tag
or whatever.</p>
<p>DFA-driven parsers are a common enough design pattern, although I think
Lark is the only example in the XML space.
There are well-known parser generators such as
<a href="http://en.wikipedia.org/wiki/Yacc">yacc</a>,
<a href="http://en.wikipedia.org/wiki/GNU_bison">GNU bison</a>, and
<a href="https://javacc.dev.java.net/">javacc</a>,
usually used in combination with lexical scanners such as
<a href="http://en.wikipedia.org/wiki/Flex_lexical_analyser">flex</a> so that
you can write your grammar in terms of tokens not characters.
Also, they handle LALR langauges, so the parsing technique is quite a bit
richer than a pure state machine.</p>
<p>I thought I had a better idea. The grammar of XML is simple
enough, and the syntax characters few enough, that I thought I could just
write down the state machine by hand.
So thats what I did, inventing a special-purpose DFA-description
language for the purpose.</p>
<p>Then I had a file called <code>Lark.jin</code> which was really a Java
program that used the state machine to parse XML. The transition “events”
in the machine were mapped to <code>case</code> labels in a huge
<code>switch</code> construct. Then there was a horrible, <em>horrible</em>
Perl program that read the <code>Lark.jin</code> and the automaton,
generated the DFA tables in Java syntax, inserted them into the code and
produced <code>Lark.java</code>, which you actually compiled
to make the parser.</p>
<p>So while Java doesnt have a preprocessor, Lark did, which made quite a few
things easier.</p>
<p>There were a lot of tricks; some of the state transitions
werent on characters, they were on XML character classes such as
<code>NameChar</code> and so on.
This made the automaton easier to write, and in fact, to keep the class files
small, the character-class transitions persisted into the Java form, and the
real DFA was built at startup time.
These days, quick startup might be more important than <code>.class</code>
file size.</p>
<h2 id='p-3'>What Was Good</h2>
<p>It was <em>damn</em> fast. James Clark managed to hand-craft a
Java-language XML parser called
<a href="http://jclark.com/xml/xp/index.html">XP</a> that was a little faster
than Lark, but he did that by clever I/O buffering, and I was determined to
leapfrog him by improving my I/O.</p>
<p>This was before the time of standardized XML APIs, but Lark had a stream API
that influenced SAX, and a DOM-like tree API; both worked just fine.
Lark is one of very few parsers ever to have survived the
<a href="http://www.securityfocus.com/archive/1/303509/2002-12-13/2002-12-19/0">billion
laughs attack</a>.</p>
<p>Lark was put into production in quite a few deployments, and the flow of
bug reports slowed to a trickle.
Then in 1998 I noticed that IBM and Microsoft and BEA and everyone else
were building XML Processors, so I decided that it wasnt worthwhile
maintaining mine.</p>
<h2 id='p-4'>What Was Bad</h2>
<p>I never got around to teaching it namespaces, which means it wouldnt be
real useful today.</p>
<p>It had one serious bug that would have been real work to fix and since
nobody ever encountered it in practice, I kept putting it off and never did.
If you had an internal parsed entity reference in an attribute value and the
replacement text included the attribute delimiter (<code>'</code> or
<code>"</code>), it would scream and claim you had a busted XML document.</p>
<h2 id='p-5'>That Automaton</h2>
<p>What happened was,
<a href="http://www.oreillynet.com/pub/au/1712">Rick Jelliffe</a>, who is a
Good Person, was
<a href="http://www.stylusstudio.com/xmldev/200604/post30110.html">looking for
a FSM for XML</a> and I eventually noticed, and so I sent him mine.</p>
<p>Theres no reason whatsoever to keep it a secret:
<a href="/ongoing/code/lark/com/textuality/autom.txt">here it is</a>.
Be warned: its ugly.</p>
<p>Fortunately, there were only 227 states and 8732 transitions, so the state
number fit into a
byte; that and the associated event index pack into a short.
To make things even tighter, the transitions were only keyed by characters up
to 127, as in 7-bit ASCII.
Characters higher than that cant be XML syntax characters, so were only
interested whether they fall into classes like <code>NameChar</code> and
<code>NameStartChar</code> and so on. A 64K <code>byte[]</code> array takes
care of that, each byte having a class bitmask.</p>
<p>As a result of all this jiggery-pokery, the DFA ends up, believe it
or not, constituting a <code>short[227][128]</code>.</p>
<p>Heres a typical chunk of the automaton:</p>
<pre><code>1. # in Start tag GI
2. State StagGI BustedMarkup {in element type}
3. T $NameC StagGI
4. T $S InStag !EndGI
5. T > InDoc !EndGI !ReportSTag
6. T / EmptyClose !EndGI</code></pre>
<p>This state, called <code>StagGI</code>, is the state where were actually
reading the name of a tag, we got here by seeing a <code>&lt;</code> followed
by a <code>NameStart</code> character.<br/>
Line 1 is a comment.<br/>
In line 2 we name the state, and support error reporting, providing the name
of another state to fall back into in case of error, and in the curly braces,
some text to help build an error message.<br/>
Line 3 says that if we see a valid XML Name character, we just stay in this
state.<br/>
Line 4 says that if we see an XML space character, we move to state
<code>InStag</code> and process an <code>EndGI</code> event, which would stash
the characters in the start tag.<br/>And so on.</p>
<h2 id='p-6'>Other Hackery</h2>
<p>An early cut of Lark used String and StringBuffer objects to hold all the
bits and pieces of the XML. This might be a viable strategy today, but in
1996s Java it was painfully slow.
So the code goes to heroic lengths to live in the land of character arrays at
all times, making Strings only when a client program asks for one through the
API. The performance difference was mind-boggling.</p>
<h2 id='p-7'>An Evil Idea</h2>
<p>If you look at the automaton, and the Lark code, at least half—Id bet
three quarters—is there to deal with parsing the DTD and then dealing with
entity wrangling.
A whole bunch more is there to support DOM-building and walking.</p>
<p>I bet if I went through and simply removed support for anything coming out
of the <code>&lt;!DOCTYPE></code>, including all entity processing,
then discarded
the DOM stuff, then added namespace support and SAX and StAX APIs, it would be
less than half its current size.
Then if I reworked the I/O, knowing what I know now and stealing some tricks
that James Clark uses in
<a href="http://expat.sourceforge.net/">expat</a>, I bet it would
be the fastest Java XML parser on the planet for XML docs without a
DOCTYPE; by a wide margin. Its hard to beat a DFA.</p>
<p>And it would still be fully XML 1.0 compliant. Because (snicker) this is
Java, and your basic core Java now includes an XML parser, so I could simply
instrument Larkette to buffer the prologue and if it saw a DOCTYPE with an
internal subset, defer to Javas built-in parser.</p>
<p>Ill probably never do it. But the thought brings a smile to my face.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/22/'>
<title>Just A Kid</title>
<link href='Just-a-Kid' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/22/Just-a-Kid</id>
<published>2006-04-22T13:00:00-08:00</published>
<updated>2006-04-22T13:37:58-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Food and Drink' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Food and Drink' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Last weekend, Lauren felt like cooking up home-made Easter eggs, so
the shopping list included “chocolate chips (large bag)”. I was heading down
the bulk-foods aisle and realized one of the vertical acrylic bins was full of
them. Someone had been sloppy, and there was a little heap of chocolate chips
on the shelf underneath it. For a second, I flashed into pure eight-year-old
mode, thinking “Holy cow, theres a <em>whole bin</em> full of chocolate
chips, and more just lying there!” I popped a few in my mouth and they were
excellent; semi-sweet, dark, strong, and firm. I was still in the state that
Buddhists dont mean when they say “Childs Mind”, thinking “I
can get as many as I want!” The list did say “large bag” after all, so I put
a bag under the spout and gleefully jammed the lever <em>all the way
over</em>. At home, Lauren said “You went overboard, a bit, didnt you?”
and now we have a plastic canister-full in the pantry which should last us
into 2007. Its a good feeling.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/22/'>
<title>Goddess</title>
<link href='Goddess' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/22/Goddess</id>
<published>2006-04-22T13:00:00-08:00</published>
<updated>2006-04-22T12:25:59-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Family' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Family' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Microsoft' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Microsoft' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>That would be my wife
<a href="http://www.laurenwood.org/anyway/">Lauren</a>. After
<a href="/ongoing/When/200x/2006/04/16/Mad-at-Microsoft">I b0rked</a> our
Win2K gamebox, I tried re-installing the OS and eventually reduced it to
complete brick-ness, it recognized neither the video adapter nor the network
card. So Lauren brushed me aside and started wrestling with the problem, and
to make a long story short, it almost completely works again. At one point
she seemed nearly infinite in her capabilities, sitting in front of the
computer wrangling software updates while knitting baby stuff and looking up
words in a German dictionary for the kids homework. Some of the German nouns
and muttered curses at the Windows install sounded remarkably like each other.
Why would anyone not marry a geek? The only problem is that Win2K wont
auto-switch resolutions to play games any more, it gets the frequency wrong
and the LCD goes pear-shaped, you have to hand-select the frequency and
switch into the right resolution first. LazyWeb?</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/21/'>
<title>Routing Around Spotlight</title>
<link href='Routing-Around-Spotlight' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/21/Routing-Around-Spotlight</id>
<published>2006-04-21T13:00:00-08:00</published>
<updated>2006-04-21T23:16:25-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Mac OS X/Gripes' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Mac OS X' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Gripes' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Herewith two hideously ugly little shell scripts for use when Spotlight refuses to search your mail. Spotlight is a flawed v1.0 implementation of a really good idea and will, I&#x2019;m sure, be debugged in a near-future release. <i>[Update: The LazyWeb is educating me... these are moving targets.]</i></div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Herewith two hideously ugly little shell scripts for use when Spotlight
refuses to search your mail.
Spotlight is a flawed v1.0 implementation of a really good idea and will, Im
sure, be debugged in a near-future release.
<i>[Update: The LazyWeb is educating me... these are moving targets.]</i></p>
<p>My problem is that whereas Mail.app will search my To/From/Subject
lines (slowly, and with a
<a href="/ongoing/When/200x/2005/11/20/UnTiger">really irritating GUI</a>),
the “Entire Message” option just doesnt work, it returns instantly with no
results. Yes, Ive read the hints about making Spotlight re-index,
but it just flatly refuses to work for me. Mind you, I have a lot of
email, but still, it should at least try.</p>
<p>It turns out I had never really figured out the <code>-print0</code> and
<code>-0</code> idioms that a lot of the shell-command stalwarts now have.
Thanks to Malcolm Tredinnick for raising my consciousness.</p>
<p>This lives in <code>$HOME/bin</code> under the name
<code>mailgrep</code>:</p>
<pre><code>#!/bin/sh
find $HOME/Library/Mail/IMAP* -name '*.emlx' -print0 | \
xargs -0 fgrep -i $@</code></pre>
<p>Isnt <code>xargs</code> a funny command? Ive discovered that its nearly
impossible to describe what does, and then why what it does is necessary, but
there are just a whole bunch of places where youd be lost without it.</p>
<p>This lives in <code>$HOME/bin/mailview</code>:</p>
<pre><code>#!/bin/sh
find $HOME/Library/Mail/IMAP* -name '*.emlx' -print0 | \
xargs -0 fgrep -i -l -Z $@ | \
xargs -0 open</code></pre>
<p>The first cut of this dodged <code>xargs</code> and used an
incredibly-inefficient and slow chain of <code>-exec</code> arguments to open
the files one at a time with
<code>view</code> (aka <code>vim</code>), to work around
a well-known <code>vim</code> misfeature; it complained about the input
not being a terminal and left my Terminal.app keystrokes borked.</p>
<p>But Malcolm, confirming my belief in the broken-ness of <code>vim</code>,
said “Oh, *that* view. I thought it was some sexy Mac view my email app”.
Doh, of course; the magic OS X <code>open</code> command does just the right
thing.
Erm, you might want to run <code>mailgrep</code> before you run
<code>mailview</code>; Im not sure what would happen if you asked OS X to
open three or four thousand email messages at once.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/21/'>
<title>FSS: Pink Flowers</title>
<link href='Dracon-Help' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/21/Dracon-Help</id>
<published>2006-04-21T13:00:00-08:00</published>
<updated>2006-04-21T17:19:27-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Friday Slide Scan #28 is two Eighties florals, one interior, one exterior. With a confession.</div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Friday Slide Scan #28 is two Eighties florals, one interior, one
exterior. With a confession.</p>
<p>First some spring flowers fallen from a tree, just as now in our front
yard, at dusk.</p>
<img src="0506.png" alt="Fallen pink treeflowers on grass at dusk" />
<p>Im not sure what these are, but look at the light in the center. Rewards
enlarging.</p>
<img src="0713.png" alt="Flowers in shadow with light in background" />
<p>Heres the confession. Sometimes on Fridays when Im feeling kinda
burned-out, I knock off work and do these slide scans in the office, because
this is where I have the
<a href="http://www.tbray.org/ongoing/When/200x/2004/04/14/MineIsBigger">big
screen</a>.
Blowing these pictures up to mega-huge, picking away at the old-slide crud and
scanning artifacts, tinkering with the colour balance, and listening; I never
play music while Im writing or coding seriously, but I play it real loud while
photo-editing. Its all pretty well pure pleasure; you just cant imagine
how good that second one above looks at near-native size.
It reconstitutes the part of my mind that I earn my living with; thats my
story and Im sticking to it.</p>
<p>Images in the Friday Slide Scans are from 35mm slides taken between 1953
and 2003 by (in rough chronological order)
<a href="http://www.textuality.com/BillBray/">Bill Bray</a>,
<a href="/ongoing/When/200x/2004/08/11/MomsGarden">Jean Bray</a>, Tim Bray, Cath
Bray, and
<a href="http://www.laurenwood.org/anyway/">Lauren Wood</a>; when I know
exactly who took one, Ill say; in this case, at least one is by Cath Bray.
Most but not all of the slides were on Kodachrome; they were digitized using
a Nikon CoolScan 4000 ED scanner and cleaned up by a combination of the Nikon
scanning software and PhotoShop Elements.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/20/'>
<title>Spring Pix</title>
<link href='Spring-Pix' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/20/Spring-Pix</id>
<published>2006-04-20T13:00:00-08:00</published>
<updated>2006-04-20T23:07:10-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/Vancouver' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Vancouver' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Three pictures around Vancouver; one of a fresh green springtime tree, two of rotten old buildings being torn down.</div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Three pictures around Vancouver; one of a fresh green springtime tree, two
of rotten old buildings being torn down.</p>
<p>Theres nothing quite as fresh as just-sprouted deciduous leaves;
another few weeks and this tree will be just a tree.</p>
<img src="IMG_4656.png" alt="Sunlit fresh young leaves" />
<p>I have a thing about demolition.
The first is a rotten dingy old one-story on Main Street near 23rd, the second
is an unlovely grey mid-rise being torn down to build still more condos at
Homer and Helmcken.</p>
<img src="IMG_4665.png" alt="Demolition site on Main Street, Vancouver" />
<img src="IMG_4671.png" alt="Demolition site at Homer and Helmcken, Vancouver" />
</div></content></entry>
<entry xml:base='When/200x/2006/04/20/'>
<title>Totten&#x2019;s Trip</title>
<link href='Totten-on-Iraq' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/20/Totten-on-Iraq</id>
<published>2006-04-20T13:00:00-08:00</published>
<updated>2006-04-20T21:05:22-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/Middle East' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Middle East' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p><a href="http://www.michaeltotten.com/">Michael J. Totten</a> is a
journalist and blogger whos back and forth to the
Middle East and writes about it, quite well in my opinion; he supports this by
freelancing and with his blogs tip jar. He gets lots of
link love from the right-wing blogosphere, which is puzzling because Totten is
balanced and clear-eyed and doesnt seem to have any particular axe to grind.
Recently, he and a friend were
<a href="http://www.michaeltotten.com/archives/001117.html">having fun in
Istanbul</a> and, on a random drive out into the country, decided on impulse to
keep going, all the way across Turkey and into Iraq; into the Kurdish
mini-state in Iraqs north, to
be precise. It makes a heck of a story, with lots of pictures, in six parts:
<a href="http://www.michaeltotten.com/archives/001119.html">I</a>,
<a href="http://www.michaeltotten.com/archives/001120.html">II</a>,
<a href="http://www.michaeltotten.com/archives/001121.html">III</a>,
<a href="http://www.michaeltotten.com/archives/001124.html">IV</a>,
<a href="http://www.michaeltotten.com/archives/001126.html">V</a>, and
<a href="http://www.michaeltotten.com/archives/001127.html">VI</a>.
</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/19/'>
<title>The Cost of AJAX</title>
<link href='The-Cost-of-AJAX' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/19/The-Cost-of-AJAX</id>
<published>2006-04-19T13:00:00-08:00</published>
<updated>2006-04-20T00:37:46-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>James Governor
<a href="http://www.redmonk.com/jgovernor/archives/001526.html">relays a
question</a> that sounds important
but I think is actively dangerous: do AJAX apps present more of
a server-side load? The question is dangerous because its meaningless and
unanswerable. Your typical Web page will, in the process of
loading, call back to the server for a bunch of stylesheets and graphics and
scripts and so on: for example, this <span class='o'>ongoing</span> page calls
out to three different graphics, one stylesheet, and one JavaScript file.
It also has one “AJAXy” XMLHttpRequest call.
From the servers point of view, those are all just requests to dereference
one URI or another. In the case
of <span class='o'>ongoing</span>, the AJAX request is for a static file less
than 200 bytes in size (i.e. cheap).
On the other hand, it could have been for something that required a
complex outer join on two ten-million-row tables (i.e. <em>very</em>
expensive). And one of the virtues of
the Web Architecture is that it hides those differences, the “U” in URI stands
for “Uniform”, its a Uniform interface to a resource on the Web that could
be, well, anything.
So saying “AJAX is expensive” (or that its cheap) is like saying “A mountain
bike is slower than a battle tank” (or that its faster).
The truth depends on what youre doing with it.
In the case of web sites, it depends on how many fetches you do and
where you have to go to get the data to satisfy them.
<span class='o'>ongoing</span> is a pretty quick web site, even though it runs
on a fairly modest server, but
that has nothing to do with AJAX-or-not; its because of the particular way
Ive set up the Web resources that make the pages here.
Ive
<a href="/ongoing/When/200x/2006/02/14/AJAX-Performance">argued elsewhere</a>
that AJAX can be a performance win, system-wide; but that argument too is
contingent on context, lots of context.</p>
</div></content></entry>
<entry xml:base='When/200x/2006/04/18/'>
<title>Hao Wu and Graham McMynn</title>
<link href='Hao-Wu' />
<id>http://www.tbray.org/ongoing/When/200x/2006/04/18/Hao-Wu</id>
<published>2006-04-18T13:00:00-08:00</published>
<updated>2006-04-18T22:00:40-08:00</updated>
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/China' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
<category scheme='http://www.tbray.org/ongoing/What/' term='China' />
<category scheme='http://www.tbray.org/ongoing/What/' term='The World/Politics' />
<category scheme='http://www.tbray.org/ongoing/What/' term='Politics' />
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
<p>Graham McMynn is a teenager who was kidnapped in Vancouver on April 4th and
freed, in a large, noisy, and
<a href="http://www.cbc.ca/story/news/national/2006/04/12/bcabduction060412.html">newsworthy</a>
police operation, on April 12th.
<a href="http://en.wikipedia.org/wiki/Hao_Wu">Hao Wu</a> is a Chinese
film-maker and
<a href="http://beijingorbust.blogspot.com/">blogger</a> who was kidnapped in
Beijing on February 22nd in a
small, quiet police operation not intended to be newsworthy, and who has not
been freed.
Read about it
<a href="http://spaces.msn.com/wuhaofamily/">here</a>,
<a href="http://ethanzuckerman.com/haowu/">here</a>, and
<a href="http://rconversation.blogs.com/rconversation/freehaowu/index.html">here</a>.
Making noise about it <em>might</em> influence the government of China to
moderate its actions against Mr. Wu, and cant do any harm.
Mr. McMynns kidnappers were a gaggle of small-time hoodlums, one of whom was
out on bail while awaiting trial for another kidnapping (!).
Mr. Wus were police.
In a civilized country, the function of the police force is to deter such
people and arrest them. A nation where they are the same people? Nobody
could call it “civilized”.</p>
</div></content></entry>
</feed>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom title works
Expect: feed.fields.getProperty('atom:title') == '<b>test</b> title'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
</title>
</feed>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom summary with entities works
Expect: feed.subtitle(false) == '&quot;test&quot; &amp; &apos;title&apos; &amp; &lt;ok&gt;'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<subtitle type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
"test&quot; &amp; &apos;title' &amp; &lt;ok>
</div>
</subtitle>
</feed>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom author name works
Expect: feed.fields.getProperty('atom:updated') == '2003-12-13T18:30:02Z'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 Version works
Expect: result.version == 'atom'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
</feed>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ bogus title element
Expect: feed.fields.getProperty('rss1:title') == 'Correct Title'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<title>Bogus</title>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Correct Title</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<title>Bogus</title>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</dc:description>
</item>
<item>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed description works
Expect: feed.fields.getProperty('rss1:description') == 'a description'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<description>a description</description>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed description works normalized
Expect: feed.subtitle(true) == 'a description'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<description>a description</description>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed description works normalized
Expect: feed.subtitle(true) == 'a description'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
<description>a description</description>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed description works normalized
Expect: feed.subtitle(true) == 'another description'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ image
Expect: ((feed.image.getProperty('rss1:link') == 'http://www.xml.com') && (feed.image.getProperty('rss1:url') == 'http://xml.com/universal/images/xml_tiny.gif'))
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
<textInput rdf:resource="http://www.google.com"/>
</channel>
<image rdf:about="http://xml.com/universal/images/xml_tiny.gif">
<title>XML.com</title>
<link>http://www.xml.com</link>
<url>http://xml.com/universal/images/xml_tiny.gif</url>
</image>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>
</item>
</rdf:RDF>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ zero items count
Expect: feed.items.length == 0
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed title works normalized
Expect: feed.fields.getProperty('rss1:link') == 'http://xml.com/pub'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed link works normalized
Expect: feed.link.spec == 'http://xml.com/pub'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ textinput
Expect: feed.textInput.getProperty('rdf:about') == 'http://search.xml.com'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<textinput rdf:about="http://search.xml.com">
<title>Search XML.com</title>
<description>Search XML.com's XML collection</description>
<name>s</name>
<link>http://search.xml.com</link>
</textinput>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed title works
Expect: feed.fields.getProperty('rss1:title') == 'Test'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed title works
Expect: feed.fields.getProperty('rss1:title') == 'Test'
-->
<rdf:RDF
xmlns:foo="http://example.org"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title foo:bar="baz">Test</title>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed title works normalized
Expect: feed.title == 'Test'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 Version works
Expect: result.version == 'rss1'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
</channel>
</rdf:RDF>

View File

@ -0,0 +1,41 @@
<!--
Description: atom generator works
Expect: result.bozo == true && feed.items.length == 1
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.org/">
<title>fooo</title>
<link>http://weblogs.example.org/</link>
<description>fooooooo</description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2006-04-10T08:38:18-08:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://weblogs.example.org/archives/009698.html" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://weblogs.example.org/archives/009698.html">
<title>Come From?</title>
<link>http://example.org/009698.html</link>
<description><![CDATA[
%G–%@ much of the code
]]></description>
<dc:date>2006-02-06T10:19:03-08:00</dc:date>
</item>
</rdf:RDF>

View File

@ -0,0 +1,354 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: Full RSS1 feed not bozo
Expect: result.bozo == false
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://weblogs.mozillazine.org/ben/">
<title>Inside Firefox</title>
<link>http://weblogs.mozillazine.org/ben/</link>
<description>The Inside Track on Firefox Development</description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2006-04-26T14:34:49-08:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
<items>
<rdf:Seq><rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010115.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010109.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010075.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010074.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010073.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010040.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010030.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010011.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009965.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009964.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009943.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009924.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009914.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009804.html" />
<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009774.html" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010115.html">
<title>Firefox 2 Is Cool</title>
<link>http://weblogs.mozillazine.org/ben/archives/010115.html</link>
<description><![CDATA[<p>A lot of people read my previous post and came to a very reasonable conclusion: "If you take Places out of Firefox 2, shouldn't it be called Firefox 1.6?"</p>
<p>I don't agree that Places was the one and only thing that sold Firefox 2 though. I took a look through the <a href="http://wiki.mozilla.org/Firefox2/Requirements">Firefox 2 Requirements</a> page to look at some of the other stuff that's going on. Reading that document, I think I can see now why people are down in the dumps about no-places Firefox 2. I don't think that document necessarily does the best possible job of capturing the excitement I have about some of the Firefox 2 features we're pursuing. </p>
<p>For the past week or so, I've been toting around a printout of another document, which I wrote because I wanted to convey some of the vision I have of the Firefox 2 product as a whole - a more holistic view as it were. </p>
<h3>Safer, Faster, Better</h3>
<p>If you take a look at the black buttons stacked in the right column of this page, you'll see that one of them reads "Safer, Faster, Better." I don't knowwho came up with that one but it's a good tag line. It has a certain cadence about it. People have attached lots of these to Firefox in the past - "Take Back the Web" was the one I came up with, there's "Rediscover the Web", the FirefoxFlicks project has yielded a few good ones too - I like "<a href="http://www.firefoxflicks.com/flick/index.php?sort=new&id=21122&c=false">Web For All</a>". But "Safer, Faster, Better" is not just a tag line, it can also map into a set of themes for product development. </p>
<p>So, taking a look at the Requirements page, I attempted to do that. My document wasn't a comprehensive collection of everything on that page, I was focused more on the things immediately visible to most users. I guess my problem with the Requirements page has always been its very engineering/technical focus. The result of this is that the priority of items tend to reflect how difficult something is to implement, or where it lies in the development cycle, not necessarily the impact on the user. What I ended up with I guess is a sort of "Shadow PRD" that reflects what I personally thought was cool about Firefox 2, and what I wanted to get out of it. </p>
<p>A copy of the document is <a href="http://www.bengoodger.com/software/mb/2.0/firefox2-vision.html">here</a>. <br />
Some notes:</p>
<ul>
<li>Assume the scratched out section for "Retracing Your Steps" will be part
of a future release.
<li>The priorities shown are my opinion, and relate to potential impact on
the user.
<li>The document does not represent all of the work being done, just a
readily marketable subset.
</ul>
<p>All in all, I think there's easily enough here to justify a "2" designation. That's just my opinion though. I also think whole numbers are probably easier for the general populace to understand than decimals. </p>
<p>Firefox has never been about date driven development (within reason). The changes with Places should not be seen as a change in this sentiment. What we're about is high quality software development with real advantages to <br />
users, and I think that with the updated plan we're still on a trajectory that supports and encourages that, perhaps more firmly now than before.</p>
<p>And that's it from today's "Ben waits for the tinderboxen to clear" report. </p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-26T14:34:49-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010109.html">
<title>Firefox 2 Content Update</title>
<link>http://weblogs.mozillazine.org/ben/archives/010109.html</link>
<description><![CDATA[<p>When we began work on Firefox 2, we decided to focus on a development branch, a continuation of the Mozilla 1.8 branch. The reason for doing this was that there was to be a lot of significant architectural changes going on on the trunk, with the prospect of a new rendering back end, a rearchitecture of reflow in layout, and various other things. Shipping a Firefox 2 release in 2006 off of this code did not seem possible. </p>
<p>As a result, we decided to pursue a release focused on application level improvements, on a separate branch. Going into it, we knew the perils of multi-branch development. We knew the divergences that would inevitably form between branch and trunk. We had experience from the painful development of Firefox 1.0 on the Aviary branch. We resolved to be more methodical about our commits, but we knew to expect some pain. The goal was to produce a high value release in short enough time so that we could all return to the trunk and help build new features that utilize the back end being developed there, to help shake them out. </p>
<p>Late last year, we put together a list of things to pursue for the Firefox 2 release. A month or so ago, we got together as a group and formalized this more in a <a href="http://wiki.mozilla.org/Firefox2/Requirements">Firefox 2 PRD</a>. We had scheduled four major pre-release milestones, two alphas and two betas. We have already shipped one alpha. The intent of the second is to be "Feature Complete".</p>
<p>The people driving the various sub-projects on the Requirements list get together weekly to check status. As the weeks have gone by, it has become clear to us that the most complex feature on the plan is Places. It is easily an order of magnitude more complex than anything else on the plan. Places is a great feature and it has been exciting watching its capabilities grow. We are looking forward to the capabilities that it will expose. What we have learned though is that the work required to complete Places is probably too substantial to gate the Firefox 2 release. It falls more into the "significant rearchitecture" category of feature that's generally been targeted at Firefox 3.</p>
<p>What we have decided to do is as follows:</p>
<ul>
<li>We will disable places on the 1.8 branch, reverting the user interface and back end to Firefox 1.x functionality.
<li>We will continue to aggressively develop the capabilities of Places on the 1.9 trunk. Places will remain enabled here.
</ul>
<p>We think this is a good decision for two reasons:</p>
<ul>
<li>It reduces the pressure on the Places team to deliver a lot of bug fixes and additional features on the very immediate timeframe required by the Firefox 2 testing releases. It is my opinion that doing so would impact the quality of the feature, if we did not add at least a couple more alpha cycles to the process. This decision provides us with an opportunity to really make the architecture and user interface of Places reach their full potential.
<li>It allows us as a group to circle around and consider the content of the Firefox 2 release holistically, identify high impact at risk areas and spend some more time on them. One of those for me was Feed Handling.
</ul>
<p>Michael Schroepfer of the Mozilla Corporation has a <a href="http://groups.google.com/group/mozilla.dev.planning/browse_frm/thread/4b8e7bafecccbc10/8997efd5d5d5f03f">newsgroup posting</a> with additional information. His thread is also the most appropriate forum for discussion of this topic. </p>
<p>I have been working on refining some of the messaging surrounding feature content and prioritization on the PRD. I will post the initial results of that here soon.</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-24T09:30:54-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010075.html">
<title>Did I Mention...</title>
<link>http://weblogs.mozillazine.org/ben/archives/010075.html</link>
<description><![CDATA[<p>... that I hate this computer?</p>
<p>While I'm at it... the up arrow key cap fell off after about three weeks, in early 2004. About six months later I lost the little rubber membrane thing that made it slightly easier to push the arrow. Since then, I've been typing by pushing down on the little connection thingy on the keyboard tray. </p>
<p>It's been shedding pieces of plastic too. I've never dropped the computer once, but pieces of the shell have begun to snap off. </p>
<p>When I first got it, when the secondary battery was in place, when the primary drained the machine would hibernate, even though the secondary was present! Pretty awful bug to ship with. There was never a solution that I could find. Speaking of batteries, the primary battery is pretty much toast... it won't go for more than 5 minutes before shutting down. It began doing this at around the 12-18 month mark. And the battery light permanently flashes orange whenever the system is on. </p>
<p>Why don't I call the hotline? I guess I'll have to, before my warranty runs out. I don't because it usually involves 45 minutes on hold or explaining to someone who only has a script to read from that the issue involving a missing up arrow doesn't require restarting Windows or running some stupid diagnostic tool. I could have paid more for "premium support" at build-time but I found that concept sort of insulting: why should I have to pay extra to speak to someone who is smart and doesn't think I'm a moron?</p>
<p>And I don't want a Thinkpad either. I hate those computers. They have old-fashioned 4:3 displays, and the function key and left Ctrl key are reversed. I know I could map them differently but why would I? Why couldn't IBM just have designed the product correctly in the first place? Oh, and I'd sooner drink paint than run the awful IBM access connections software to connect to a wireless network, or deal with the fact that the Num Lock key seems to reset to ON every time the system is rebooted.</p>
<p>Why doesn't someone make the perfect laptop? I'd be interested to hear from someone how long the compile times are for FirefoxDebug on a 2.16GHz MacBook Pro...</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-16T19:11:28-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010074.html">
<title>I Hate This Computer</title>
<link>http://weblogs.mozillazine.org/ben/archives/010074.html</link>
<description><![CDATA[<p>I have been fighting with this computer for the past few days to do a build with a few patches applied. </p>
<p>First, I managed to get a certain distance with a branch build, compiling with Visual C++ 6.0. But soon I realized there were too many dependencies that were trunk specific, so I had to build trunk. About a quarter of the way through my build died, of course, compiling from the same shell, wrong version of VC6.0 for Cairo/Thebes. </p>
<p>Starting over again with the VC7 tools, another failure towards the end. Some sort of cyclic dependency check error. Clobber and restart. Now I forgot one of my patches had a configure change, and the process begins anew, I have effectively clobbered. </p>
<p><a href="http://weblogs.mozillazine.org/ben/archives/2003_12.html">When I bought this machine</a>, a Dell Precision M60 with a Pentium M 1.7GHz processor, a 7200rpm disk and a gig of RAM, it could compile Firefox start to stop in 21 minutes. Now it takes over an hour.</p>
<p>The situation is better on my Google-supplied workstation, but for how long? Over time, Windows reaches a point of being completely useless for anything aside from the most basic activities. What's the effect? I had planned to work both days this weekend on Firefox 2 features. Instead I spent the whole time fighting one of the most frustrating fights possible, and have achieved nothing. I hate Windows. I hate this computer.</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-16T18:58:02-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010073.html">
<title>Miscommunications</title>
<link>http://weblogs.mozillazine.org/ben/archives/010073.html</link>
<description><![CDATA[<p>My laptop was running pretty slowly yesterday so I decided to scan the Add/Remove Programs list to clear out the cruft. Things were really chugging along. I sequentially uninstalled several pieces of software, and the process was very dissatisfying. I became more and more enfuriated at my computer as it proceeded. Here are some of the nuisances:</p>
<ul>
<li>I could only remove one thing at a time.
<li>Many pieces of software used the Windows Installer system which seemed to take forever and report very inconsistent progress (I know, Firefox isn't the best at this in its installer, either)
<li>Most annoyingly, the uninstaller apps all reported themselves as performing a variety of actions that I never requested, as explanations for what they were doing during long periods of inactivity and progress-bar freeze. Common excuses were "Windows is Configuring <blah>" and "InstallShield is preparing a report on <bleh>".
</ul>
<p>You know, I never <strong>asked</strong> for blah to be "configured." I never asked for a report on bleh (What am I, a manager? Where is the report anyway? Does it have the appropriate cover sheet?) <strong>I just want the software gone</strong>. I'm getting really tired of excuses from software like this. Windows software seems to be getting worse and worse. On Mac, the typical way to remove a program is to drag it into the trash can. I can even do that to several programs at once! I do however have to be able to afford a Mac (I can, I have one). Many folk aren't as fortunate as I. </p>
<p>As a side note, I read an interesting article in Forbes a few weeks ago criticizing Microsoft for its delays shipping Vista, and asking why wouldn't you just side-step all the trouble and buy a Mac, since the odds were good many people would have to upgrade their PC anyway just to get the whiz-bang in Vista. The article side-swiped open source desktop initiatives, asking where the viable free alternative was. I think that was an interesting point, and especially so since the capabilities of Linux systems have come an awesome distance in the past few years but there have been few distributions or desktop environments that IMO make the most of all of those.</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-16T18:05:04-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010040.html">
<title>Firefox Version Numbers</title>
<link>http://weblogs.mozillazine.org/ben/archives/010040.html</link>
<description><![CDATA[<p>Mike Beltzner <a href="http://www.beltzner.ca/mike/archives/2006/04/10/when_3_is_less_than_2.html">explains</a> Firefox version numbering. i.e. Firefox 3 RTM is not "out".</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-10T08:38:18-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010030.html">
<title>Our Next Challenge?</title>
<link>http://weblogs.mozillazine.org/ben/archives/010030.html</link>
<description><![CDATA[<p>The past year or so has been interesting. In this time, I've been able to meet a lot of new people and learn a lot of new things. Most importantly is that for the first time in as long as I can remember, I have had a chance to see the Mozilla project from the outside, as it would appear to someone who was trying to build on Mozilla technology or contribute directly to a project, but was not part of Netscape "back in the day" or an employee of the Mozilla Foundation/Corporation itself. </p>
<p>It's been an illuminating experience. From a technical perspective, it helped highlight APIs that I had developed without a clear understanding of how they would be used. The Extension Installation API was one example of this, and we were able to make some great improvements to it in 2005.</p>
<p>But perhaps more importantly it has shed some light on how people perceive Mozilla as an open source project. These perceptions are not the sort of things people express explicitly. You have to notice them.</p>
<h3>The Difficulty of Involvement</h3>
<p>This is sort of the uber-perception. I think some of the reasons for this include the following:</p>
<h3>Where is the Discussion?</h3>
<p>Which newsgroup/mailing list/IRC channel/wiki/talk page/bug/forum page do I need to track in order to know what's going on in a specific area? The answer is unsatisfactorily complex.</p>
<p>The traditional method of joining a project in the OSS world (where you join lists and IRC channels and lurk for a while, gradually ramping up your contributions) scales uneasily to a project the size of Mozilla. The amount of data a mere mortal would have to absorb in order to be productive quickly is staggering. I have in the past jocularly referred to it as the "learning wall". I wonder how many people just give up. </p>
<h3>Madness to Method?</h3>
<p>As a large project, Mozilla has thousands of source files across hundreds of directories. One of my coworkers here at Google commented that he tried to find something as simple as the browser window code a couple of years ago and couldn't, because it lived under the thoughtfully named "xpfe". </p>
<p>There's not a huge amount of documentation - and I'm not just talking about public API docs. I'm talking about the much needed diagrams that show how the various building blocks fit together, and in-code documentation for pretty much anything that isn't intuitive (which is a lot). I've written as little of this as anyone else.</p>
<h3>Tone</h3>
<p>In the past, I have not done the best I could to establish a tone for discourse that is conducive to productive development. My tendency was to snap when provoked. I made two mistakes of judgement here, one was ignoring the effect that this sort of thing would have on those watching, aside from the victim. The other was to think that regardless of the tone set by my actions, we as a group could work through any negative effects. Any work we relied on others for we could do ourselves. Or we could hire through it.</p>
<h3>The Joy of Code</h3>
<p>The flaw with this is that when your project's contributions come solely from companies, for better or for worse the activities of those paid contributors will align in some way with the interests of those companies. What this does not always allow for is the pursuit of the sort of improvements that are outside the scope of these interests. Such things often include raising general code quality, speculative feature development, feature polish and detail etc. I don't mean to say that companies are <em>against</em> these things, but they're often not the primary concern during a release crunch. And what companies like to have is shipping software. </p>
<p>Alternately, even in the absence of corporate support, if there is not enough redundancy that the same set of folk has to do the grunt work over and over, the risk of burnout is high.</p>
<p>I feel this because I have been incredibly "plan" focused over the past few years, formally during my time at Netscape and less formally but no less importantly during the run up to Firefox 1.0 and 1.5. What I notice is that I no longer have time to work on the sort of interesting side projects that I used to enjoy doing when I was first starting out. </p>
<p>For example, about six years ago I discovered a bug in the Bookmarks menu shortly after scrolling was implemented. When you moused into a submenu for a folder that was in the scrolled section, the sub menu popup was pushed off the bottom of the screen. I took a couple of days to learn the menu positioning code and fix the math error that was causing the bug. The exercise was good for me in a number of ways: I learned more about another section of the code, my general expertise was raised, and well.. I fixed the bug that was bothering<br />
me.</p>
<p>I think we need to have a project that is accessible to volunteers for this reason. We also need to provide a way to allow those volunteers to grow if they want to, so that if you're one of the folk at the center you can have a chance to step aside for a moment and take a breather and code for the pure joy of it. </p>
<p>Full time paid contributors will always be a part of Open Source development. But I don't think release-focused agendas will ever be a substitute for the passion of folk who participate because of the joy of exploration and of contribution. </p>
<h3>Looking Outward, Looking Forward</h3>
<p>As a project, we have made overtures towards being a more inclusive lot. For some of the reasons I've listed here, I think as a project we're still more inward looking than outward. How many of us have thought about what we want to be doing in 5 years? Will we always be doing this? Will our roles remain the same? My opinion is that it's fast becoming time for us to start considering making personal sacrifices in our short term conveniences to make the project more accessible to new people. Do I know what we need to do? Not exactly. But I have some ideas: find ways to make our discussions, our public faces, and our code more accessible.</p>
<p>With Firefox we did an excellent job of building a world class product that people wanted to use. We have a new challenge now, one that is larger and scope and in the long run in my opinion considerably more important because the long term success of products like Firefox depend on it. How will we grow a world class development community? How will we ensure that the freedoms we enjoy are protected, forever?</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-07T09:22:59-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010011.html">
<title>Congrats Relicensing Project!</title>
<link>http://weblogs.mozillazine.org/ben/archives/010011.html</link>
<description><![CDATA[<p><a href="http://weblogs.mozillazine.org/gerv/archives/2006/03/relicensing_complete.html">Gerv announces</a> that the Relicensing project is complete. Congrats Gerv and everyone else who doggedly pursued this over the years. Part of Mozilla's mission is preserving choice, and making our code available under a variety of flexible licenses helps ensure that by allowing other projects to make use of it. This was a formidable task and a great accomplishment. </p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-04-04T07:15:22-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009965.html">
<title>Producing Open Source Software</title>
<link>http://weblogs.mozillazine.org/ben/archives/009965.html</link>
<description><![CDATA[<p>I've been reading Karl Fogel's excellent <a href="http://www.producingoss.com/">Producing Open Source Software</a>. </p>
<p>Karl's book is very well written, nice and compact (272 pages), and contains useful information for anyone doing anything in the Open Source world: both developers and managers. </p>
<p>It will help people new to Open Source get a better understanding of how OSS projects are run. It will help people familiar with Open Source to get a better understanding of how to contribute more effectively.</p>
<p>It's definitely a "must read."</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-03-26T15:03:52-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009964.html">
<title>Writing for Busy People</title>
<link>http://weblogs.mozillazine.org/ben/archives/009964.html</link>
<description><![CDATA[<p>Back when I was in <a href="http://www2.ece.auckland.ac.nz/">University</a>, many of the lecturers stressed time and time again the importance of succinct, well organized writing. They said over and over that this was the best way to have your thoughts read and understood by decision makers. In fact, they scared us by saying that 70% of us would become managers sooner or later!</p>
<p>Well, I can tell you that's sage advice. It's great when people make contributions in the form of ideas and proposals, but it's even better when they're written for busy people. Here are some examples:</p>
<ul>
<li>Making important points up front
<li>Clear taxonomy of headings, and lots of them
<li>Writing clearly and succinctly
<li>No long, unbroken paragraphs or tracts of text.
<li>Preferring bulleted lists with clear points to paragraphs.
<li>Use of emphasis in formatting to make important things clear
</ul>
<p>These days, I find I don't have a lot of time to read everything carefully, so the better structured a document is, the more I get out of it. I frequently find I miss entire subsections or points of documents, even when there's relatively little text, because of incomplete organization. My eyes definitely glaze over when i see a large block of unbroken text with few headings. At the very least, it'd be very helpful if folk would structure their thoughts into: "Problem" and "Proposed Solution". </p>
<p>Before you post, stop and think if you've written something in a way that'll allow others to get the most out of it. Communicating your ideas effectively means you may get a clearer and quicker response from other people. </p>]]></description>
<dc:subject>Editorial</dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-03-26T14:48:04-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009943.html">
<title>Step 2: Ask Questions</title>
<link>http://weblogs.mozillazine.org/ben/archives/009943.html</link>
<description><![CDATA[<p>A healthy project is one where active contributors are always evaluating the project's progress, making sure it is headed in the right direction (usually stated in the project mission or goals). </p>
<p>I think we could be better at this in Mozilla. I'm not suggesting people be assholes or anything, but I think some more pan-project analysis would be useful. </p>
<p>Historically, I can point at a couple of groups of people who have attempted to do something like this. The <code>drivers@</code> group is one that looked beyond individual modules within Gecko to make sure that the right thing for the shipping products as a whole happened. The Firefox team is another example. By taking a holistic view, user experience was enhanced. </p>
<p>I think contributors should not be afraid to poke their nose in other parts of the project and see how things are going. Ask questions. Learn more. Get involved in governance and management. If things don't seem intuitive, or a little arbitrary, ask, rather than assume it's for a good reason. One of the benefits of having an open, referencable set of discussion forums means that once you've answered a question once on the public forums, when someone else asks you can just give them a URL. </p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-03-22T17:27:14-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009924.html">
<title>Step 1: Public Discussions</title>
<link>http://weblogs.mozillazine.org/ben/archives/009924.html</link>
<description><![CDATA[<p>The first step on the pathway to open source project happiness is to have our discussions in the public. </p>
<p>One of the things people have (rightly) criticized about Firefox and Mozilla development in the past is that too much happens mysteriously, behind closed doors. This was for a number of reasons that sounded sufficient at the time - it was expedient, people were sitting within shouting distance, mental laziness, etc. </p>
<p>What poor communication breeds is a lack of understanding of procedures, priorities and such like. A healthy project is one where the contributors understanding where things are headed, and what parts they can play. It is one where newcomers can visit the project website and within the space of a few minutes get a decent understanding of how things work, and find out opportunities for them to participate. </p>
<p>People don't want to contribute to projects where things happen "magically". I've learned this lesson in the past. </p>
<p>To this end, I've been encouraging everyone to have public discussions on the <a href="https://lists.mozilla.org/listinfo">Mozilla Newsgroups/Mailing Lists</a>. For Firefox, the list is dev-apps-firefox@, and the newsgroup is mozilla.dev.apps.firefox. They are mirrored through <a href="http://groups.google.com/group/mozilla.dev.apps.firefox">Google Groups</a> for ease of browsing. We're planning on improving the theme for Firefox2, and rather than pursue this effort in a walled garden like last time, we're going to proceed in dev-themes@/mozilla.dev.themes. Come on over and join in!</p>
<p>At the same time, we've been encouraging other projects to use the newsgroups/lists too. Decisions made in private email, IRC (which isn't archived anywhere) even in public bugs etc make it very difficult for people who aren't central to the project to find out more or participate. I think we should strive to strike a better balance between convenience and accessibility/referencability. </p>
<p>On top of this, there is a need to make the contact portions of the web site more accurate, relevant and easy to find, so people can easily find the list they want, and the person or group to contact. </p>
<p>We've been having discussions about all of this in <a href="http://groups.google.com/group/mozilla.dev.general">mozilla.dev.general</a>, in <a href="http://groups.google.com/group/mozilla.dev.general/browse_thread/thread/899917f713861f06/4ae6d094ffee5ae7">these</a> <a href="http://groups.google.com/group/mozilla.dev.general/browse_thread/thread/5d1bf2bbc769919d/210246003f1f6fea">threads</a>. Rather than talk in a vacuum of only ourselves, I really hope that those of you that have experienced difficulty in the past in some of these areas will come forward and contribute to the discussion. </p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-03-20T09:23:24-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009914.html">
<title>Reflection</title>
<link>http://weblogs.mozillazine.org/ben/archives/009914.html</link>
<description><![CDATA[<p>I've been doing a bit of it lately. All manner of topics. We recently moved and things have been chaotic so it's been nice to take the time to think. I've had a chance to look at how far we've come, and form some ideas about what we might need to do to go the right places. </p>
<p>The past couple of years have brought some immense highs, and some considerable angst. With success has come the realization that true now as ever: the spirit of open source is expressed through the creative freedom of the many. The surest way to navigate the murky waters of increased attention and marketshare and such like is, as Leslie has been saying for some time, to keep your karma clean. Do the right thing, not only in technical matters but also relationships. </p>
<p>For the Mozilla project, what we need to do (I think) is:</p>
<ul>
<li>Better define the things that are important to us. The things that define who we are. Impart the positive aspects of open development culture and practice on everyone involved because they're effective, and as a safeguard against recurrence of some of the <a href="http://weblogs.mozillazine.org/ben/archives/009698.html">troubles of the past</a>.
<li>Engage the community more effectively. Create and maintain an infrastructure of open communication to remove the "mystery" behind the decision making process. Organize our contributor materials better to make the project more accessible to newcomers. These are just a couple of examples.
</ul>
<p>For my part, I'm starting out this year by doing things <a href="http://www.producingoss.com/">a little differently</a>. I think we need to grow more as a project. I'm hopeful that I'll be able to achieve some positive change. </p>
<p>I understand that this post might seem a little abstract. I think what I'm saying might become a bit more clear after I talk about some tangible efforts, which I will do in future entries.</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-03-19T02:00:07-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009804.html">
<title>Bye Bye Blackberry?</title>
<link>http://weblogs.mozillazine.org/ben/archives/009804.html</link>
<description><![CDATA[<p><a href="http://news.com.com/Bye-bye%2C+BlackBerry+-+page+2/2100-1047_3-6042308-2.html?tag=st.num">Bye Bye, Blackberry?</a></p>
<p>I cannot believe people are discussing life without these things. It's like this: I have a patent on television. I don't plan on doing anything with it, but I'm going to shut TV down for all of you, and you're going to sit about and think about life without TV? What's wrong with people?! Is this the world we all want to live in, where people without the interest or capability to pursue technology can hold everyone else captive? That's not the world I want to live in. <br />
</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-02-24T10:57:32-08:00</dc:date>
</item>
<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009774.html">
<title>More on Memory</title>
<link>http://weblogs.mozillazine.org/ben/archives/009774.html</link>
<description><![CDATA[<p>Firefox's caching behavior is just one area of memory usage. I'm really glad that there's been such a lot of discussion in the previous post I made, since many people have raised specific issues, bugs have been filed, and people are looking at the things people are reporting. This sort of feedback system is one of the things that makes the open development model great. Firefox 2 will be much better because of your help!</p>]]></description>
<dc:subject></dc:subject>
<dc:creator>ben</dc:creator>
<dc:date>2006-02-17T23:44:03-08:00</dc:date>
</item>
</rdf:RDF>

View File

@ -0,0 +1,55 @@
<!--
Description: rss1 unknown elements does not cause error
Expect: feed.items.length == 1
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.org/">
<title>fooo</title>
<link>http://weblogs.example.org/</link>
<description>fooooooo</description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2006-04-10T08:38:18-08:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
<foo:bar xmlns:foo="http://example.org">baz</foo:bar>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://weblogs.example.org/archives/009698.html" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://weblogs.example.org/archives/009698.html">
<title>Come From?</title>
<link>http://example.org/009698.html</link>
<description><![CDATA[much of the code]]></description>
<dc:date>2006-02-06T10:19:03-08:00</dc:date>
</item>
</rdf:RDF>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item 2 dc:description
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:description') == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</dc:description>
<!-- <dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item 2 dc:publisher
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:publisher') == 'The O\'Reilly Network'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</dc:description>
<!--
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item 2 dc:publisher
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:publisher') == 'The O\'Reilly Network'
-->
<rdf:RDF
xmlns:foo="http://example.org"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</dc:description>
<!--
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<dc:publisher foo:bar="baz">The O'Reilly Network</dc:publisher>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ 1 item count
Expect: feed.items.length == 2
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<!-- <title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item dc:description
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:description') == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</dc:description>
<!--
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item dc:description
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary(true) == 'XML is...'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<dc:description>XML is...</dc:description>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</description>
<!--
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
</dc:description>
<title>XML: A Disruptive Technology</title>
</item>
</rdf:RDF>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item desc normalized
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary(true) == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<description>
XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
</description>
<!-- <dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item link
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('rss1:link') == 'http://c.moreover.com/click/here.pl?r123'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<!-- <dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item link
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == 'http://c.moreover.com/click/here.pl?r123'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<!-- <dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item title
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('rss1:title') == 'XML: A Disruptive Technology'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<!-- <link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item title normalized
Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title == 'XML: A Disruptive Technology'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<!-- <dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
</item>
</rdf:RDF>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Description: RSS1 feed w/ item wiki:importance with extra attribute
Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('wiki:importance') == 'major'
-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc='http://purl.org/dc/elements/1.1/'
xmlns:w="http://purl.org/rss/1.0/modules/wiki/"
xmlns:foo="http://example.org">
<channel rdf:about="http://www.xml.com/xml/news.rss">
<title>Test</title>
<link>http://xml.com/pub</link>
<dc:description>another description</dc:description>
</channel>
<item>
<title>XML: A Disruptive Technology</title>
<!-- <link>http://c.moreover.com/click/here.pl?r123</link>
<dc:description>
XML is placing increasingly heavy loads on the existing technical
infrastructure of the Internet.
</dc:description>
<dc:publisher>The O'Reilly Network</dc:publisher>
<dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
<dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
<dc:subject>XML</dc:subject>-->
</item>
<item>
<w:importance foo:bar="baz">major</w:importance>
</item>
</rdf:RDF>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel category works
Expect: feed.categories.queryElementAt(0, Components.interfaces.nsIPropertyBag).getProperty('term') == 'hmm'
-->
<rss version="2.0" >
<channel>
<category>hmm</category>
</channel>
</rss>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel category works w/ domain
Expect: feed.categories.length == 4
-->
<rss version="2.0" >
<channel>
<category>hmm0</category>
<category>hmm1</category>
<category domain="http://example.org">hmm2</category>
<category>hmm3</category>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel cloud works
Expect: ((feed.cloud.getProperty('domain')=="rpc.sys.com") && (feed.cloud.getProperty('port')=="80") && (feed.cloud.getProperty('path')=="/RPC2") && (feed.cloud.getProperty('registerProcedure')=="pingMe") && (feed.cloud.getProperty('protocol')=="soap"))
-->
<rss version="2.0" >
<channel>
<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel copyright works
Expect: feed.fields.getProperty('copyright') == 'copyright 2006'
-->
<rss version="2.0" >
<channel>
<copyright>copyright 2006</copyright>
</channel>
</rss>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel copyright works
Expect: feed.fields.getProperty('copyright') == 'copyright 2005'
-->
<rss version="2.0" >
<channel>
<copyright>copyright 2005
</copyright>
</channel>
</rss>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel copyright works
Expect: feed.fields.getProperty('copyright') == 'copyright 2006'
-->
<rss version="2.0" >
<dc:creator xmlns:dc="http://example.org">heynow</dc:creator>
<channel>
<copyright>copyright 2006</copyright>
</channel>
</rss>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel copyright works
Expect: feed.fields.getProperty('dc:contributor') == 'them'
-->
<rss version="2.0" >
<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
<copyright>copyright 2006</copyright>
<dc:creator>me</dc:creator>
<dc:contributor>them</dc:contributor>
</channel>
</rss>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel copyright works
Expect: feed.fields.getProperty('dc:creator') == 'me'
-->
<rss version="2.0" >
<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
<copyright>copyright 2006</copyright>
<dc:creator>me</dc:creator>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel description works
Expect: feed.fields.getProperty('description') == 'test'
-->
<rss version="2.0" >
<channel>
<description>test</description>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel description works w/html
Expect: feed.fields.getProperty('description') == '<b>test</b>'
-->
<rss version="2.0" >
<channel>
<description>&lt;b>test&lt;/b></description>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel description works w/ html & CDATA
Expect: feed.fields.getProperty('description') == '<b>test</b>'
-->
<rss version="2.0" >
<channel>
<description><![CDATA[<b>test</b>]]></description>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel docs works
Expect: feed.fields.getProperty('docs') == 'http://example.org'
-->
<rss version="2.0" >
<channel>
<docs>http://example.org</docs>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel generator works
Expect: feed.fields.getProperty('generator') == 'a generator used to make feeds'
-->
<rss version="2.0" >
<channel>
<generator>a generator used to make feeds</generator>
</channel>
</rss>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel image description and required fields work
Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg') && (feed.image.getProperty('description') == 'Yo!'))
-->
<rss version="2.0" >
<channel>
<image>
<link>http://example.org</link>
<title>A picture</title>
<url>http://example.org/a.jpg</url>
<description>Yo!</description>
</image>
</channel>
</rss>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel image required fields work
Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg') && (feed.image.getProperty('description') == 'Yo!') && (feed.image.getProperty('width') == '42') && (feed.image.getProperty('height') == '43'))
-->
<rss version="2.0" >
<channel>
<image>
<link>http://example.org</link>
<title>A picture</title>
<url>http://example.org/a.jpg</url>
<description>Yo!</description>
<width>42</width>
<height>43</height>
</image>
</channel>
</rss>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel image required fields work
Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg'))
-->
<rss version="2.0" >
<channel>
<image>
<link>http://example.org</link>
<title>A picture</title>
<url>http://example.org/a.jpg</url>
</image>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel language works
Expect: feed.fields.getProperty('language') == 'en-us'
-->
<rss version="2.0" >
<channel>
<language>en-us</language>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel lastBuildDate works
Expect: feed.fields.getProperty('lastBuildDate') == 'Sat, 07 Sep 2002 00:00:01 GMT'
-->
<rss version="2.0" >
<channel>
<lastBuildDate>Sat, 07 Sep 2002 00:00:01 GMT</lastBuildDate>
</channel>
</rss>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel link works w/ line break
Expect: feed.link.spec == 'http://mozilla.org/'
-->
<rss version="2.0" >
<channel>
<link>
http://mozilla.org/
</link>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel link works
Expect: feed.link.spec == 'http://mozilla.org/'
-->
<rss version="2.0" >
<channel>
<link>http://mozilla.org/</link>
</channel>
</rss>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel link works w/ CDATA
Expect: feed.link.spec == 'http://mozilla.org/'
-->
<rss version="2.0" >
<channel>
<link>
<![CDATA[http://mozilla.org/]]>
</link>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel managingEditor works
Expect: feed.fields.getProperty('managingEditor') == 'example@example.com'
-->
<rss version="2.0" >
<channel>
<managingEditor>example@example.com</managingEditor>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel managingEditor works
Expect: feed.fields.getProperty('managingEditor') == 'example@example.com'
-->
<rss version="2.0" >
<channel>
<managingEditor foo:bar="baz" xmlns:foo="http://example.org">example@example.com</managingEditor>
</channel>
</rss>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel category works
Expect: feed.categories.queryElementAt(2, Components.interfaces.nsIPropertyBag).getProperty('term') == 'hmm2'
-->
<rss version="2.0" >
<channel>
<category>hmm0</category>
<category>hmm1</category>
<category>hmm2</category>
<category>hmm3</category>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel pubDate works
Expect: feed.fields.getProperty('pubDate') == 'Sat, 07 Sep 2002 00:00:01 GMT'
-->
<rss version="2.0" >
<channel>
<pubDate>Sat, 07 Sep 2002 00:00:01 GMT</pubDate>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel rating works
Expect: feed.fields.getProperty('rating') == '(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l by "webmaster@example.com" on "2006.01.29T10:09-0800" r (n 0 s 0 v 0 l 0))'
-->
<rss version="2.0" >
<channel>
<rating>(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l by "webmaster@example.com" on "2006.01.29T10:09-0800" r (n 0 s 0 v 0 l 0))</rating>
</channel>
</rss>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel skipDays works
Expect: ((feed.skipDays.queryElementAt(0, Components.interfaces.nsISupportsString) == 'Sunday') && (feed.skipDays.queryElementAt(1, Components.interfaces.nsISupportsString) == 'Monday'))
-->
<rss version="2.0" >
<channel>
<skipDays>
<day>Sunday</day>
<day>Monday</day>
</skipDays>
</channel>
</rss>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel skipHours works
Expect: ((feed.skipHours.queryElementAt(0, Components.interfaces.nsISupportsString) == '0') && (feed.skipHours.queryElementAt(4, Components.interfaces.nsISupportsString) == '23'))
-->
<rss version="2.0" >
<channel>
<skipHours>
<hour>0</hour>
<hour>1</hour>
<hour>2</hour>
<hour>22</hour>
<hour>23</hour>
</skipHours>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel description works
Expect: feed.subtitle(true) == 'test'
-->
<rss version="2.0" >
<channel>
<description>test</description>
</channel>
</rss>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: channel description works
Expect: feed.subtitle(false) == '<i><b>test</b></i>'
-->
<rss version="2.0" >
<channel>
<description><![CDATA[<i><b>test</b></i>]]></description>
</channel>
</rss>

Some files were not shown because too many files have changed in this diff Show More