Bump version to 24.04.3.4
[LibreOffice.git] / xmlhelp / util / compact.xsl
blob781ad31792965241e4ba70f97986ed44e41c7125
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 -->
10 <!-- Remove unwanted attributes or/and nodes -->
11 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
12 <xsl:output method="xml" encoding="UTF-8"/>
14 <xsl:strip-space elements="*"/>
15 <xsl:preserve-space elements="paragraph"/>
17 <!-- Copy everything -->
18 <xsl:template match="@*|node()|text()">
19 <xsl:copy>
20 <xsl:apply-templates select="@*[normalize-space()]|node()|text()"/>
21 </xsl:copy>
22 </xsl:template>
24 <!-- To remove attributes or nodes,
25 simply write a matching template that doesn't do anything.
26 Therefore, it is removed -->
27 <xsl:template match="image/@localize">
28 <xsl:copy>
29 <xsl:apply-templates select="@*[normalize-space()]|node()|text()"/>
30 </xsl:copy>
31 </xsl:template>
32 <xsl:template match="@localize"/>
33 <xsl:template match="@xml-lang"/>
34 <xsl:template match="alt"/>
35 <xsl:template match="bookmark_value"/>
36 <xsl:template match="comment()"/> <!-- Remove all XML comments -->
37 <xsl:template match="comment"/>
38 <xsl:template match="history"/>
39 <xsl:template match="image/@id"/>
40 <xsl:template match="image/@width"/>
41 <xsl:template match="image/@height"/>
42 <xsl:template match="link/@name"/>
43 <xsl:template match="paragraph/@id"/>
44 <xsl:template match="table/@id"/>
45 <xsl:template match="title/@id"/>
46 <xsl:template match="topic/@id"/>
47 <xsl:template match="topic/@indexer"/>
48 <xsl:template match="topic/@status"/>
50 </xsl:stylesheet>