root/feedmelinks/import/import-delicious-tags.xsl

Revision 857, 0.9 kB (checked in by hirokai, 3 years ago)

updated import code to handle Firefox, IE, and Del.icio.us

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3         <xsl:output method="text" />
4
5         <xsl:template match="posts"><xsl:apply-templates/></xsl:template>
6
7         <xsl:template match="post">
8                 <xsl:call-template name="split">
9                         <xsl:with-param name="names" select="@tag"/>
10                 </xsl:call-template>
11 </xsl:template>
12
13         <xsl:template name="split">
14                 <xsl:param name="names"/>
15                 <xsl:variable name="first" select='substring-before($names," ")'/>
16                 <xsl:variable name='rest' select='substring-after($names," ")'/>
17
18                 <xsl:if test='$first'>
19 <xsl:text>
20 </xsl:text>
21                  <xsl:value-of select='$first'/></xsl:if>
22
23                 <xsl:if test='$rest'>
24                         <xsl:call-template name='split'>
25                                 <xsl:with-param name='names' select='$rest'/>
26                         </xsl:call-template>
27                 </xsl:if>
28
29                 <xsl:if test='not($rest)'><xsl:text>
30 </xsl:text>
31  <xsl:value-of select='$names'/></xsl:if>
32
33
34         </xsl:template>
35
36 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.