File: menus.xsl

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (53 lines) | stat: -rw-r--r-- 1,491 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?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: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>