[Zope] Publishing bookmarks with XBEL from Zope

sean.upton@uniontrib.com sean.upton@uniontrib.com
Sat, 24 Nov 2001 18:59:15 -0800


Consider posting this question to the zope-xml list, and you might get some
more responses and ideas.  I'm not familiar with XBEL, but this should be
reasonable to do with not a lot of work.  You would want to use ParsedXML,
which supports standard DOM calls, like:

dom = context['MyXMLDocumentId']
items = dom.getElementsByTagName('bookmark')
for bookmarknode in items:
    text = ''
    for childnode in bookmarknode.childNodes:
        if childnode.nodeType == 3:
           #if nodetype is text, append to text
           text = text+childnode.nodeValue
    context.doSomethingWith(text)
    #where doSomethingWith is a method in the
    #acquisition path of this script's context 

For a simple XML schema, simple DOM traversals of your bookmarks should be
able to read them in using ParsedXML, which will store a document; you could
use the upload functionality of ParsedXML to upload someone's bookmarks, and
use TTW python scripts to read each entry, and another ttw python script or
dtml method to loop through all of them...

It should be reasonable to do this...
Sean

-----Original Message-----
From: Timothy Wilson [mailto:wilson@visi.com]
Sent: Saturday, November 24, 2001 6:43 PM
To: Zope listserv
Subject: [Zope] Publishing bookmarks with XBEL from Zope


Hi everyone,

I'd like to build a system whereby our library staff could publish some
browser bookmarks on their Web page. They maintain a rather lengthly list of
them now, suggested by various teachers working on projects with their
students.

There are several Zope products designed to manage bookmarks, but none of
them really seem to do what I want. I was wondering about a system that
would take bookmarks in the XBEL XML format and present them from Zope using
one of the Zope XML products. Is this a reasonable thing to do? I haven't
messed with XML content in Zope yet and I'm not really sure where to start.

Any feedback would be appreciated.

-Tim

--
Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson@visi.com |  <dtml-var pithy_quote>  | http://linux.com


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )