our stylesheet for moving from marc xml to html
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 May 2005 17:18:26 +0000 (17:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 May 2005 17:18:26 +0000 (17:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@606 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xsl/oilsMARC21slim2HTML.xsl [new file with mode: 0644]

diff --git a/Open-ILS/xsl/oilsMARC21slim2HTML.xsl b/Open-ILS/xsl/oilsMARC21slim2HTML.xsl
new file mode 100644 (file)
index 0000000..cc31e18
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:output method="html"/>
+       
+       <xsl:template match="/">
+               <html>
+                       <head>
+                               <link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>
+                       </head>
+                       <xsl:apply-templates/>
+               </html>
+       </xsl:template>
+       
+       <xsl:template match="marc:record">
+               <table class='marc_table'>
+                       <tr class='marc_tag_row'>
+                               <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="TOP">
+                                       LDR
+                               </th>
+                               <td class='marc_tag_data' COLSPAN='3'>
+                                       <xsl:value-of select="marc:leader"/>
+                               </td>
+                       </tr>
+                       <xsl:apply-templates select="marc:datafield|marc:controlfield"/>
+               </table>
+       </xsl:template>
+       
+       <xsl:template match="marc:controlfield">
+               <tr class='marc_tag_row'>
+                       <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="TOP">
+                               <xsl:value-of select="@tag"/>
+                       </th>
+                       <td class='marc_tag_data' COLSPAN='3'>
+                               <xsl:value-of select="."/>
+                       </td>
+               </tr>
+       </xsl:template>
+       
+       <xsl:template match="marc:datafield">
+               <tr class='marc_tag_row'>
+                       <th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="TOP">
+                               <xsl:value-of select="@tag"/>
+                       </th>
+                       <td class='marc_tag_ind'>
+                               <xsl:value-of select="@ind1"/>
+                       </td>
+
+                       <td class='marc_tag_ind' style='border-left: 1px solid black'>
+                               <xsl:value-of select="@ind2"/>
+                               <span style='color:#FFF'>.</span> 
+                       </td>
+
+                       <td class='marc_subfields'>
+                               <xsl:apply-templates select="marc:subfield"/>
+                       </td>
+               </tr>
+       </xsl:template>
+       
+       <xsl:template match="marc:subfield">
+               <span class='marc_subfield_code'>&#8225;<xsl:value-of select="@code"/></span><xsl:value-of select="."/> 
+       </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
+<metaInformation>
+<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"/>
+</metaInformation>
+-->