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 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
8 <xsl:template match="text()"/>
11 <xsl:template match="processing-instruction()">
12 <xsl:copy-of select="."/>
16 <xsl:template match="/m:record">
17 <xsl:processing-instruction name="zebra-2.0">
18 <xsl:text>record id=</xsl:text>
19 <xsl:value-of select="translate(normalize-space(m:controlfield[@tag='001']),' ','_')"/>
20 <xsl:text> rank=</xsl:text>
21 <xsl:value-of select="normalize-space(m:rank)"/>
22 </xsl:processing-instruction>
25 <xsl:apply-templates/>
29 <xsl:template match="m:controlfield[@tag='001']">
31 <xsl:processing-instruction
32 name="zebra-2.0">index control:w</xsl:processing-instruction>
34 <xsl:value-of select="normalize-space(.)"/>
38 <xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
39 <xsl:processing-instruction
40 name="zebra-2.0">index title:w title:p title:s</xsl:processing-instruction>
42 <xsl:value-of select="."/>