Skip to content
Snippets Groups Projects
Commit d777e311 authored by Goik Martin's avatar Goik Martin
Browse files

Slides in <appendix>

parent d9274db8
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* &lt;p&gt;Beispiel: Im Array {3, 2, 0, 1, 4} ist der Wert »1« an der Index- * &lt;p&gt;Beispiel: Im Array {3, 2, 0, 1, 4} ist der Wert »1« an der Index-
* position »3« das zweite ungerade Element.&lt;/p&gt; * position »3« das zweite ungerade Element.&lt;/p&gt;
* *
* @param werte Die zu durchsuchenden Werte. Alle Werte ungleich null. * @param werte Die zu durchsuchenden Werte.
* @param n Die gewünschte Position, Start bei 1. * @param n Die gewünschte Position, Start bei 1.
* *
* @return Den Index des n-ten ungeraden Wertes falls es mindestens n * @return Den Index des n-ten ungeraden Wertes falls es mindestens n
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<xsl:template match="/"> <xsl:template match="/">
<xsl:for-each select="//d:chapter[contains(@annotations, 'slide')]| <xsl:for-each select="//d:chapter[contains(@annotations, 'slide')]|
//d:appendix[contains(@annotations, 'slide')]|
//d:section[contains(@annotations, 'slide')]"> //d:section[contains(@annotations, 'slide')]">
<xsl:call-template name="slideUnit"> <xsl:call-template name="slideUnit">
<xsl:with-param name="rootId" select="@xml:id"/> <xsl:with-param name="rootId" select="@xml:id"/>
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
<xsl:for-each select="//d:chapter[descendant::*[contains(@annotations, 'slide')]]| <xsl:for-each select="//d:chapter[descendant::*[contains(@annotations, 'slide')]]|
//d:appendix[descendant::*[contains(@annotations, 'slide')]]|
//d:section[descendant::*[contains(@annotations, 'slide')]]"> //d:section[descendant::*[contains(@annotations, 'slide')]]">
<xsl:call-template name="slideUnit"> <xsl:call-template name="slideUnit">
<xsl:with-param name="rootId" select="@xml:id"/> <xsl:with-param name="rootId" select="@xml:id"/>
...@@ -102,7 +104,7 @@ ...@@ -102,7 +104,7 @@
</xsl:document> </xsl:document>
</xsl:template> </xsl:template>
<xsl:template match="d:chapter|d:section" mode="slideDescendants"> <xsl:template match="d:chapter|d:appendix|d:section" mode="slideDescendants">
<xsl:apply-templates select="d:section|d:figure" mode="slideDescendants"/> <xsl:apply-templates select="d:section|d:figure" mode="slideDescendants"/>
</xsl:template> </xsl:template>
......
...@@ -111,4 +111,26 @@ ...@@ -111,4 +111,26 @@
<xi:include href="Components/exampleSlides.xml" xpointer="element(/1)"/> <xi:include href="Components/exampleSlides.xml" xpointer="element(/1)"/>
<xi:include href="Video/video.xml" xpointer="element(/1)"/> <xi:include href="Video/video.xml" xpointer="element(/1)"/>
<appendix annotations="slide" xml:id="appendix">
<title>Appendix</title>
<section xml:id="addSlideInAppendix">
<title>Slides in appendix.</title>
<figure xml:id="fig_slideInAppendix">
<title>Slides in appendix</title>
<itemizedlist>
<listitem>
<para>Blah!</para>
</listitem>
<listitem>
<para>snor!</para>
</listitem>
</itemizedlist>
</figure>
</section>
</appendix>
</book> </book>
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<xsl:import href="/usr/share/xmlmind/addon/config/docbook5/xsl/html/docbook.xsl" /> <xsl:import href="/usr/share/xmlmind/addon/config/docbook5/xsl/html/docbook.xsl" />
<xsl:template match="/"> <xsl:template match="/">
<xsl:apply-templates select="//d:chapter[d:annotation[@role='slide']] | //d:section[d:annotation[@role='slide']]" mode='entry'/> <xsl:apply-templates select="//d:chapter[d:annotation[@role='slide']] | //d:section[d:annotation[@role='slide']] |
//d:appendix[d:annotation[@role='slide']]" mode='entry'/>
</xsl:template> </xsl:template>
<xsl:template match="d:chapter | d:section" mode='entry'> <xsl:template match="d:chapter | d:section | d:appendix" mode='entry'>
<xsl:result-document method="xhtml" encoding="utf-8" href="Slides/{@xml:id}.html" indent="no"> <xsl:result-document method="xhtml" encoding="utf-8" href="Slides/{@xml:id}.html" indent="no">
<html lang="en"> <html lang="en">
<head> <head>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</xsl:template> </xsl:template>
<xsl:template match="db:chapter/db:title | db:section/db:title"> <xsl:template match="db:chapter/db:title | db:section/db:title | db:appendix/db:title">
<xsl:copy-of select="."/> <xsl:copy-of select="."/>
<xsl:for-each select="parent::*[contains(@annotations, 'slide') or descendant::*[contains(@annotations, 'slide')]]"> <xsl:for-each select="parent::*[contains(@annotations, 'slide') or descendant::*[contains(@annotations, 'slide')]]">
<para> <para>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment