styles/kdebookmarks2vym.xsl
author insilmaril
Wed Feb 15 12:54:57 2006 +0000 (2006-02-15)
changeset 207 1313cec0ad1e
child 245 27b71695d690
permissions -rw-r--r--
1.7.9 Import of KDE bookmarks, some _de translations
     1 <?xml version="1.0" encoding="ISO-8859-1"?>
     2 <!DOCTYPE xsl:stylesheet
     3 [
     4    <!-- Namespace for XHTML -->
     5    <!ENTITY xhtmlns "http://www.w3.org/1999/xhtml">
     6 ]>
     7 
     8 <!--
     9     Author      : Uwe Drechsel  <vym@InSilmaril.de>
    10     Description : transforms KDE Bookmarks into vym map
    11 -->
    12 
    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"
    17     xmlns="&xhtmlns;">
    18 
    19 
    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"
    23     encoding="UTF-8"
    24     indent="yes"
    25     media-type="application/xhtml+xml"/>
    26 
    27 
    28 
    29 <!-- ======================================= -->
    30 <!-- 1 = true, 0 = false -->
    31 
    32 <!-- Debuggin on/off? -->
    33 <xsl:param name="debug" select="0"/>
    34 
    35 
    36 
    37 
    38 <!-- ======================================= -->
    39 <xsl:variable name="head.title">
    40    <xsl:choose>
    41       <xsl:when test="/vymmap/mapcenter/heading">
    42 			
    43 				<xsl:variable name="title">
    44 				</xsl:variable>
    45 
    46         <xsl:value-of select="$title"/>
    47       </xsl:when>
    48       <xsl:otherwise></xsl:otherwise>
    49    </xsl:choose>
    50 </xsl:variable>
    51 
    52 
    53 
    54 
    55 <!-- ======================================= -->
    56 <xsl:template match="*">
    57    <xsl:message>
    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>&#10;</xsl:text>
    63    </xsl:message>
    64 </xsl:template>
    65 
    66 
    67 
    68 
    69 <xsl:template match="xbel">
    70    <vymmap version="1.7.8">
    71 	<mapcenter>
    72 		<heading>Bookmarks</heading>
    73 		<branch frameType="Rectangle">
    74 			<heading>KDE</heading>
    75 				  <xsl:apply-templates/>
    76 		</branch>
    77 	</mapcenter>	
    78    </vymmap>
    79 </xsl:template>
    80 
    81 
    82 <xsl:template match="folder">
    83    <branch scrolled="yes">
    84       <xsl:apply-templates/>
    85    </branch>
    86 </xsl:template>
    87 
    88 <xsl:template match="title">
    89    <heading>
    90       <xsl:apply-templates/>
    91    </heading>
    92 </xsl:template>
    93 
    94 <xsl:template match="separator">
    95    <branch>
    96 		<heading>***************</heading>
    97    </branch>
    98 </xsl:template>
    99 
   100 <xsl:template match="desc">
   101    <htmlnote fonthint="var">
   102 	<html>
   103 		<body style="font-size:10pt;font-family:Sans Serif">
   104 			<p>
   105 				<xsl:value-of select="." />
   106 			</p>
   107 		</body>
   108 	</html>
   109 
   110    </htmlnote>
   111 </xsl:template>
   112 
   113 <xsl:template match="bookmark">
   114    <branch>
   115 		<xsl:attribute name="url" ><xsl:value-of select="@href" />
   116 		</xsl:attribute>
   117 		<xsl:apply-templates/>
   118    </branch>
   119 </xsl:template>
   120 
   121 
   122 <!-- Do nothing! We don't need some informational elements -->
   123 <xsl:template match="info*"/>
   124 
   125 
   126 </xsl:stylesheet>