Proposed fix for Bug 5106 - Simplify MARC view choices in the OPAC (Conflict marker...
[wip/koha-chris_n.git] / koha-tmpl / opac-tmpl / prog / en / xslt / MARC21slim2OPACMARCdetail.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3         <xsl:output method="html"/>
4
5         <xsl:template match="/">
6                 <html>
7                         <xsl:apply-templates/>
8                 </html>
9         </xsl:template>
10
11         <xsl:template match="marc:record">
12                 <table>
13                         <tr>
14                                 <th style="white-space:nowrap">
15                                         000
16                                 </th>
17                                 <td colspan="2"></td>
18                                 <td>
19                                         <xsl:value-of select="marc:leader"/>
20                                 </td>
21                         </tr>
22                         <xsl:apply-templates select="marc:datafield|marc:controlfield"/>
23                 </table>
24         </xsl:template>
25
26         <xsl:template match="marc:controlfield">
27                 <tr>
28                         <th style="white-space:nowrap">
29                                 <xsl:value-of select="@tag"/>
30                         </th>
31                         <td colspan="2"></td>
32                         <td>
33                                 <xsl:value-of select="."/>
34                         </td>
35                 </tr>
36         </xsl:template>
37
38         <xsl:template match="marc:datafield">
39                 <tr>
40                         <th style="white-space:nowrap">
41                                 <xsl:value-of select="@tag"/>
42                         </th>
43                         <td><xsl:value-of select="@ind1"/></td>
44                         <td><xsl:value-of select="@ind2"/></td>
45                         <td><xsl:apply-templates select="marc:subfield"/></td>
46                 </tr>
47         </xsl:template>
48
49         <xsl:template match="marc:subfield">
50                 <strong>_<xsl:value-of select="@code"/></strong> <xsl:value-of select="."/>
51                 <xsl:choose>
52                 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
53         </xsl:template>
54
55 </xsl:stylesheet>