summaryrefslogtreecommitdiffstats
path: root/readlicense_oo/license/license_html.xsl
blob: ed84527928a18ce1887e3686a07b12563badde58 (plain)
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
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/xhtml" version="1.0">

  <xsl:output method="xml"/>

  <xsl:param name="build_type" />
  <xsl:param name="no_mpl_subset" />
  <xsl:param name="os" />
  <xsl:param name="themes" />

  <xsl:template match="x:div">
    <xsl:choose>
      <xsl:when test="(
                not(contains($build_type,@class)) and
                not(contains($no_mpl_subset,@class)) and
                not(contains($os,@class)) and
                not(contains($themes,@class)) and @class)">
      <!-- do not write out license text for these externals -->
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates select="node()"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

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

</xsl:stylesheet>