Koha/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl
Owen Leonard 3f0eeb9c28 Proposed fix for Bug 5106 - Simplify MARC view choices in the OPAC (Conflict marker fix 2nd try)
- Eliminates the "Extended MARC View" tab
- Points the "MARC View" tab to opac-MARCDetail.pl as it is when XSLT is off
- Offers a "view plain" link on opac-MARCDetail.pl. Clicking this link
  replaces the standard labeled MARC view with an unformatted view similar to the
  one displayed in the pop-up modal MARC view.
- When viewing the "plain view," clicking the "view labeled" link will return
  you to the standard labeled MARC view.
- Adds a new XSL file for displaying MARC data in a slightly-more-formatted
  manner (compared to one big <pre></pre> block).

Removed a conflict marker line from Owen's patch (Marcel).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-21 17:01:33 +13:00

55 lines
No EOL
1.4 KiB
XML

<?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>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="marc:record">
<table>
<tr>
<th style="white-space:nowrap">
000
</th>
<td colspan="2"></td>
<td>
<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>
<th style="white-space:nowrap">
<xsl:value-of select="@tag"/>
</th>
<td colspan="2"></td>
<td>
<xsl:value-of select="."/>
</td>
</tr>
</xsl:template>
<xsl:template match="marc:datafield">
<tr>
<th style="white-space:nowrap">
<xsl:value-of select="@tag"/>
</th>
<td><xsl:value-of select="@ind1"/></td>
<td><xsl:value-of select="@ind2"/></td>
<td><xsl:apply-templates select="marc:subfield"/></td>
</tr>
</xsl:template>
<xsl:template match="marc:subfield">
<strong>_<xsl:value-of select="@code"/></strong> <xsl:value-of select="."/>
<xsl:choose>
<xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
</xsl:template>
</xsl:stylesheet>