Converting Safari Bookmarks to Firebird Bookmarks using XSLT

I like Safari, especially the fact that my Safari bookmarks are automatically synced to my iDisk. But I also like Firebird, and I’d like to use the same bookmarks in that browser as I do in Safari.

Safari stores its bookmarks in:

which is an XML file.

Firebird stores its bookmarks under:

which is a wonkly-formatted HTML file based on the original Netscape bookmarks file format.

Converting from the Safari-format XML file to the HTML-format Firebird file seemed like a good task to use XSLT for.

Using TestXSLT from Marc Liyanage as a testing tool, I created this Safari2Firebird.xslt style sheet that can be used to transform a Safari bookmarks file into a Firebird bookmarks file.

To do this using TestXSLT:

  • Under the XML tab, select the Safari Bookmarks.plist file.
  • Under the XSLT tab, select the Safari2Firebird.xslt file you downloaded here.
  • Click Process and, optionally, save the result as bookmarks.html and copy to your Firebird profile directory.

I’m neither an XSLT expert nor particularly familiar with Firebird, so I may have missed something here, and this may not work for you. I welcome comments on how to improve the process.

Update: Marcus Kazmierczak helpfully modified the script; here’s his explanation:

I convert the BookmarksBar Folder to Firebird’s Personal Toolbar (including setting the property). I also discard the Address Book and Rendezvous folders and move all the folders in the BookmarkMenu to top level.

I’ve replaced the link above with a link to the updated version.


Steven Garrity's picture
Steven Garrity on December 15, 2003 - 22:07 Permalink

Very nice. It is worth noting that however wacky and ugly, the Firebird bookmarks.html format is consistent in Firebird across platforms (Windows, Linux, Mac) — so this would also allow you to get bookmarks from Safari to Firebird on Windows or Linux.

See Mozilla Firebird bugzilla bug #66116 for more on this problem with Firebird.

Frances's picture
Frances on January 3, 2004 - 17:40 Permalink

Although I really had no idea what I was actually doing, I followed your instructions and it worked. I deleted the original bookmarks folder from the Phoenix proflle folder and replaced it with the one created with TestXSLT from Safari. But now I can’t get things to display on the toolbar. Is there any way to merge the old and new bookmark files?

Gustave's picture
Gustave on October 25, 2006 - 11:38 Permalink

Not sure what is going on here, but my Safari bookmarks file seems to be something other than plain text, but when i open it in plist editor, it works fine. No idea what is going on here…