File: test.xsl

package info (click to toggle)
libxml-xslt-perl 0.48-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,356 kB
  • ctags: 113
  • sloc: xml: 10,773; perl: 3,134; makefile: 2
file content (122 lines) | stat: -rw-r--r-- 3,922 bytes parent folder | download | duplicates (5)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match='AGENDA'><!-- AGENDA -->

    <HTML>
      <HEAD>
        <BASE HREF="http://www.sci.kun.nl/sigma/"/>
        <TITLE><xsl:value-of select="@NAME"/> Agenda</TITLE>
      </HEAD>
      <BODY BGCOLOR="#EEEEEE" BACKGROUND="gifs/achtergrond.gif">
        <TABLE WIDTH="100%">

<A>
<xsl:attribute name="HREF"><xsl:value-of select="MAAND/@NAAM"/></xsl:attribute>
</A>

<xsl:comment>Maand naam:<xsl:value-of select="MAAND/@NAAM"/></xsl:comment>

<xsl:variable name="maandnaam"><xsl:value-of select="MAAND/@NAAM"/></xsl:variable>
Maand="<xsl:value-of select="$maandnaam"/>"

<A>
<xsl:for-each select="@*">
  <xsl:copy />
</xsl:for-each>
</A>
        <!--xsl:apply-templates//MAAND -->

        </TABLE>
      </BODY>
    </HTML>

  <!-- /AGENDA -->
  </xsl:template>

  <xsl:template match='MAAND'><!-- MAAND -->

            <TR>
              <TD COLSPAN="4">
                <BR></BR>
                <H3><A NAME="{@NAAM}"><xsl:value-of select='@NAAM'/></A></H3>
              </TD>
            </TR>

            <xsl:apply-templates/><!-- /PUNT -->

  </xsl:template>

  <xsl:template match='PUNT'><!-- PUNT -->

              <TR>
                <TD WIDTH="1%" VALIGN="Top" ALIGN="Right">
                  <IMG SRC="/sigma/gifs/dots/greendot.gif" SIZE="50%"/>
                </TD>
                <TD WIDTH="20%" VALIGN="Top">
                  <xsl:value-of select='DATUM'/>
                </TD>
                <TD WIDTH="10%" VALIGN="Top" ALIGN="Right">
                  <I><xsl:value-of select='@TYPE'/></I>
                </TD>    
                <TD WIDTH="35%" VALIGN="Top">
                  <xsl:choose>
                    <xsl:when test='LINK'>
                      <A HREF="{LINK/@URL}"><B>
                        <xsl:value-of select='TITEL'/></B>
                      </A>
                      <BR></BR>
                    </xsl:when>
                    <xsl:otherwise>
                      <B><xsl:value-of select='TITEL'/></B>
                      <BR></BR>
                    </xsl:otherwise>
                  </xsl:choose>
                  <I>

                    <xsl:apply-templates/><!-- /INFO -->

                    <xsl:choose>
                      <xsl:when test='COMMENTAAR'>
                        <xsl:value-of select='COMMENTAAR'/><BR></BR>
                      </xsl:when>
                    </xsl:choose>
                  </I>
                </TD>
                <TD WIDTH="15%" VALIGN="Top" ALIGN="Right">
                  <B><I><xsl:value-of select='ORG'/></I></B>
                </TD>
              </TR>

  </xsl:template>

  <xsl:template match='INFO'><!-- INFO -->

                      <xsl:choose>
                        <xsl:when test='TIJD'>
                          <xsl:value-of select='TIJD'/><BR></BR>
                        </xsl:when>
                      </xsl:choose>
                      <xsl:choose>
                        <xsl:when test='PLAATS'>
                          <xsl:value-of select='PLAATS'/><BR></BR>
                        </xsl:when>
                      </xsl:choose>
                      <xsl:choose>
                        <xsl:when test='INSCHRIJVEN'>
                          <xsl:value-of select='INSCHRIJVEN'/><BR></BR>
                        </xsl:when>
                      </xsl:choose>
                      <xsl:choose>
                        <xsl:when test='CONTACT-INFO'>
                          <xsl:value-of select='CONTACT-INFO'/><BR></BR>
                        </xsl:when>
                      </xsl:choose>
                      <xsl:choose>
                        <xsl:when test='PRIJS'>
                          <xsl:value-of select='PRIJS'/><BR></BR>
                        </xsl:when>
                      </xsl:choose>

  </xsl:template>
</xsl:stylesheet>