office-gobmx/readlicense_oo/license/license_html.xsl
Tamas Bunth 7a9f6df7fb single source file for licensing info with conditional text
... for easier maintenance. This commit only introduces the
framework. Follow up commits will update the license file.
Advantages:
* single source, multiple outputs (html, txt)
* conditional text, i.e. output will not include license
  terms of components that are not configured in the build

Change-Id: I0ffad41119228a0a26fd1b6ce19930ca6085adb2
Reviewed-on: https://gerrit.libreoffice.org/69396
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-03-19 15:16:51 +01:00

32 lines
973 B
XML

<?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>