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

river2Suite.cloudPipe.callbacks.client.fatPing

on fatPing (adrxstruct) {
	<<Changes
		<<12/26/09; 2:00:58 PM by DW
			<<Change the name from "item" to "fatPing."
		<<12/24/09; 9:26:37 AM by DW
			<<Created. 
	local (xstruct);
	on decode (s) {
		return (xml.entitydecode (s, flAlphaEntities:true))};
	xml.compile (decode (adrxstruct^.["/cdata"]), @xstruct);
	on getvalue (name) {
		try {
			return (searchengine.stripmarkup (decode (xml.getvalue (@xstruct, name))))}
		else {
			return ("")}};
	local (title = getvalue ("title"), link = getvalue ("link"), description = getvalue ("description"));
	bundle { //debugging, part 1
		local (adrtable = @scratchpad.pipeItems);
		if not defined (adrtable^) {
			new (tabletype, adrtable)};
		local (adrsub = @adrtable^.[string (clock.now ())]);
		adrsub^ = xstruct};
	bundle { //more debugging, add to outline
		local (adroutline = @scratchpad.cloudPipeUpdates);
		if not defined (adroutline^) {
			new (outlinetype, adroutline)};
		local (oldtarget = target.set (adroutline), fldescription = false);
		if (title == "") and (description != "") {
			title = description;
			description = ""};
		op.firstsummit ();
		if op.getlinetext () == "" {
			op.setlinetext (title)}
		else {
			op.insert (title, up)};
		if sizeof (description) > 0 {
			op.insert (description, right);
			fldescription = true};
		if sizeof (link) > 0 {
			local (atts);
			new (tabletype, @atts);
			atts.type = "link";
			atts.url = link;
			op.attributes.addgroup (@atts)};
		if fldescription {
			op.go (left, 1);
			op.collapse ()};
		target.set (oldtarget)}};
bundle { //test code
	fatPing (@scratchpad.pipeItems.["12/27/09; 9:38:04 AM"])}



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.