1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/styles/kdebookmarks2vym.xsl Wed Feb 15 12:54:57 2006 +0000
1.3 @@ -0,0 +1,126 @@
1.4 +<?xml version="1.0" encoding="ISO-8859-1"?>
1.5 +<!DOCTYPE xsl:stylesheet
1.6 +[
1.7 + <!-- Namespace for XHTML -->
1.8 + <!ENTITY xhtmlns "http://www.w3.org/1999/xhtml">
1.9 +]>
1.10 +
1.11 +<!--
1.12 + Author : Uwe Drechsel <vym@InSilmaril.de>
1.13 + Description : transforms KDE Bookmarks into vym map
1.14 +-->
1.15 +
1.16 +<xsl:stylesheet version="1.0"
1.17 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.18 + xmlns:date="http://exslt.org/dates-and-times"
1.19 + extension-element-prefixes="date"
1.20 + xmlns="&xhtmlns;">
1.21 +
1.22 +
1.23 +<xsl:output method="xml"
1.24 + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
1.25 + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
1.26 + encoding="UTF-8"
1.27 + indent="yes"
1.28 + media-type="application/xhtml+xml"/>
1.29 +
1.30 +
1.31 +
1.32 +<!-- ======================================= -->
1.33 +<!-- 1 = true, 0 = false -->
1.34 +
1.35 +<!-- Debuggin on/off? -->
1.36 +<xsl:param name="debug" select="0"/>
1.37 +
1.38 +
1.39 +
1.40 +
1.41 +<!-- ======================================= -->
1.42 +<xsl:variable name="head.title">
1.43 + <xsl:choose>
1.44 + <xsl:when test="/vymmap/mapcenter/heading">
1.45 +
1.46 + <xsl:variable name="title">
1.47 + </xsl:variable>
1.48 +
1.49 + <xsl:value-of select="$title"/>
1.50 + </xsl:when>
1.51 + <xsl:otherwise></xsl:otherwise>
1.52 + </xsl:choose>
1.53 +</xsl:variable>
1.54 +
1.55 +
1.56 +
1.57 +
1.58 +<!-- ======================================= -->
1.59 +<xsl:template match="*">
1.60 + <xsl:message>
1.61 + <xsl:text>WARNING: Unknown tag "</xsl:text>
1.62 + <xsl:value-of select="local-name(.)"/>
1.63 + <xsl:text>": </xsl:text>
1.64 + <xsl:value-of select="normalize-space(.)"/>
1.65 + <xsl:text> </xsl:text>
1.66 + </xsl:message>
1.67 +</xsl:template>
1.68 +
1.69 +
1.70 +
1.71 +
1.72 +<xsl:template match="xbel">
1.73 + <vymmap version="1.7.8">
1.74 + <mapcenter>
1.75 + <heading>Bookmarks</heading>
1.76 + <branch frameType="Rectangle">
1.77 + <heading>KDE</heading>
1.78 + <xsl:apply-templates/>
1.79 + </branch>
1.80 + </mapcenter>
1.81 + </vymmap>
1.82 +</xsl:template>
1.83 +
1.84 +
1.85 +<xsl:template match="folder">
1.86 + <branch scrolled="yes">
1.87 + <xsl:apply-templates/>
1.88 + </branch>
1.89 +</xsl:template>
1.90 +
1.91 +<xsl:template match="title">
1.92 + <heading>
1.93 + <xsl:apply-templates/>
1.94 + </heading>
1.95 +</xsl:template>
1.96 +
1.97 +<xsl:template match="separator">
1.98 + <branch>
1.99 + <heading>***************</heading>
1.100 + </branch>
1.101 +</xsl:template>
1.102 +
1.103 +<xsl:template match="desc">
1.104 + <htmlnote fonthint="var">
1.105 + <html>
1.106 + <body style="font-size:10pt;font-family:Sans Serif">
1.107 + <p>
1.108 + <xsl:value-of select="." />
1.109 + </p>
1.110 + </body>
1.111 + </html>
1.112 +
1.113 + </htmlnote>
1.114 +</xsl:template>
1.115 +
1.116 +<xsl:template match="bookmark">
1.117 + <branch>
1.118 + <xsl:attribute name="url" ><xsl:value-of select="@href" />
1.119 + </xsl:attribute>
1.120 + <xsl:apply-templates/>
1.121 + </branch>
1.122 +</xsl:template>
1.123 +
1.124 +
1.125 +<!-- Do nothing! We don't need some informational elements -->
1.126 +<xsl:template match="info*"/>
1.127 +
1.128 +
1.129 +</xsl:stylesheet>