Skip to content
Snippets Groups Projects
Commit 70cf5dba authored by goik's avatar goik
Browse files

Slide generating style sheet

parent e4a86c30
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,11 @@ SAXONCMD=java -cp "/usr/share/java/Saxon-HE.jar:/usr/share/java/xercesImpl.jar"
all: epub webhelp pdf
all: epub webhelp pdf slides
slides: fig.xml
mkdir -p Slides
${SAXONCMD} -s:fig.xml -xsl:../Xsl/docbook2slides.xsl
......
......@@ -242,4 +242,42 @@
<para>This is the end my friend.</para>
</chapter>
<chapter>
<title>Mixing lecture notes and slides</title>
<section xml:id="classintro">
<title>Objects and classes</title>
<annotation role="slide">
<para>Ignore me, just here to supply a valid annotation content
model.</para>
</annotation>
<para>To be continued accordingly ...</para>
<section xml:id="objectsClassesBasics">
<title>Classes in OO languages</title>
<itemizedlist>
<listitem>
<para>Blueprints for objects</para>
</listitem>
<listitem>
<para>Attributes and methods.</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="classVsInstance">
<title>Classes and instances</title>
<mediaobject>
<imageobject>
<imagedata fileref="Ref/Fig/class.svg"/>
</imageobject>
</mediaobject>
</section>
</section>
</chapter>
</book>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:d="http://docbook.org/ns/docbook">
<xsl:import href="/usr/share/xmlmind/addon/config/docbook5/xsl/html/docbook.xsl" />
<xsl:template match="/">
<xsl:apply-templates select="//d:section[d:annotation[@role='slide']]" mode='entry'/>
</xsl:template>
<xsl:template match="d:section" mode='entry'>
<xsl:result-document method="xhtml" encoding="utf-8" href="Slides/{@xml:id}.html" indent="yes">
<html lang="en">
<head>
<title>
<xsl:value-of select="d:title"/>
</title>
<link href="mi.css" rel="stylesheet" />
<link href="reveal.js/css/reveal.css" rel="stylesheet" />
<link href="reveal.js/css/theme/solarized.css" id="theme" rel="stylesheet" />
<!-- Code syntax highlighting -->
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet" />
</head>
<body>
<!-- Wrap the entire slide show in a div using the "reveal" class. -->
<div class="reveal">
<!-- Wrap all slides in a single "slides" class -->
<div class="slides">
<section>
<xsl:apply-templates select="*[not(name(.)='section')]"/>
</section>
<xsl:apply-templates select="d:section"/>
</div>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.js"></script>
<script>/*<![CDATA[*/
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal.js/plugin/notes/notes.js', async: true }
]
});
/*]]>*/</script>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="d:section">
<section>
<xsl:apply-templates/>
</section>
</xsl:template>
<xsl:template match="d:section/d:title">
<h1>
<xsl:value-of select="."/>
</h1>
</xsl:template>
<xsl:template match="sag">
<xsl:comment>
<xsl:text>No template defined for element '</xsl:text>
<xsl:value-of select="namespace-uri()"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>'</xsl:text>
</xsl:comment>
</xsl:template>
</xsl:stylesheet>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment