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

on rpcProtocolPopup (default=nil) {
	<<8/3/01; 6:16:40 PM by JES
		<<Render a popup menu form element for choosing an RPC protocol, XML-RPC or SOAP.
	local (htmltext = "", indentlevel = 0);
	on add (s) {
		htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r"};
	if default == nil { //default to the first password in
		default = nameOf ([1])};
	add ("<select name=\"rpcProtocol\">");
	if string.lower (default) == "xml-rpc" {
		add ("<option value=\"xml-rpc\" selected>XML-RPC</option>");
		add ("<option value=\"xml-rpc\">SOAP</option>")}
	else { //SOAP is selected
		add ("<option value=\"xml-rpc\">XML-RPC</option>");
		add ("<option value=\"xml-rpc\" selected>SOAP</option>")};
	add ("</select>");
	return (htmltext)}

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.