From 1c8851a2dbdf4f97f2cb8b264e0260d7a052a80b Mon Sep 17 00:00:00 2001 From: Edwin Mons Date: Wed, 31 Aug 2016 08:33:33 +0200 Subject: [PATCH] xep.xsl: Force open and close tags on script XSLT processors are allowed to choose either the self-closing form or explicit open and close tags when operating in xml mode for elements that have no text. Unfortunately, for the script element, this is not allowed (by the DTD, and conformant browsers will not accept the self-closing form). xsltproc, as used by the XSF tooling, will output the open/close tags, but other processors, such as Xalan, will choose the self-closing form. This patch adds an empty comment as a child of the script tag. This will force all XSLT processors into outputting the right form. As browsers are required to ignore the content if there is a src attribute, this will not change the behaviour. Should a browser without support for the script tag open it, all it sees is a comment. Test-Information: Transforms XEPs into readable documents in xsltproc and oXygen 9.3. --- xep.xsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xep.xsl b/xep.xsl index 27fa7719..a61db7da 100644 --- a/xep.xsl +++ b/xep.xsl @@ -43,7 +43,9 @@ OR OTHER DEALINGS IN THE SOFTWARE. - + viewport