File: context2label.xsl

package info (click to toggle)
libxalan2-java 2.7.1-7%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,764 kB
  • sloc: java: 175,814; xml: 28,089; sh: 164; jsp: 43; makefile: 33; sql: 6
file content (25 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (16)
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
<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:param name="image"/>
  <xsl:param name="color"/>

  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="context">
    <image source="{$image}">
      <xsl:apply-templates/>
    </image>
  </xsl:template>

  <xsl:template match="parameter">
    <xsl:if test="@name='label'">
      <text font="Arial" size="12" x="14" y="1" halign="left"
            valign="top" color="{$color}" style="italic" text="{@value}"/>
    </xsl:if>
  </xsl:template>

</xsl:stylesheet>