summaryrefslogtreecommitdiffstats
path: root/menus/menus.xsl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:30:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:30:19 +0000
commit5c1676dfe6d2f3c837a5e074117b45613fd29a72 (patch)
treecbffb45144febf451e54061db2b21395faf94bfe /menus/menus.xsl
parentInitial commit. (diff)
downloadgimp-5c1676dfe6d2f3c837a5e074117b45613fd29a72.tar.xz
gimp-5c1676dfe6d2f3c837a5e074117b45613fd29a72.zip
Adding upstream version 2.10.34.upstream/2.10.34upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'menus/menus.xsl')
-rw-r--r--menus/menus.xsl54
1 files changed, 54 insertions, 0 deletions
diff --git a/menus/menus.xsl b/menus/menus.xsl
new file mode 100644
index 0000000..68495c7
--- /dev/null
+++ b/menus/menus.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- This is an XSL transformation that we use to generate XML menu
+ files. So far it contains a template to generate a menubar and a
+ popup with identical content.
+ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:param name="unstable-menus" />
+
+ <xsl:output method="xml"
+ version="1.0"
+ encoding="utf-8"
+ indent="yes"
+ doctype-system="gtkuimanager.dtd" />
+
+ <xsl:template match="/">
+ <xsl:comment> This file is automatically generated. Do not edit! </xsl:comment>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="menubar-and-popup">
+ <menubar>
+ <xsl:attribute name="action"><xsl:value-of select="@action-name"/>-menubar</xsl:attribute>
+ <xsl:apply-templates />
+ </menubar>
+ <menubar name="dummy-menubar">
+ <menu>
+ <xsl:attribute name="action"><xsl:value-of select="@action-name"/>-popup</xsl:attribute>
+ <xsl:apply-templates />
+ </menu>
+ </menubar>
+ </xsl:template>
+
+ <xsl:template match="menuitems">
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <!-- need to strip the XInclude namespace declaration from the ui element -->
+ <xsl:template match="ui">
+ <ui>
+ <xsl:apply-templates />
+ </ui>
+ </xsl:template>
+
+ <xsl:template match="@*|node()" name="identity">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>