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

Image path corrections

parent 07d4fd57
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,16 @@
<para>Some sql code:</para>
<informalequation>
<m:math display="block">
<m:mroot>
<m:mi>x</m:mi>
<m:mn>3</m:mn>
</m:mroot>
</m:math>
</informalequation>
<programlisting language="none">SELECT * FROM Table
......@@ -41,7 +51,7 @@
<mediaobject>
<imageobject>
<imagedata fileref="Fig/jdbcread.fig"/>
<imagedata fileref="Fig/jdbcread.fig" scale="60"/>
</imageobject>
</mediaobject>
</figure>
......
......@@ -28,6 +28,20 @@
</xsl:choose>
</xsl:template>
<xsl:template match="db:imagedata">
<db:imagedata>
<xsl:attribute name="fileref">
<xsl:text>../../</xsl:text> <!-- Two directories: Xmlming honours the @base attriute! -->
<xsl:call-template name="hdm.get.leftmost.of.seperator">
<xsl:with-param name="path" select="ancestor::*/@xml:base"/>
<xsl:with-param name="seperator" select="'/'"/>
</xsl:call-template>
<xsl:text>/</xsl:text>
<xsl:value-of select="@fileref"/>
</xsl:attribute>
</db:imagedata>
</xsl:template>
<xsl:template match="db:figure[db:mediaobject/db:imageobject]/db:title">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
......@@ -53,44 +67,44 @@
</xsl:if>
</para>
</xsl:template>
<!--
<xsl:template match="db:answer">
<!--
<xsl:template match="db:answer">
<db:answer>
<xsl:variable name="proximaParentId" select="ancestor::*[@xml:id and position()=1]/@xml:id"/>
<xsl:choose>
<xsl:when test="following::*[@xml:id=$lastAnswerId] or ancestor::*[@xml:id=$lastAnswerId]">
<xsl:apply-templates select="@* | node()"/>
</xsl:when>
<xsl:otherwise>
<para>Answer id=<xsl:value-of select="ancestor::*[@xml:id][1]/@xml:id"/> not yet published.</para>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="proximaParentId" select="ancestor::*[@xml:id and position()=1]/@xml:id"/>
<xsl:choose>
<xsl:when test="following::*[@xml:id=$lastAnswerId] or ancestor::*[@xml:id=$lastAnswerId]">
<xsl:apply-templates select="@* | node()"/>
</xsl:when>
<xsl:otherwise>
<para>Answer id=<xsl:value-of select="ancestor::*[@xml:id][1]/@xml:id"/> not yet published.</para>
</xsl:otherwise>
</xsl:choose>
</db:answer>
</xsl:template>
-->
</xsl:template>
-->
<xsl:template match="db:part">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<xsl:if test=".//db:qandaset">
<appendix>
<title>
<xsl:text>List of exercise sets in </xsl:text>
<xsl:value-of select="db:title" />
</title>
<table border="1" xml:id="{@xml:id}solutionsExercise">
<caption>Index of exercises</caption>
<col width="25%" />
<col width="45%" />
<col width="30%" />
<tr>
<th>Chapter</th>
<th>Exercise title / page</th>
<th>Status of completion</th>
</tr>
<xsl:for-each select=".//db:chapter[.//db:qandaset]">
<xsl:variable name="qandaSets" select=".//db:qandaset"/>
<appendix>
<title>
<xsl:text>List of exercise sets in </xsl:text>
<xsl:value-of select="db:title" />
</title>
<table border="1" xml:id="{@xml:id}solutionsExercise">
<caption>Index of exercises</caption>
<col width="25%" />
<col width="45%" />
<col width="30%" />
<tr>
<th>Chapter</th>
<th>Exercise title / page</th>
<th>Status of completion</th>
</tr>
<xsl:for-each select=".//db:chapter[.//db:qandaset]">
<xsl:variable name="qandaSets" select=".//db:qandaset"/>
<!-- Top level chapter + first exercise's title -->
<tr>
<td valign="top" rowspan="{count($qandaSets)}">
......@@ -107,18 +121,18 @@
<tr>
<td>
<xsl:apply-templates select="."
mode="selectOwnOrInheritedTitle"/>
mode="selectOwnOrInheritedTitle"/>
</td>
<td/>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</appendix>
</xsl:for-each>
</table>
</appendix>
</xsl:if>
</xsl:copy>
</xsl:template>
<xsl:template match="db:qandaset" mode="selectOwnOrInheritedTitle">
<link linkend="{@xml:id}"> <!-- xrefstyle="template:%n, %t" -->
<xsl:choose>
......@@ -150,12 +164,12 @@
</xsl:template>
<!-- Excluding non-referenced <bibliography> and <glossary> elements -->
<xsl:template match="db:bibliography/db:biblioentry[not(key('internRef', @xml:id))]">
<xsl:comment>
<xsl:text>Excluding non referenced bibliography entry '</xsl:text>
<xsl:value-of select="db:abbrev"/>
<xsl:text>', @xml:id='</xsl:text>
<xsl:text>Excluding non referenced bibliography entry '</xsl:text>
<xsl:value-of select="db:abbrev"/>
<xsl:text>', @xml:id='</xsl:text>
<xsl:value-of select="@xml:id"/>
<xsl:text>'</xsl:text>
</xsl:comment>
......@@ -163,28 +177,28 @@
<xsl:template match="db:glossary/db:glosslist//db:glossentry[not(key('internRef', @xml:id)) and not(key('internRef', .//*/@xml:id))]">
<xsl:comment>
<xsl:text>Excluding non referenced glossary entry '</xsl:text>
<xsl:value-of select="db:glossterm"/>
<xsl:text>', @xml:id='</xsl:text>
<xsl:text>Excluding non referenced glossary entry '</xsl:text>
<xsl:value-of select="db:glossterm"/>
<xsl:text>', @xml:id='</xsl:text>
<xsl:value-of select="@xml:id"/>
<xsl:text>'</xsl:text>
</xsl:comment>
</xsl:comment>
</xsl:template>
<!--
<xsl:template match="db:bibliography">
<xsl:template match="db:bibliography">
<db:bibliography>
<xsl:apply-templates select="*[not(name(.) = 'biblioentry')]|db:biblioentry[key('internRef', @xml:id)]"/>
<xsl:apply-templates select="*[not(name(.) = 'biblioentry')]|db:biblioentry[key('internRef', @xml:id)]"/>
</db:bibliography>
</xsl:template>
<xsl:template match="db:glossary/db:glosslist">
</xsl:template>
<xsl:template match="db:glossary/db:glosslist">
<db:glosslist>
<xsl:apply-templates select="*[not(name(.) = 'glossentry')]|db:glossentry[key('internRef', @xml:id)]"/>
<xsl:apply-templates select="*[not(name(.) = 'glossentry')]|db:glossentry[key('internRef', @xml:id)]"/>
</db:glosslist>
</xsl:template>
-->
</xsl:template>
-->
<!-- make annotations -->
......@@ -203,8 +217,8 @@
<listitem>
<para>
<xsl:text>Maven module source code available at sub directory </xsl:text> <filename>
<xsl:value-of select="$baseDir"/>
</filename> <xsl:text> below lecture notes' source code root, see </xsl:text> <link linkend="sd1ImportMavenSolutions"> hints regarding import.</link></para>
<xsl:value-of select="$baseDir"/>
</filename> <xsl:text> below lecture notes' source code root, see </xsl:text> <link linkend="sd1ImportMavenSolutions"> hints regarding import.</link></para>
</listitem>
<listitem>
......
......@@ -52,7 +52,7 @@
</xsl:text>
<xsl:result-document method="text" encoding="utf-8" href="{$fullGenerateBasename}.tex" >
<xsl:text>\input{../../../../Sda1/Ref/Fig/pre.tex}
<xsl:text>\input{../../../Sda1/Ref/Fig/pre.tex} <!-- docbook2docbook already transformed fileref!! -->
\begin{mycenterframe}{</xsl:text>
<xsl:apply-templates select="." mode="object.title.markup.textonly"/>
<xsl:text>}
......
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