Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Helman2014-09-04 13:35:52 +0000
committerAchim Loerke2014-10-13 09:29:38 +0000
commit3d2658c00aee6e353b7bca95854a048f4ce9645e (patch)
treeca84fdc1073ad5ee2badf5060e657502ad13533b /org.eclipse.jubula.documentation.xsl
parent84ad6085ed5e10bd98b30d4b5c7c911982a220d8 (diff)
downloadorg.eclipse.jubula.core-3d2658c00aee6e353b7bca95854a048f4ce9645e.tar.gz
org.eclipse.jubula.core-3d2658c00aee6e353b7bca95854a048f4ce9645e.tar.xz
org.eclipse.jubula.core-3d2658c00aee6e353b7bca95854a048f4ce9645e.zip
Migration of documentation from LaTeX to Docbook
Signed-off-by: Sebastian Helman <Sebastian.Helman@bredex.de>
Diffstat (limited to 'org.eclipse.jubula.documentation.xsl')
-rw-r--r--org.eclipse.jubula.documentation.xsl/custom/generatecontexts.xsl74
-rw-r--r--org.eclipse.jubula.documentation.xsl/custom/jubulatemplates.xsl70
-rw-r--r--org.eclipse.jubula.documentation.xsl/custom/jubulatemplates_html.xsl70
3 files changed, 214 insertions, 0 deletions
diff --git a/org.eclipse.jubula.documentation.xsl/custom/generatecontexts.xsl b/org.eclipse.jubula.documentation.xsl/custom/generatecontexts.xsl
new file mode 100644
index 000000000..b1660f0b3
--- /dev/null
+++ b/org.eclipse.jubula.documentation.xsl/custom/generatecontexts.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:d="http://docbook.org/ns/docbook">
+
+ <xsl:import href="../docbook-xsl_reduced/eclipse/eclipse.xsl"/>
+
+ <xsl:template match="/">
+ <!-- Call original code from the imported stylesheet -->
+ <xsl:apply-imports/>
+
+ <!-- Call custom templates for the contexts.xml -->
+ <xsl:call-template name="contexts.xml"/>
+ </xsl:template>
+
+ <!-- Template for creating auxiliary contexts.xml file -->
+ <xsl:template name="contexts.xml">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="'contexts.xml'"/>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="encoding" select="'utf-8'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="content">
+
+ <contexts>
+
+ <!-- Get context for all children of the root element -->
+ <xsl:apply-templates select="/*/*" mode="contexts.xml"/>
+
+ </contexts>
+
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Template which converts all anchors with the role
+ 'helpid' into one entry in the contexts file -->
+ <xsl:template
+ match="d:anchor[@role='helpid']"
+ mode="contexts.xml">
+
+ <xsl:if test="(@id)">
+
+ <!-- Get the title of the current element -->
+ <xsl:variable name="title">
+ <xsl:apply-templates select=".." mode="title.markup"/>
+ </xsl:variable>
+
+ <!-- Get HTML filename for the current element -->
+ <xsl:variable name="dir">
+ <xsl:call-template name="dbhtml-dir"/>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
+ </xsl:variable>
+
+ <!-- Create ToC entry for the current node and process its
+ container-type children further -->
+ <context id="{@id}">
+ <description><xsl:value-of select="."/></description>
+ <topic label="{$title}" href="{$base.dir}/{$dir}{$filename}"/>
+ </context>
+ </xsl:if>
+
+ <xsl:apply-templates
+ select="d:anchor[@role='helpid']"
+ mode="contexts.xml"/>
+
+ </xsl:template>
+
+ <!-- Default processing in the contexts.xml mode is no processing -->
+ <xsl:template match="text()" mode="contexts.xml"/>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates.xsl b/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates.xsl
new file mode 100644
index 000000000..3d2c37c87
--- /dev/null
+++ b/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates.xsl
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:d="http://docbook.org/ns/docbook"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<xsl:import href="generatecontexts.xsl"/>
+
+<xsl:template match="d:para[@role='warning']">
+ <p>
+ <table>
+ <colgroup>
+ <col/>
+ <col/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td>
+ <img align="bottom" width="102" height="89" src="../images/img1.jpg"/>
+ </td>
+ <td class="topbotline"><span class="strong"><strong><xsl:apply-templates/></strong></span></td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+</xsl:template>
+
+<xsl:template match="d:para[@role='tip']">
+ <p>
+ <table>
+ <colgroup>
+ <col/>
+ <col/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td>
+ <img align="bottom" width="100" height="91" src="../images/img2.jpg"/>
+ </td>
+ <td class="topbotline"><span class="strong"><strong><xsl:apply-templates/></strong></span></td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+</xsl:template>
+
+<xsl:template match="d:mediaobject[@role='icon']">
+ <span class="inlinemediaobject">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="@file"/>
+ </xsl:attribute>
+ </img>
+ </span>
+</xsl:template>
+
+<xsl:template match="processing-instruction('linebreak')">
+ <br/>
+</xsl:template>
+
+<xsl:template name="footer.navigation">
+ <br/>
+ <hr/>
+
+ <address>Copyright BREDEX GmbH 2014. Made available under the Eclipse Public License v1.0.</address>
+ <br/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates_html.xsl b/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates_html.xsl
new file mode 100644
index 000000000..6af750bce
--- /dev/null
+++ b/org.eclipse.jubula.documentation.xsl/custom/jubulatemplates_html.xsl
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:d="http://docbook.org/ns/docbook"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<xsl:import href="../docbook-xsl_reduced/html/docbook.xsl"/>
+
+<xsl:template match="d:para[@role='warning']">
+ <p>
+ <table>
+ <colgroup>
+ <col/>
+ <col/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td>
+ <img align="bottom" width="102" height="89" src="../images/img1.jpg"/>
+ </td>
+ <td class="topbotline"><span class="strong"><strong><xsl:apply-templates/></strong></span></td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+</xsl:template>
+
+<xsl:template match="d:para[@role='tip']">
+ <p>
+ <table>
+ <colgroup>
+ <col/>
+ <col/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td>
+ <img align="bottom" width="100" height="91" src="../images/img2.jpg"/>
+ </td>
+ <td class="topbotline"><span class="strong"><strong><xsl:apply-templates/></strong></span></td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+</xsl:template>
+
+<xsl:template match="d:mediaobject[@role='icon']">
+ <span class="inlinemediaobject">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="@file"/>
+ </xsl:attribute>
+ </img>
+ </span>
+</xsl:template>
+
+<xsl:template match="processing-instruction('linebreak')">
+ <br/>
+</xsl:template>
+
+<xsl:template name="footer.navigation">
+ <br/>
+ <hr/>
+
+ <address>Copyright BREDEX GmbH 2014. Made available under the Eclipse Public License v1.0.</address>
+ <br/>
+</xsl:template>
+
+</xsl:stylesheet>

Back to the top