2004-05-02 06:43:15 +08:00
|
|
|
<?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">
|
|
|
|
|
2011-05-27 02:44:55 +08:00
|
|
|
<xsl:param name="unstable-menus" />
|
2005-06-27 07:47:13 +08:00
|
|
|
|
2004-05-02 06:43:15 +08:00
|
|
|
<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>
|
2004-05-17 21:38:03 +08:00
|
|
|
<menubar name="dummy-menubar">
|
|
|
|
<menu>
|
|
|
|
<xsl:attribute name="action"><xsl:value-of select="@action-name"/>-popup</xsl:attribute>
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</menu>
|
|
|
|
</menubar>
|
2004-05-02 06:43:15 +08:00
|
|
|
</xsl:template>
|
|
|
|
|
2004-05-02 18:41:28 +08:00
|
|
|
<xsl:template match="menuitems">
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</xsl:template>
|
|
|
|
|
2013-04-17 02:37:08 +08:00
|
|
|
<xsl:template match="menu[@action='debug-menu']">
|
2011-05-27 02:44:55 +08:00
|
|
|
<xsl:if test="$unstable-menus='yes'">
|
2005-06-27 07:47:13 +08:00
|
|
|
<xsl:call-template name="identity" />
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
|
2004-05-02 18:41:28 +08:00
|
|
|
<!-- need to strip the XInclude namespace declaration from the ui element -->
|
|
|
|
<xsl:template match="ui">
|
|
|
|
<ui>
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</ui>
|
|
|
|
</xsl:template>
|
|
|
|
|
2004-05-02 06:43:15 +08:00
|
|
|
<xsl:template match="@*|node()" name="identity">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()" />
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|