File: catalog.xsl

package info (click to toggle)
libjdom0-java 0.9b-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,148 kB
  • ctags: 3,104
  • sloc: java: 9,604; xml: 595; makefile: 49; sh: 33; perl: 31
file content (44 lines) | stat: -rw-r--r-- 1,175 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>

<!--
   A simple XSL file from Elliotte Rusty Harold's talk at SD 2000 East
   http://www.ibiblio.org/xml/slides/sd2000east/xslt/
-->

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

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

  <xsl:template match="catalog">
    <head>
       <title><xsl:value-of select="category"/></title>      
    </head>
    <body>
       <h1><xsl:value-of select="category"/></h1>      
       <xsl:apply-templates select="composition"/>
       <hr/>
       Copyright <xsl:value-of select="copyright"/><br/>
       Last Modified: <xsl:value-of select="last_updated"/>
    </body>
  </xsl:template>

  <xsl:template match="composition">
    <h3><xsl:value-of select="title"/></h3>

    <ul>
     <li><xsl:value-of select="date"/></li>
     <li><xsl:value-of select="length"/></li>
     <li><xsl:value-of select="instruments"/></li>
     <li><xsl:value-of select="publisher"/></li>    
    </ul>

    <p><xsl:value-of select="description"/></p>    
    
  </xsl:template>

</xsl:stylesheet>