diff options
Diffstat (limited to 'patches/src680/buildfix-new-xslt.diff')
-rw-r--r-- | patches/src680/buildfix-new-xslt.diff | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/src680/buildfix-new-xslt.diff b/patches/src680/buildfix-new-xslt.diff new file mode 100644 index 000000000..26e7fdb5a --- /dev/null +++ b/patches/src680/buildfix-new-xslt.diff @@ -0,0 +1,41 @@ +--- filter/source/config/fragments/langfilter.xsl.org 2005-10-27 20:38:20.000000000 +0200 ++++ filter/source/config/fragments/langfilter.xsl 2005-10-27 20:38:44.000000000 +0200 +@@ -2,19 +2,35 @@ + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oor="http://openoffice.org/2001/registry"> + <xsl:output method="xml" indent="yes" omit-xml-declaration="no" version="1.0" encoding="UTF-8"/> + <xsl:param name="lang"/> +-<xsl:template match="*[.//*[@xml:lang=$lang]] | @*"> ++<xsl:template match="*"> ++ <xsl:if test="count(.//*[@xml:lang=$lang])>0"> + <xsl:copy> + <xsl:apply-templates select="*|@*"/> + </xsl:copy> ++ </xsl:if> + </xsl:template> + +-<xsl:template match="value[@xml:lang=$lang] | text()[../@xml:lang=$lang]"> ++<xsl:template match="@*"> ++ <xsl:copy> ++ <xsl:apply-templates select="*|@*"/> ++ </xsl:copy> ++</xsl:template> ++ ++<xsl:template match="value"> ++ <xsl:if test="@xml:lang=$lang"> + <xsl:copy> + <xsl:apply-templates select="@*|text()"/> + </xsl:copy> ++ </xsl:if> + </xsl:template> + +-<xsl:template match="text()"/> ++<xsl:template match="text()"> ++ <xsl:if test="../@xml:lang=$lang"> ++ <xsl:copy> ++ <xsl:apply-templates select="@*|text()"/> ++ </xsl:copy> ++ </xsl:if> ++</xsl:template> + + + </xsl:stylesheet> |