Bug 10565: (follow-up) refresh DBIC schema class files
[koha.git] / etc / pazpar2 / pz2-ourl-marc21.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3     version="1.0"
4     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5     xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
6     xmlns:marc="http://www.loc.gov/MARC21/slim"
7     xmlns:str="http://exslt.org/strings"
8     extension-element-prefixes="str">  
9   
10   <xsl:import href="pz2-ourl-base.xsl"/>
11
12   <xsl:template name="ou-author" >
13   <!-- what to do with multiple authors??-->
14     <xsl:for-each select="marc:datafield[@tag='100' or @tag='700']">
15       <xsl:value-of select="marc:subfield[@code='a']"/>
16     </xsl:for-each>
17   </xsl:template>
18
19   <xsl:template name="ou-title" >
20   <!-- if 773 exists its a journal/article -->
21     <xsl:choose>
22     
23       <xsl:when test="marc:datafield[@tag='773']/marc:subfield[@code='t']">
24         <xsl:value-of select="marc:datafield[@tag='773']/marc:subfield[@code='t']"/>
25       </xsl:when>
26
27       <xsl:when test="marc:datafield[@tag='245']/marc:subfield[@code='a']">
28         <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
29       </xsl:when>
30
31     </xsl:choose>
32   </xsl:template>
33
34   
35   <xsl:template name="ou-atitle" >
36     <!-- return value only if article or journal -->
37     <xsl:if test="marc:datafield[@tag='773']">
38       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
39     </xsl:if>
40   </xsl:template>
41
42
43   <xsl:template name="ou-date" >
44     <xsl:for-each select="marc:datafield[@tag='260']">
45       <xsl:value-of select="marc:subfield[@code='c']"/>
46     </xsl:for-each>
47   </xsl:template>
48
49   
50   <xsl:template name="ou-isbn" >
51   <!-- if 773 exists its a journal/article -->
52     <xsl:choose>  
53     
54       <xsl:when test="marc:datafield[@tag='773']/marc:subfield[@code='z']">
55         <xsl:value-of select="marc:datafield[@tag='773']/marc:subfield[@code='z']"/>
56       </xsl:when>
57       
58       <xsl:when test="marc:datafield[@tag='020']/marc:subfield[@code='a']">
59         <xsl:value-of select="marc:datafield[@tag='020']/marc:subfield[@code='a']"/>
60       </xsl:when>
61
62     </xsl:choose>
63   </xsl:template>
64
65   
66   <xsl:template name="ou-issn" >
67   <!-- if 773 exists its a journal/article -->
68     <xsl:choose>
69     
70       <xsl:when test="marc:datafield[@tag='773']/marc:subfield[@code='x']">
71         <xsl:value-of select="marc:datafield[@tag='773']/marc:subfield[@code='x']"/>
72       </xsl:when>
73
74       <xsl:when test="marc:datafield[@tag='022']/marc:subfield[@code='a']">
75         <xsl:value-of select="marc:datafield[@tag='022']/marc:subfield[@code='a']"/>
76       </xsl:when>
77
78       </xsl:choose>
79   </xsl:template>
80
81   
82   <xsl:template name="ou-volume" >
83     <xsl:if test="marc:datafield[@tag='773']">
84           <xsl:value-of select="marc:datafield[@tag='773']/marc:subfield[@code='g']"/>
85     </xsl:if>
86   </xsl:template>
87
88 </xsl:stylesheet>
89 <!--
90 /*
91  * Local variables:
92  * c-basic-offset: 2
93  * indent-tabs-mode: nil
94  * End:
95  * vim: shiftwidth=2 tabstop=4 expandtab
96  */
97 -->