Omit CVS Id. Update copyright year.
[idzebra-moved-to-github.git] / test / xslt / dom-index-skipped.xsl
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.com/zebra-2.0"
4   exclude-result-prefixes="m z"
5   version="1.0">
6   <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
7   
8
9   <xsl:template match="text()"/>
10
11   <!-- skipping exactly first record with controlfield '11224466' -->
12   <xsl:template match="/m:record[normalize-space(m:controlfield[@tag='001']) =
13     '11224466']"/>
14
15   <!-- skipping exactly last record with controlfield '73090924' -->
16   <xsl:template match="/m:record[normalize-space(m:controlfield[@tag='001']) =
17     '73090924']"/>
18
19   <!-- and allowing one specific middle record -->
20   <xsl:template match="/m:record[normalize-space(m:controlfield[@tag='001']) =
21     '11224467']">
22     <z:record z:id="{normalize-space(m:controlfield[@tag='001'])}"
23         z:rank="{normalize-space(m:rank)}">
24       <xsl:apply-templates/>
25     </z:record>
26   </xsl:template>
27
28   <xsl:template match="m:controlfield[@tag='001']">
29     <z:index name="control">
30       <xsl:value-of select="normalize-space(.)"/>
31     </z:index>
32   </xsl:template>
33   
34   <xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
35     <z:index name="title:w title:p title:s any:w">
36       <xsl:value-of select="."/>
37     </z:index>
38   </xsl:template>
39
40 </xsl:stylesheet>