Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3 - License, v. 2.0. If a copy of the MPL was not distributed with this
4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
6 <xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
9 <!-- Any elements not otherwise specified will be stripped but the contents
10 will be displayed. All attributes are stripped from copied elements. -->
12 <!-- Block these elements and their contents -->
13 <xsl:template match="xhtml:head|xhtml:script|xhtml:style">
14 </xsl:template>
16 <!-- Allowable styling elements -->
17 <xsl:template match="xhtml:b|xhtml:i|xhtml:em|xhtml:strong|xhtml:u|xhtml:q|xhtml:sub|xhtml:sup|xhtml:code">
18 <xsl:copy><xsl:apply-templates/></xsl:copy>
19 </xsl:template>
21 <!-- Allowable block formatting elements -->
22 <xsl:template match="xhtml:h1|xhtml:h2|xhtml:h3|xhtml:p|xhtml:div|xhtml:blockquote|xhtml:pre">
23 <xsl:copy><xsl:apply-templates/></xsl:copy>
24 </xsl:template>
26 <!-- Allowable list formatting elements -->
27 <xsl:template match="xhtml:ul|xhtml:ol|xhtml:li|xhtml:dl|xhtml:dt|xhtml:dd">
28 <xsl:copy><xsl:apply-templates/></xsl:copy>
29 </xsl:template>
31 <!-- These elements are copied and their contents dropped -->
32 <xsl:template match="xhtml:br|xhtml:hr">
33 <xsl:copy/>
34 </xsl:template>
36 <!-- The root document -->
37 <xsl:template match="/">
38 <xhtml:body><xsl:apply-templates/></xhtml:body>
39 </xsl:template>
41 </xsl:stylesheet>