File: releases2document.xsl

package info (click to toggle)
libxerces2-java 2.8.1-1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 11,056 kB
  • ctags: 15,838
  • sloc: java: 117,816; xml: 12,454; sh: 37; makefile: 10
file content (63 lines) | stat: -rw-r--r-- 1,569 bytes parent folder | download | duplicates (6)
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
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>

 <xsl:template match='/releases'>
  <s1 title='Releases'>
   <xsl:apply-templates/>
  </s1>
 </xsl:template>
 
 <xsl:template match='release'>
  <s2>
   <xsl:choose>
    <xsl:when test='@date'>
     <xsl:attribute name='title'>
      <xsl:value-of select='@version'/>
      - 
      <xsl:value-of select='@date'/>
     </xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
     <xsl:attribute name='title'>
      <xsl:value-of select='@version'/>
     </xsl:attribute>
    </xsl:otherwise>
   </xsl:choose>
   <xsl:apply-templates select='desc'/>
   <xsl:if test='changes'>
    <ul>
     <xsl:apply-templates select='changes/*'/>
    </ul>
   </xsl:if>
  </s2>
 </xsl:template>
 
 <xsl:template match='desc'>
  <xsl:copy-of select='*|text()'/>
 </xsl:template>

 <xsl:template match='add|remove|fix|update'>
  <xsl:variable name='name'><xsl:value-of select='name()'/></xsl:variable>
  <li>
   <img alt='{$name}:' src='sbk:/resources/changes-{$name}.jpg' border='0'/>
   <xsl:copy-of select='note/*|note/text()'/>
   <xsl:if test='submitter'>
    <xsl:apply-templates select='submitter'/>
   </xsl:if>
  </li>
 </xsl:template>
 
 <xsl:template match='submitter'>
  <code>
   <xsl:choose>
    <xsl:when test='@mailto'>
     [<jump href='mailto:{@mailto}'><xsl:value-of select='@name'/></jump>]
    </xsl:when>
    <xsl:otherwise>
     [<xsl:value-of select='@name'/>]
    </xsl:otherwise>
   </xsl:choose>
  </code>
 </xsl:template>

</xsl:stylesheet>