From 11aa32f8dcd9c1ebf8e48129827fae9eddceb2ca Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Fri, 4 Dec 2015 00:29:34 +0100 Subject: [PATCH] New Xmlmind configuration --- ws/Docbook/Config/eclipse_custom.xsl | 2 +- ws/Docbook/Extensions/Tdata/fig.xml | 22 ++++- .../docbook5/xsl/common/hdmextensions.xsl | 32 ++++--- ws/Xmlmind/Patch/010_makeLinksBlue.patch | 2 +- .../Patch/040_hdmBusinessIntegrityRules.patch | 1 - ws/Xmlmind/Patch/050_preferEclipse3.patch | 24 ----- .../Patch/080_matmlJaxVisualization.patch | 93 +++++-------------- 7 files changed, 67 insertions(+), 109 deletions(-) diff --git a/ws/Docbook/Config/eclipse_custom.xsl b/ws/Docbook/Config/eclipse_custom.xsl index 4321aac1b..e88893463 100644 --- a/ws/Docbook/Config/eclipse_custom.xsl +++ b/ws/Docbook/Config/eclipse_custom.xsl @@ -40,7 +40,7 @@ xmlns:d="http://docbook.org/ns/docbook" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:NodeInfo="http://org.apache.xalan.lib.NodeInfo"> - <xsl:import href="xxe-config:docbook5/xsl/eclipse/eclipse3.xsl"/> + <xsl:import href="xxe-config:docbook5/xslCustom/eclipseHdm.xsl"/> <xsl:param name="generate.toc">appendix toc,title article/appendix nop diff --git a/ws/Docbook/Extensions/Tdata/fig.xml b/ws/Docbook/Extensions/Tdata/fig.xml index e96f75556..8e8b5d983 100644 --- a/ws/Docbook/Extensions/Tdata/fig.xml +++ b/ws/Docbook/Extensions/Tdata/fig.xml @@ -127,7 +127,7 @@ </mediaobject> </figure> - <para>What about <acronym>SVG</acronym> ??</para> + <para>What about <acronym xlink:href="http://we">SVG</acronym> ??</para> <mediaobject> <imageobject> @@ -178,4 +178,24 @@ </mediaobject> </informalfigure> </chapter> + + <chapter xml:id="qandaset"> + <title>Question ans answer sets</title> + + <qandaset defaultlabel="qanda" xml:id="firstQuestion"> + <title>First question</title> + + <qandadiv> + <qandaentry xml:id="q1"> + <question> + <para>My first question</para> + </question> + + <answer> + <para>My first answer</para> + </answer> + </qandaentry> + </qandadiv> + </qandaset> + </chapter> </book> diff --git a/ws/Xmlmind/Files/addon/config/docbook5/xsl/common/hdmextensions.xsl b/ws/Xmlmind/Files/addon/config/docbook5/xsl/common/hdmextensions.xsl index afba6acdb..9480303c2 100644 --- a/ws/Xmlmind/Files/addon/config/docbook5/xsl/common/hdmextensions.xsl +++ b/ws/Xmlmind/Files/addon/config/docbook5/xsl/common/hdmextensions.xsl @@ -1,17 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:d="http://docbook.org/ns/docbook" - xmlns:m="http://www.w3.org/1998/Math/MathML" - exclude-result-prefixes="d" - version="1.1"> + xmlns:d="http://docbook.org/ns/docbook" + xmlns:m="http://www.w3.org/1998/Math/MathML" + exclude-result-prefixes="d" + version="1.1"> + + <xsl:template name="hdm.user.content"> + <xsl:if test="//m:math"> + <script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script> + <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> + <xsl:comment>Self closing tags disallowed!</xsl:comment> + </script> + </xsl:if> + </xsl:template> + + <xsl:template match="mml:*"> + <xsl:element name="{local-name()}"> + <xsl:copy-of select="@*" /> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> - <xsl:template name="hdm.head.content"> - <xsl:if test="//m:math"> - <script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script> - <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> - <xsl:comment>Self closing tags disallowed!</xsl:comment> - </script> - </xsl:if> - </xsl:template> </xsl:stylesheet> diff --git a/ws/Xmlmind/Patch/010_makeLinksBlue.patch b/ws/Xmlmind/Patch/010_makeLinksBlue.patch index b5be82cf8..d4bf1580a 100644 --- a/ws/Xmlmind/Patch/010_makeLinksBlue.patch +++ b/ws/Xmlmind/Patch/010_makeLinksBlue.patch @@ -7,7 +7,7 @@ +/* Goik: Links should be blue ... */ +@namespace xlink "http://www.w3.org/1999/xlink"; + -+methodname[xlink|href] { ++*[xlink|href] { + color: blue; +} + diff --git a/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch b/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch index 176850d48..d69219c88 100644 --- a/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch +++ b/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch @@ -5,7 +5,6 @@ </s:rule> </s:pattern> -</s:schema> -\ No newline at end of file + + <!-- Goik's additions --> + <s:pattern name="Mandatory title in exercise"> diff --git a/ws/Xmlmind/Patch/050_preferEclipse3.patch b/ws/Xmlmind/Patch/050_preferEclipse3.patch index 9beee9a57..21bade7fa 100644 --- a/ws/Xmlmind/Patch/050_preferEclipse3.patch +++ b/ws/Xmlmind/Patch/050_preferEclipse3.patch @@ -18,27 +18,3 @@ diff -Naur xmlmind.current/addon/config/docbook5/docbook5_convert_menu.incl xmlm </upload> </process> </command> -diff -Naur xmlmind.current/Patch/50_preferEclipse3.patch xmlmind/Patch/50_preferEclipse3.patch ---- xmlmind.current/Patch/50_preferEclipse3.patch 1970-01-01 01:00:00.000000000 +0100 -+++ xmlmind/Patch/50_preferEclipse3.patch 2015-11-27 16:19:16.505403700 +0100 -@@ -0,0 +1,20 @@ -+diff -Naur xmlmind.current/addon/config/docbook5/docbook5_convert_menu.incl xmlmind/addon/config/docbook5/docbook5_convert_menu.incl -+--- xmlmind.current/addon/config/docbook5/docbook5_convert_menu.incl 2015-11-27 15:46:36.149306817 +0100 -++++ xmlmind/addon/config/docbook5/docbook5_convert_menu.incl 2015-11-27 16:15:09.055940433 +0100 -+@@ -506,7 +506,7 @@ -+ </info> -+ </copyProcessResources> -+ -+- <transform stylesheet="xsl/eclipse/eclipse.xsl" -++ <transform stylesheet="xsl/eclipse/eclipse3.xsl" -+ file="__doc.xml" to="__doc.html"> -+ <info> -+ <label>Convert to Eclipse Help</label> -+@@ -545,6 +545,7 @@ -+ <copyFiles files="*.*" toDir="." /> -+ <copyFiles files="resources/*" toDir="resources" /> -+ <copyFiles files="images/*" toDir="images" /> -++ <copyFiles files="META-INF/*" toDir="META-INF" /> -+ </upload> -+ </process> -+ </command> diff --git a/ws/Xmlmind/Patch/080_matmlJaxVisualization.patch b/ws/Xmlmind/Patch/080_matmlJaxVisualization.patch index 8e8b5fc81..719577819 100644 --- a/ws/Xmlmind/Patch/080_matmlJaxVisualization.patch +++ b/ws/Xmlmind/Patch/080_matmlJaxVisualization.patch @@ -1,15 +1,3 @@ ---- xmlmind.preMathml/addon/config/docbook5/xsl/html/chunk-common.xsl 2015-10-19 00:20:37.204988407 +0200 -+++ xmlmind.mathml/addon/config/docbook5/xsl/html/chunk-common.xsl 2015-10-18 22:38:31.431870282 +0200 -@@ -1556,6 +1556,9 @@ - </xsl:if> - - <xsl:call-template name="user.head.content"/> -+ -+ <xsl:call-template name="hdm.head.content"/> <!-- Goik Mathjax --> -+ - </head> - </xsl:template> - --- xmlmind.preMathml/addon/config/docbook5/xsl/html/docbook.xsl 2015-10-19 00:20:37.204988407 +0200 +++ xmlmind.mathml/addon/config/docbook5/xsl/html/docbook.xsl 2015-10-18 22:50:23.202956958 +0200 @@ -75,6 +75,7 @@ @@ -20,34 +8,6 @@ <xsl:param name="stylesheet.result.type" select="'html'"/> <xsl:param name="htmlhelp.output" select="0"/> -@@ -524,6 +525,9 @@ - <xsl:call-template name="user.head.content"> - <xsl:with-param name="node" select="$doc"/> - </xsl:call-template> -+ -+ <xsl:call-template name="hdm.head.content"/> <!-- Goik Mathjax --> -+ - </head> - <body> - <xsl:call-template name="body.attributes"/> ---- xmlmind.preMathml/addon/config/docbook5/xsl/xhtml-1_1/chunk-common.xsl 2015-10-19 00:20:37.204988407 +0200 -+++ xmlmind.mathml/addon/config/docbook5/xsl/xhtml-1_1/chunk-common.xsl 2015-10-19 00:13:33.504864394 +0200 -@@ -1193,6 +1193,8 @@ - </xsl:if> - - <xsl:call-template name="user.head.content"/> -+ -+ <xsl:call-template name="hdm.head.content"/> <!-- Goik Mathjax --> - </head> - </xsl:template> - -@@ -1613,4 +1615,4 @@ - </xsl:choose> - </xsl:template> - --</xsl:stylesheet> -\ No newline at end of file -+</xsl:stylesheet> --- xmlmind.preMathml/addon/config/docbook5/xsl/xhtml-1_1/docbook.xsl 2015-10-19 00:20:37.204988407 +0200 +++ xmlmind.mathml/addon/config/docbook5/xsl/xhtml-1_1/docbook.xsl 2015-10-19 00:14:28.054940293 +0200 @@ -69,6 +69,7 @@ @@ -58,40 +18,35 @@ <xsl:param name="stylesheet.result.type" select="'xhtml'"/> <xsl:param name="htmlhelp.output" select="0"/> -@@ -491,6 +492,8 @@ - <xsl:call-template name="user.head.content"> - <xsl:with-param name="node" select="$doc"/> - </xsl:call-template> -+ -+ <xsl:call-template name="hdm.head.content"/> <!-- Goik Mathjax --> - </head> - <body> - <xsl:call-template name="body.attributes"/> ---- xmlmind.preMathml/addon/config/docbook5/xsl/xhtml-1_1/math.xsl 2015-10-19 00:20:37.208988565 +0200 -+++ xmlmind.mathml/addon/config/docbook5/xsl/xhtml-1_1/math.xsl 2015-10-19 00:06:39.805120911 +0200 -@@ -29,15 +29,23 @@ - </span> - </xsl:template> - --<!-- "Support" for MathML --> +--- xmlmind.orig/addon/config/docbook5/xsl/xhtml-1_1/math.xsl 2013-03-17 21:08:24.000000000 +0100 ++++ xmlmind/addon/config/docbook5/xsl/xhtml-1_1/math.xsl 2015-12-03 16:18:46.416180173 +0100 +@@ -32,10 +32,10 @@ + <!-- "Support" for MathML --> <xsl:template match="mml:*"> +- <xsl:copy> +- <xsl:copy-of select="@*"/> + <xsl:element name="{local-name()}"> + <xsl:copy-of select="@*" /> -+ <xsl:apply-templates/> -+ </xsl:element> -+</xsl:template> -+ -+<!-- "Support" for MathML --> -+<!-- -+<xsl:template match="mml:*"> - <xsl:copy> - <xsl:copy-of select="@*"/> <xsl:apply-templates/> - </xsl:copy> +- </xsl:copy> ++ </xsl:element> </xsl:template> -- -+--> + <!-- Support for TeX math in alt --> +--- xmlmind.orig/addon/config/docbook5/xsl/html/math.xsl 2013-03-17 21:08:28.000000000 +0100 ++++ xmlmind/addon/config/docbook5/xsl/html/math.xsl 2015-12-03 16:15:10.432189346 +0100 +@@ -33,10 +33,10 @@ + <!-- "Support" for MathML --> + + <xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML"> +- <xsl:copy> +- <xsl:copy-of select="@*"/> ++ <xsl:element name="{local-name()}"> ++ <xsl:copy-of select="@*" /> + <xsl:apply-templates/> +- </xsl:copy> ++ </xsl:element> + </xsl:template> - <xsl:template match="*" mode="collect.tex.math"> + <!-- Support for TeX math in alt --> \ No newline at end of file -- GitLab