Created
December 17, 2010 15:31
-
-
Save psd/745113 to your computer and use it in GitHub Desktop.
XSLT to convert a delicious XML export into a TiddlyWiki
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- | |
translate delicious export XML into a codeless TiddlyWiki XHTML | |
this may be then imported into a TiddlyWiki / TiddlySpace | |
--> | |
<xsl:template match="/"> | |
<xhtml> | |
<body> | |
<div id="storeArea"> | |
<xsl:apply-templates select="//post"/> | |
</div> | |
</body> | |
</xhtml> | |
</xsl:template> | |
<xsl:template match="post"> | |
<xsl:variable name="time"><xsl:value-of select="translate(@time, '-:ZT ', '')"/></xsl:variable> | |
<div modifier="delicious" title="{@description}" url="{@href}" created="{$time}" tags="{@tag}"> | |
<xsl:if test="@shared"> | |
<xsl:attribute name="shared"><xsl:value-of select="@shared"/></xsl:attribute> | |
</xsl:if> | |
<pre><xsl:value-of select="@extended"/></pre> | |
</div> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl api.del.icio.us/v1/posts/all -u user:pass > delicious.xml