2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
xmlns:tomboy="http://beatniksoftware.com/tomboy"
4
xmlns:size="http://beatniksoftware.com/tomboy/size"
5
xmlns:link="http://beatniksoftware.com/tomboy/link"
8
<xsl:output method="html" indent="no" />
9
<xsl:preserve-space elements="*" />
11
<xsl:param name="font" />
12
<xsl:param name="export-linked" />
13
<xsl:param name="root-note" />
15
<xsl:param name="newline" select="'
'" />
17
<xsl:template match="/">
20
<title><xsl:value-of select="/tomboy:note/tomboy:title" /></title>
21
<style type="text/css">
22
body { <xsl:value-of select="$font" /> }
23
h1 { font-size: xx-large;
26
text-decoration: underline; }
27
div.note { overflow: auto;
29
border: 1px solid black;
33
white-space: -moz-pre-wrap; /* Mozilla */
34
white-space: -pre-wrap; /* Opera 4 - 6 */
35
white-space: -o-pre-wrap; /* Opera 7 */
36
white-space: pre-wrap; /* CSS3 */
37
word-wrap: break-word; /* IE 5.5+ */ }
42
<xsl:apply-templates select="tomboy:note"/>
48
<xsl:template match="tomboy:note">
49
<xsl:apply-templates select="tomboy:text"/>
52
<xsl:template match="tomboy:text">
54
id="{/tomboy:note/tomboy:title}"
55
style="width:{/tomboy:note/tomboy:width};">
56
<a name="#{/tomboy:note/tomboy:title}" />
57
<xsl:apply-templates select="node()" />
60
<xsl:if test="/tomboy:note/tomboy:title = $root-note">
61
<xsl:if test="$export-linked">
62
<xsl:apply-templates select="document(.//link:internal/text())/node()" />
67
<xsl:template match="tomboy:note/tomboy:text/*[1]/text()[1]">
68
<h1><xsl:value-of select="substring-before(., $newline)"/></h1>
69
<xsl:value-of select="substring-after(., $newline)"/>
72
<xsl:template match="tomboy:bold">
73
<b><xsl:apply-templates select="node()"/></b>
76
<xsl:template match="tomboy:italic">
77
<i><xsl:apply-templates select="node()"/></i>
80
<xsl:template match="tomboy:strikethrough">
81
<strike><xsl:apply-templates select="node()"/></strike>
84
<xsl:template match="tomboy:highlight">
85
<span style="background:yellow"><xsl:apply-templates select="node()"/></span>
88
<xsl:template match="size:small">
89
<span style="font-size:small"><xsl:apply-templates select="node()"/></span>
92
<xsl:template match="size:large">
93
<span style="font-size:large"><xsl:apply-templates select="node()"/></span>
96
<xsl:template match="size:huge">
97
<span style="font-size:xx-large"><xsl:apply-templates select="node()"/></span>
100
<xsl:template match="link:broken">
101
<span style="color:silver"><u><xsl:value-of select="node()"/></u></span>
104
<xsl:template match="link:internal">
105
<a style="color:red" href="#{document(node())/tomboy:note/tomboy:title}">
106
<xsl:value-of select="node()"/>
110
<xsl:template match="link:url">
111
<a href="{node()}"><xsl:value-of select="node()"/></a>