|
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/. --> |
|
5 |
|
6 <xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" |
|
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
8 |
|
9 <!-- Any elements not otherwise specified will be stripped but the contents |
|
10 will be displayed. All attributes are stripped from copied elements. --> |
|
11 |
|
12 <!-- Block these elements and their contents --> |
|
13 <xsl:template match="xhtml:head|xhtml:script|xhtml:style"> |
|
14 </xsl:template> |
|
15 |
|
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> |
|
20 |
|
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> |
|
25 |
|
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> |
|
30 |
|
31 <!-- These elements are copied and their contents dropped --> |
|
32 <xsl:template match="xhtml:br|xhtml:hr"> |
|
33 <xsl:copy/> |
|
34 </xsl:template> |
|
35 |
|
36 <!-- The root document --> |
|
37 <xsl:template match="/"> |
|
38 <xhtml:body><xsl:apply-templates/></xhtml:body> |
|
39 </xsl:template> |
|
40 |
|
41 </xsl:stylesheet> |