File: style2.xsl

package info (click to toggle)
libbsf-java 1%3A2.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 3,028 kB
  • ctags: 2,480
  • sloc: java: 5,373; xml: 226; ansic: 182; python: 57; makefile: 18
file content (21 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version='1.0'?>

<!-- This stylesheet fills in the data without sorting the list of names. -->

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

<!-- get access to the panel -->
<xsl:param name="panel"/>

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

<xsl:template match="person">
  <xsl:variable name="junk1" select="java:add ($panel, java:java.awt.Label.new (string(@first)))"/>
  <xsl:variable name="junk2" select="java:add ($panel, java:java.awt.Label.new (string(@last)))"/>
</xsl:template>

</xsl:stylesheet>