-- change "yourShortUserName" to your short user name set bookmarksFile to "/Users/yourShortUserName/Library/Safari/Bookmarks.plist" -- change this to the path to where you saved your XSLT file. set xsltFile to "/Users/david/Desktop/SafariBookmarkSort.xslt" -- read the Bookmarks.plist file as UTF 8 (in case the name of the link is in a different language, like Japanese) open for access (POSIX file bookmarksFile) set xmlCode to (read (POSIX file bookmarksFile) as Çclass utf8È) close access (POSIX file bookmarksFile) -- read the XLST file for the transform as UTF 8 open for access (POSIX file xsltFile) set xsltCode to (read (POSIX file xsltFile) as Çclass utf8È) close access (POSIX file xsltFile) tell application "TestXSLT" -- Create new document make Processor -- Now prepare the transformation tell Processor 1 -- first the input XML data set XML Code to xmlCode -- now the stylesheet itself set XSLT Code to xsltCode -- switch processor engine Set Processor Type Name "Libxslt" -- set up XSLT parameters which the stylesheet uses Set Parameter Name "version" Value "1.0" -- now do the actual transformation Process -- pick up the result of the transformtion set blah to Result -- and also write it out to a file Export Output File bookmarksFile -- end tell for Processor end tell -- end tell for TestXSLT app end tell