]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xsl/CNBrowse2HTML.xsl
add ##URI## support ot the slimpac
[working/Evergreen.git] / Open-ILS / xsl / CNBrowse2HTML.xsl
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2   
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4   xmlns="http://www.w3.org/1999/xhtml"
5   xmlns:xhtml="http://www.w3.org/1999/xhtml"
6   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7   xmlns:marc="http://www.loc.gov/MARC21/slim"
8   xmlns:hold="http://open-ils.org/spec/holdings/v1"
9   xmlns:act='http://open-ils.org/spec/actors/v1'
10   version="1.0">
11   <xsl:output method="html" doctype-public="-//W3C/DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" />    
12   <xsl:template match="/">
13      <html>
14        <head>
15          <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
16        </head>
17        <body>
18         <span>
19          <a>
20           <xsl:attribute name="href">
21            <xsl:value-of select="$prev"/>
22           </xsl:attribute>
23           <xsl:text>Previous</xsl:text>
24          </a>
25          <xsl:text> -- </xsl:text>
26          <a>
27           <xsl:attribute name="href">
28            <xsl:value-of select="$next"/>
29           </xsl:attribute>
30           <xsl:text>Next</xsl:text>
31          </a>
32         </span>
33         <hr/>
34         <xsl:apply-templates select="//hold:volume"/>
35         <hr/>
36         <span>
37          <a>
38           <xsl:attribute name="href">
39            <xsl:value-of select="$prev"/>
40           </xsl:attribute>
41           <xsl:text>Previous</xsl:text>
42          </a>
43          <xsl:text> -- </xsl:text>
44          <a>
45           <xsl:attribute name="href">
46            <xsl:value-of select="$next"/>
47           </xsl:attribute>
48           <xsl:text>Next</xsl:text>
49          </a>
50         </span>
51        </body>
52      </html>
53   </xsl:template>
54
55   <xsl:template match="hold:volume">
56    <div style="border:solid #999999 1px;">
57     <span>
58      <dl>
59       <xsl:value-of select="@label"/>
60       <dd><xsl:apply-templates select="marc:record"/></dd>
61       <dd><xsl:value-of select="act:owning_lib/@name"/></dd>
62      </dl>
63     </span>
64    </div>
65   </xsl:template>
66
67   <xsl:template match="marc:record">
68    <img>
69     <xsl:attribute name="src">
70       <xsl:variable name="isbnraw"><xsl:value-of select="marc:datafield[@tag='020']/marc:subfield[@code='a']"/></xsl:variable>
71       <xsl:choose>
72         <xsl:when test="substring-before($isbnraw,' ')">
73           <xsl:variable name="isbntrimmed"><xsl:value-of select="substring-before($isbnraw,' ')"/></xsl:variable>
74           <xsl:value-of select="concat('/opac/extras/jacket/small/',$isbntrimmed)"/>
75         </xsl:when>
76         <xsl:otherwise>
77           <xsl:value-of select="concat('/opac/extras/jacket/small/',$isbnraw)"/>
78         </xsl:otherwise>
79       </xsl:choose>
80     </xsl:attribute>
81    </img>
82    <a>
83     <xsl:attribute name="href">
84      <xsl:value-of select="concat('/opac/extras/unapi?format=htmlholdings-full;id=',@id)"/>
85     </xsl:attribute>
86     <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
87    </a>
88    <xsl:text> By </xsl:text>
89    <xsl:value-of select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
90    <xsl:text> / Published </xsl:text>
91    <xsl:value-of select="marc:datafield[@tag='260']/marc:subfield[@code='c']|marc:datafield[@tag='261']/marc:subfield[@code='d']|marc:datafield[@tag='262']/marc:subfield[@code='d']"/>
92    <span>
93      <xsl:attribute name="style">
94       <xsl:text>font-size:smaller;</xsl:text>
95      </xsl:attribute>
96      <xsl:text> (</xsl:text>
97      <a>
98       <xsl:attribute name="href">
99        <xsl:value-of select="concat('/opac/extras/unapi?format=opac;id=',@id)"/>
100       </xsl:attribute>
101       <xsl:text>Dynamic Details</xsl:text>
102      </a>
103      <xsl:text>)</xsl:text>
104    </span>
105   </xsl:template>
106
107 </xsl:stylesheet>