1 <?xml version='1.0' encoding='utf-8'?>
3 <!-- XHTML-to-S5 converted by Fletcher Penney
4 specifically designed for use with MultiMarkdown created XHTML
6 MultiMarkdown Version 2.0.b5
8 $Id: s5.xslt 478 2008-01-12 23:03:47Z fletcher $
12 # Copyright (C) 2005-2008 Fletcher T. Penney <fletcher@fletcherpenney.net>
14 # This program is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write to the
26 # Free Software Foundation, Inc.
27 # 59 Temple Place, Suite 330
28 # Boston, MA 02111-1307 USA
32 TODO: an option to select what h-level should be slides (for instance, if h2, then each h1 would be a slide, containing list of h2's. Then h2's converted into slides....
37 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
38 xmlns:xhtml="http://www.w3.org/1999/xhtml"
39 xmlns="http://www.w3.org/1999/xhtml"
40 exclude-result-prefixes="xhtml xsl"
43 <xsl:output method='xml' encoding='utf-8' indent="yes"/>
45 <xsl:strip-space elements="*" />
47 <xsl:variable name="theme">default</xsl:variable>
49 <xsl:param name="match"/>
51 <xsl:template match="/">
53 <xsl:apply-templates select="node()"/>
57 <xsl:template match="xhtml:head">
59 <xsl:apply-templates select="xhtml:meta"/>
60 <xsl:apply-templates select="node()"/>
61 <meta name="version" content="S5 1.1" />
62 <meta name="generator" content="MultiMarkdown"/>
63 <meta name="controlVis" content="hidden"/>
64 <link rel="stylesheet" href="ui/{$theme}/slides.css" type="text/css" media="projection" id="slideProj" />
65 <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
66 <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
67 <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
68 <script src="ui/default/slides.js" type="text/javascript"></script>
72 <xsl:template match="xhtml:title">
73 <title><xsl:value-of select="."/></title>
76 <xsl:template match="xhtml:body">
79 <div id="controls"><xsl:text> </xsl:text></div>
80 <div id="currentSlide"><xsl:text> </xsl:text></div>
81 <div id="header"><xsl:text> </xsl:text></div>
83 <h1><xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/></h1>
85 <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'author']/@content"/>
89 <div class="presentation">
91 <h1><xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/></h1>
92 <h2><xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'subtitle']/@content"/></h2>
94 <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'author']/@content"/>
96 <xsl:variable name="url">
97 <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'url']/@content"/>
100 <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'organization']/@content"/>
103 <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:meta[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'date']/@content"/>
107 <xsl:apply-templates select="xhtml:h1"/>
113 <xsl:template match="xhtml:h1">
115 <h1><xsl:value-of select="."/></h1>
116 <xsl:variable name="items" select="count(following-sibling::*) - count(following-sibling::xhtml:h1[1]/following-sibling::*) - count(following-sibling::xhtml:h1[1])"/>
117 <xsl:apply-templates select="following-sibling::*[position() <= $items]" mode="slide"/>
121 <xsl:template match="xhtml:h1[last()]">
123 <h1><xsl:value-of select="."/></h1>
124 <xsl:variable name="items" select="count(following-sibling::*) - count(following-sibling::h1/following-sibling::*)"/>
125 <xsl:apply-templates select="following-sibling::*[position() <= $items]" mode="slide"/>
129 <xsl:template match="xhtml:p" mode="slide">
130 <xsl:copy-of select="."/>
133 <xsl:template match="xhtml:p[1]" mode="slide">
134 <xsl:copy-of select="."/>
137 <xsl:template match="xhtml:li" mode="slide">
139 <xsl:apply-templates select="node()" mode="slide"/>
143 <xsl:template match="xhtml:ol" mode="slide">
144 <!-- <ol class="incremental show-first"> -->
146 <xsl:apply-templates select="node()" mode="slide"/>
150 <xsl:template match="xhtml:ul" mode="slide">
152 <xsl:apply-templates select="node()" mode="slide"/>