1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns:m="http://www.loc.gov/MARC21/slim"
3 xmlns:z="http://indexdata.dk/zebra/xslt/1"
5 <!-- $Id: index.xsl,v 1.5 2005-08-18 12:50:19 adam Exp $ -->
6 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
9 <xsl:template match="text()"/>
12 <xsl:template match="/m:record">
13 <z:record z:id="{normalize-space(m:controlfield[@tag='001'])}"
14 z:rank="{normalize-space(m:rank)}"
16 <xsl:apply-templates/>
20 <xsl:template match="m:controlfield[@tag='001']">
21 <z:index name="control">
22 <xsl:value-of select="."/>
26 <xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
27 <!-- nested. does not have to be! -->
28 <z:index name="title">
29 <z:index name="title" type="p">
30 <xsl:value-of select="."/>
34 <!-- can do. But sort register only supports numeric attributes. -->
35 <z:index name="title" type="s">
36 <xsl:value-of select="."/>