Cleaned up mmap import a bit. Started to convert flags there, too
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE xsl:stylesheet
4 <!-- Namespace for XHTML -->
5 <!ENTITY xhtmlns "http://www.w3.org/1999/xhtml">
9 Author : Uwe Drechsel <vym@InSilmaril.de>
10 Description : transforms KDE Bookmarks into vym map
13 <xsl:stylesheet version="1.0"
14 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15 xmlns:date="http://exslt.org/dates-and-times"
16 extension-element-prefixes="date"
20 <xsl:output method="xml"
21 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
22 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
25 media-type="application/xhtml+xml"/>
29 <!-- ======================================= -->
30 <!-- 1 = true, 0 = false -->
32 <!-- Debuggin on/off? -->
33 <xsl:param name="debug" select="0"/>
38 <!-- ======================================= -->
39 <xsl:variable name="head.title">
41 <xsl:when test="/vymmap/mapcenter/heading">
43 <xsl:variable name="title">
46 <xsl:value-of select="$title"/>
48 <xsl:otherwise></xsl:otherwise>
55 <!-- ======================================= -->
56 <xsl:template match="*">
58 <xsl:text>WARNING: Unknown tag "</xsl:text>
59 <xsl:value-of select="local-name(.)"/>
60 <xsl:text>": </xsl:text>
61 <xsl:value-of select="normalize-space(.)"/>
62 <xsl:text> </xsl:text>
69 <xsl:template match="xbel">
70 <vymmap version="1.7.8">
72 <heading>Bookmarks</heading>
73 <branch frameType="Rectangle">
74 <heading>KDE</heading>
75 <xsl:apply-templates/>
82 <xsl:template match="folder">
83 <branch scrolled="yes">
84 <xsl:apply-templates/>
88 <xsl:template match="title">
90 <xsl:apply-templates/>
94 <xsl:template match="separator">
96 <heading>***************</heading>
100 <xsl:template match="desc">
101 <htmlnote fonthint="var">
103 <body style="font-size:10pt;font-family:Sans Serif">
105 <xsl:value-of select="." />
113 <xsl:template match="bookmark">
115 <xsl:attribute name="url" ><xsl:value-of select="@href" />
117 <xsl:apply-templates/>
122 <!-- Do nothing! We don't need some informational elements -->
123 <xsl:template match="info*"/>