File: keep-png-only.xsl

package info (click to toggle)
gdk-pixbuf 2.36.5-2+deb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 29,812 kB
  • sloc: ansic: 34,006; sh: 5,235; makefile: 1,129; xml: 459; asm: 453; python: 193; perl: 56; sed: 16
file content (25 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:smi="http://www.freedesktop.org/standards/shared-mime-info">

<!--
Since a namespace is declared in the XML document, this stylesheet
needs to declare it as well to be able to match the various elements,
that's why there's xmlns:smi above, and smi:mime-* below.
-->

<!-- Identity template. -->
<xsl:template match="@*|node()">
 <xsl:copy>
  <xsl:apply-templates select="@*|node()"/>
 </xsl:copy>
</xsl:template>

<!-- Remove unneeded elements. -->
<xsl:template match='smi:mime-type[@type!="image/png"]' />

<!-- Avoid plenty of empty lines. -->
<xsl:strip-space elements="smi:mime-info" />

</xsl:stylesheet>