Monday, November 08, 2010 at 12:01 AM.


on attsToSitePrefsTable (adratts) {
	local (t); new (tableType, @t);
	on additem (sourcename, destname=nil, default=nil) {
		local (adrsource = @adratts^.[sourcename]);
		local (adrdest);
		if destname == nil { //same name as source
			adrdest = @t.[sourcename]}
		else {
			adrdest = @t.[destname]};
		if defined (adrsource^) {
			adrdest^ = adrsource^;
			return (true)};
		if default != nil {
			adrdest^ = default;
			return (true)};
		return (false)};
	additem ("canonicalSiteName", "siteName");
	additem ("displaySiteName", default:adratts^.canonicalSiteName);
	additem ("protocol", default:"xml-rpc");
	additem ("rpcServer", "host");
	additem ("rpcPort", "port");
	additem ("rpcPath", default:"/RPC2");
	additem ("soapAction", default:"/manila");
	return (t)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.