Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
[working/Evergreen.git] / Open-ILS / xsl / oilsMARC21slim2HTML.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                         <head>
8                                 <title>MARC</title>
9                                 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
10
11                                 <style>
12
13                                         .marc_table {}
14                                         .marc_tag_row {}
15                                         .marc_tag_data {}
16                                         .marc_tag_col {}
17                                         .marc_tag_ind {}
18                                         .marc_subfields {}
19                                         .marc_subfield_code { 
20                                                 color: blue; 
21                                                 padding-left: 5px;
22                                                 padding-right: 5px; 
23                                         }
24
25                                 </style>
26
27                                 <link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>
28                         </head>
29                         <body>
30                                 <div><button onclick='window.print();'>Print Page</button></div>
31                                 <xsl:apply-templates/>
32                         </body>
33                 </html>
34         </xsl:template>
35         
36         <xsl:template match="marc:record">
37                 <table class='marc_table'>
38                         <tr class='marc_tag_row'>
39                                 <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
40                                         LDR
41                                 </th>
42                                 <td class='marc_tag_data' COLSPAN='3'>
43                                         <xsl:value-of select="marc:leader"/>
44                                 </td>
45                         </tr>
46                         <xsl:apply-templates select="marc:datafield|marc:controlfield"/>
47                 </table>
48         </xsl:template>
49         
50         <xsl:template match="marc:controlfield">
51                 <tr class='marc_tag_row'>
52                         <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
53                                 <xsl:value-of select="@tag"/>
54                         </th>
55                         <td class='marc_tag_data' COLSPAN='3'>
56                                 <xsl:value-of select="."/>
57                         </td>
58                 </tr>
59         </xsl:template>
60         
61         <xsl:template match="marc:datafield">
62                 <tr class='marc_tag_row'>
63                         <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
64                                 <xsl:value-of select="@tag"/>
65                         </th>
66                         <td class='marc_tag_ind'>
67                                 <xsl:value-of select="@ind1"/>
68                         </td>
69
70                         <td class='marc_tag_ind' style='border-left: 1px solid #A0A0A0; padding-left: 3px;'>
71                                 <xsl:value-of select="@ind2"/>
72                                 <span style='color:#FFF'>.</span> 
73                         </td>
74
75                         <td class='marc_subfields'>
76                                 <xsl:apply-templates select="marc:subfield"/>
77                         </td>
78                 </tr>
79         </xsl:template>
80         
81         <xsl:template match="marc:subfield">
82                 <span class='marc_subfield_code' > 
83                         &#8225;<xsl:value-of select="@code"/>
84                 </span><xsl:value-of select="."/>       
85         </xsl:template>
86
87 </xsl:stylesheet>
88
89 <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
90 <metaInformation>
91 <scenarios ><scenario default="no" name="Ray Charles" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\raycharles.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="s7" userelativepaths="yes" externalpreview="no" url="..\ifla\sally7.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
92 </metaInformation>
93 -->