diff --git a/ws/Docbook/CustomLayer/Common/common.xsl b/ws/Docbook/CustomLayer/Common/common.xsl index 3377e3c12a5502199e77fd6a9ef1ff40da8e5430..7769cc72a9eaae327d3db36d4f2f74c93cd6fdfa 100644 --- a/ws/Docbook/CustomLayer/Common/common.xsl +++ b/ws/Docbook/CustomLayer/Common/common.xsl @@ -2,6 +2,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:d="http://docbook.org/ns/docbook" + xmlns:m="http://www.w3.org/1998/Math/MathML" exclude-result-prefixes="d xs" version="2.0"> @@ -65,5 +66,25 @@ </div> <!--goik: "footer" clickable answer modification --> </td> </tr> - </xsl:template> + </xsl:template> + + <!-- avoid namespace prefix since some epub readers get confused. Credits to + http://stackoverflow.com/questions/16810039/how-to-remove-namespace-prefix-leaving-namespace-value-xslt + --> + <xsl:template match="m:math[not(@alttext)]" priority="2"> + <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> + <xsl:attribute name="alttext">math formula</xsl:attribute> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="m:*" priority="1"> + <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + </xsl:stylesheet> \ No newline at end of file diff --git a/ws/Docbook/CustomLayer/epub/hdmextensions.xsl b/ws/Docbook/CustomLayer/epub/hdmextensions.xsl index f6a2393cda90118e969491a90a032a72f5c8db59..c01ec9e41d6bf41e233e0811f919657907111154 100644 --- a/ws/Docbook/CustomLayer/epub/hdmextensions.xsl +++ b/ws/Docbook/CustomLayer/epub/hdmextensions.xsl @@ -14,25 +14,7 @@ <xsl:param name="node"/> <xsl:copy-of select="$toggleDisplayScript"/> </xsl:template> - - <!-- avoid namespace prefix since some epub readers get confused. Credits to - http://stackoverflow.com/questions/16810039/how-to-remove-namespace-prefix-leaving-namespace-value-xslt - --> - <xsl:template match="m:math[not(@alttext)]" priority="2"> - <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> - <xsl:attribute name="alttext">math formula</xsl:attribute> - <xsl:copy-of select="@*"/> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="m:*" priority="1"> - <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> - <xsl:copy-of select="@*"/> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - + <xsl:template match="d:videoobject" priority="1"> <video controls="controls" preload="auto"> <xsl:attribute name="title"> diff --git a/ws/Docbook/CustomLayer/slide/slideHdm.xsl b/ws/Docbook/CustomLayer/slide/slideHdm.xsl index 8877f8f603f0d95d8be47a05b5d99701784bca0b..b0532222f3ffa1e6cbca93802cda25a32296e6c9 100644 --- a/ws/Docbook/CustomLayer/slide/slideHdm.xsl +++ b/ws/Docbook/CustomLayer/slide/slideHdm.xsl @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:d="http://docbook.org/ns/docbook"> <xsl:import href="../../docbook-xsl/xhtml/chunk.xsl"/> @@ -11,24 +10,6 @@ <xsl:import href="../Common/common.xsl"/> - <!-- avoid namespace prefix since some epub readers get confused. Credits to - http://stackoverflow.com/questions/16810039/how-to-remove-namespace-prefix-leaving-namespace-value-xslt - --> - <xsl:template match="m:math[not(@alttext)]" priority="2"> - <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> - <xsl:attribute name="alttext">math formula</xsl:attribute> - <xsl:copy-of select="@*"/> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - - <xsl:template match="m:*" priority="1"> - <xsl:element name="{local-name()}" namespace="http://www.w3.org/1998/Math/MathML"> - <xsl:copy-of select="@*"/> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - <xsl:template match="/"> <xsl:apply-templates select="//d:chapter[contains(@annotations, 'slide')]| //d:section[contains(@annotations, 'slide')]" @@ -41,13 +22,6 @@ <xsl:template match="d:chapter | d:section" mode='selectedSlideSet'> <xsl:result-document method="xhtml" encoding="utf-8" href="Slides/{@xml:id}.html" indent="no"> - <xsl:message> - <xsl:text>Processing </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>, id=</xsl:text> - <xsl:value-of select="@xml:id"/> - </xsl:message> - <html lang="en"> <head> <title> @@ -106,12 +80,6 @@ <xsl:template match="d:chapter | d:section" mode='slideSet'> <xsl:result-document method="xhtml" encoding="utf-8" href="Slides/{@xml:id}.html" indent="no"> - <xsl:message> - <xsl:text>Processing </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>, id=</xsl:text> - <xsl:value-of select="@xml:id"/> - </xsl:message> <html lang="en"> <head> @@ -176,7 +144,6 @@ <xsl:template match="d:title" mode="slideDescendants"/> <xsl:template match="*" mode="slideDescendants"> - <xsl:message>AAAAAAAAAAAAA <xsl:value-of select="name(.)"/></xsl:message> <section> <xsl:attribute name="xml:id"> <xsl:choose>