On Fri, 2005-03-04 at 17:36 -0800, Heikki Toivonen wrote: > I thought about this a little bit, and I think by far the easiest way > would be to hook into the webserver parcel in Chandler. Not the sexiest > solution, but it has the added benefit that the Chandler instance you > are connected to could be a remote Chandler in addition to a local version. > > The way I'd imagine this would work is, for example, that every web page > you visit in Mozilla, the toolbar connects to the webserver parcel and > sends a copy of the downloaded page (so typically the toolbar would do > an HTTP POST operation to http://localhost:<webserver parcel port>). You > could also limit this to manual action in the toolbar, or to filing of > bookmarks, or whatever you wanted. > > Morgen is the best person to contact regarding the webserver parcel. > > What do you think? > > -- > Heikki Toivonen >
What do I think? Mostly I'm just glad for your input, especially after misreading your earlier email. ;) Your solution is an interesting one, to be certain. The mechanics of the toolbar are not difficult; the interesting problem here is connecting data to the repository. You may well know that, in addition to using forms, JavaScript/XUL can do a POST to a server with it's XMLHttpRequest(), which is the hack used for Google's autosuggest, maps, and Gmail. Sending it via localhost is an idea that hadn't occurred to me. IIRC, you want to send both the URL and the page contents to the repository, and I'm thankful for the guidance on how to connect it to the repository. I'll look into that, and will contact Morgen. What I don't know is how to handle the DOM, which is what I presume we want to store, in addition to the URL string. (Is this correct? That's a *lot* of data!) XMLHttpRequest() has a send() command where the real data will be sent, and one can send a string, the entire DOM, or a DOM fragment. In any case, AFAIK the object will be/must be serialized using Mozilla's XPCOM serializer, nsDOMSerializer. Does Python have a library that will de-serialize these objects? For instance, I'm not sure if Mozilla's is the standard W3C DOM "Load and Save Level 3," which I presume Python can handle, or if there is any relation to Apache's asDOMSerializer interface, which is also used with Java. Better yet, does the webserver parcel have an interface that can handle this stuff? I'm also concerned about how non-W3C-compliant web pages will be passed. I hope someone more experienced with these issues will know, otherwise I'll continue to research it. Thanks, Brett _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "Dev" mailing list http://lists.osafoundation.org/mailman/listinfo/dev
