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

Generating link to NodeBB topic injection

parent ad200d0e
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="d">
<xsl:import href="../../docbook-xsl/xhtml/chunk.xsl"/>
<xsl:include href="common.xsl"/>
<xsl:output indent="yes" method="xml"/>
<xsl:variable name="hdmTopicIdPrefix" select="'goiklecture'"/>
<xsl:template match="/">
<map>
<xsl:apply-templates select=".//d:qandaset"/>
</map>
</xsl:template>
<xsl:template match="d:qandaset">
<xsl:param name="linkend.targets" select="key('id',@linkend)"/>
<xsl:param name="target" select="($linkend.targets)[1]"/>
<xsl:param name="referrer" select="."/>
<entry >
<xsl:attribute name="id">
<xsl:value-of select="$hdmTopicIdPrefix"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="@xml:id"/>
</xsl:attribute>
<xsl:variable name="title">
<xsl:apply-templates select="." mode="selectOwnOrInheritedTitle"/>
</xsl:variable>
<title>
<xsl:text>Exercise "</xsl:text>
<xsl:value-of select="$title"/>
<xsl:text>"</xsl:text>
</title>
<content>
<xsl:text>Discussing [Exercise "</xsl:text>
<xsl:value-of select="$title"/>
<xsl:text>"](https://freedocs.mi.hdm-stuttgart.de/</xsl:text>
<xsl:call-template name="href.target.uri"/>
<xsl:text>)</xsl:text>
</content>
</entry>
</xsl:template>
</xsl:stylesheet>
......@@ -18,6 +18,7 @@ callout.graphics=0 \
callout.unicode=1 \
graphicsize.use.img.src.path=1 \
highlight.source=1 \
use.id.as.filename=1 \
id.warnings=1 \
olink.debug=1
......@@ -70,10 +71,14 @@ SAXONCMD=java -cp "${DBOOK_XSL}/tools/lib/saxon9he.jar:/usr/share/java/xercesImp
# Docbook related build rules
#
# Basic profiling
# #${SAXON6CMD} $< ${DBOOK_XSL_PREPROCESS}/Xsl/docbook2topics.xsl ${dbookXslWebhelpParam} > ${*}.topics.xml
%.print.xml %.html.xml: %.xml
mkdir -p $(@D); ln -sf /usr/share/hdmwebhelp/extern $(@D)/..
${SAXONCMD} -s:$(<F) \
-xsl:${DBOOK_XSL_PREPROCESS}/Xsl/docbook2docbook.xsl > ${*}.xml
${SAXONCMD} -s:$*.xml \
-xsl:${DBOOK_XSL_PREPROCESS}/Xsl/docbook2topics.xsl ${dbookXslWebhelpParam} > ${*}.topics.xml
${SAXONCMD} -s:$*.xml \
-xsl:${DBOOK_XSL_PREPROCESS}/Xsl/docbook2html.xsl > ${*}.html.xml
${SAXONCMD} -s:$*.xml \
......
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