summaryrefslogtreecommitdiff
path: root/sandbox/mallard/xslt/theme.xsl
blob: 53adf265ac76a7c02bd5f5a54df4b5128cb1ae96 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<!--
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License
along with this program; see the file COPYING.LGPL.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:theme="http://www.gnome.org/~shaunm/gnome-doc-utils/theme"
                version="1.0">

<!--!!==========================================================================
Themes

REMARK: Describe this module
-->


<xsl:variable name="theme" select="document('theme.xml')"/>

<xsl:key name="theme_key" match="*[@id]" use="@id"/>


<!--**==========================================================================
theme.get_color
-->
<xsl:template name="theme.get_color">
  <xsl:param name="id"/>
  <xsl:for-each select="$theme">
    <xsl:value-of select="key('theme_key', $id)/@value"/>
  </xsl:for-each>
</xsl:template>


<!--**==========================================================================
theme.get_icon_src
-->
<xsl:template name="theme.get_icon_src">
  <xsl:param name="id"/>
  <xsl:for-each select="$theme">
    <xsl:value-of select="key('theme_key', $id)/@src"/>
  </xsl:for-each>
</xsl:template>


<!--**==========================================================================
theme.get_icon_width
-->
<xsl:template name="theme.get_icon_width">
  <xsl:param name="id"/>
  <xsl:for-each select="$theme">
    <xsl:value-of select="key('theme_key', $id)/@width"/>
  </xsl:for-each>
</xsl:template>


<!--**==========================================================================
theme.get_icon_height
-->
<xsl:template name="theme.get_height">
  <xsl:param name="id"/>
  <xsl:for-each select="$theme">
    <xsl:value-of select="key('theme_key', $id)/@height"/>
  </xsl:for-each>
</xsl:template>

</xsl:stylesheet>