1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns:m="http://www.loc.gov/MARC21/slim"
3 exclude-result-prefixes="m"
5 <!-- $Id: dom-index.xsl,v 1.2 2007-02-13 11:37:03 marc Exp $ -->
6 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
9 <xsl:template match="text()"/>
12 <xsl:template match="processing-instruction()">
13 <xsl:copy-of select="."/>
17 <xsl:template match="/m:record">
18 <xsl:processing-instruction name="zebra-2.0">
19 <xsl:text>record id=</xsl:text>
20 <xsl:value-of select="normalize-space(m:controlfield[@tag='001'])"/>
21 <xsl:text> rank=</xsl:text>
22 <xsl:value-of select="normalize-space(m:rank)"/>
23 </xsl:processing-instruction>
26 <xsl:apply-templates/>
30 <xsl:template match="m:controlfield[@tag='001']">
33 <xsl:processing-instruction
34 name="zebra-2.0">index control</xsl:processing-instruction>
35 <xsl:value-of select="normalize-space(.)"/>
39 <xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
40 <xsl:processing-instruction
41 name="zebra-2.0">index title:w title:p title:s</xsl:processing-instruction>
43 <xsl:value-of select="."/>