Use multiple meta-data elements.
[pazpar2-moved-to-github.git] / etc / cf.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     This stylesheet expects Connector Frameworks records
5     $Id: usco.xsl,v 1.3 2009-01-13 15:18:42 wosch Exp $
6
7 -->
8 <xsl:stylesheet
9     version="1.0"
10     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11     xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
12     xmlns:dc="http://purl.org/dc/elements/1.1/"
13     xmlns:siebel="http://loc.gov/siebel/elements/1.0/" >
14
15  <xsl:output indent="yes"
16         method="xml"
17         version="1.0"
18         encoding="UTF-8"/>
19
20   <xsl:template match="/record">
21     <pz:record>
22       <xsl:attribute name="mergekey">
23               <xsl:text>title </xsl:text>
24         <xsl:value-of select="title" />
25               <xsl:text> author </xsl:text>
26         <xsl:value-of select="author"/>
27       </xsl:attribute>
28       <xsl:apply-templates/>
29     </pz:record>
30   </xsl:template>
31
32   <xsl:template match="url">
33     <pz:metadata type="electronic-url">
34       <xsl:value-of select="."/>
35     </pz:metadata>
36   </xsl:template>
37
38   <xsl:template match="author">
39     <pz:metadata type="author">
40       <xsl:value-of select="."/>
41     </pz:metadata>
42   </xsl:template>
43
44   <xsl:template match="title">
45     <pz:metadata type="title">
46       <xsl:value-of select="."/>
47     </pz:metadata>
48   </xsl:template>
49
50   <xsl:template match="date">
51     <pz:metadata type="publication-date">
52       <xsl:value-of select="."/>
53     </pz:metadata>
54   </xsl:template>
55
56   <xsl:template match="description">
57     <pz:metadata type="description">
58       <xsl:value-of select="."/>
59     </pz:metadata>
60   </xsl:template>
61
62   <xsl:template match="text()"/>
63
64 </xsl:stylesheet>