Skip to content

Instantly share code, notes, and snippets.

@echohn echohn/Bookmarks.xslt
Last active Jul 22, 2016

What would you like to do?
safari auto backup bookmarks xslt file
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl=''>
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
<xsl:template match="plist">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" />
<xsl:template match="dict">
<xsl:variable name="title" select="string[preceding-sibling::key[text() = 'Title']]"/>
<xsl:if test="not($title = '')">
<H3 FOLDED=""><xsl:value-of select="$title"/></H3>
<xsl:apply-templates select="array"/>
<xsl:template match="dict[key[text() = 'URIDictionary']]">
<a href="{string[preceding-sibling::key[text() = 'URLString']]}"><xsl:value-of select="dict[preceding-sibling::key[text() = 'URIDictionary']]/string[preceding-sibling::key[text() = 'title']]"/></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.