Pazpar2 1.4.4-2 for squeeze
[pazpar2-moved-to-github.git] / etc / pp2out-to-carrot2.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
4 <xsl:template match="/">
5   <searchresult>
6     <!-- TODO make query an xsl parameter -->
7     <query>water</query>
8     <xsl:for-each select="show/hit">
9     <document>
10       <xsl:attribute name="id">
11         <xsl:value-of select="recid" />
12       </xsl:attribute>
13       <title><xsl:value-of select="md-title" /></title>
14       <url><xsl:value-of select="location/md-electronic-url" /></url>
15       <snippet xml:space="preserve">
16         <xsl:for-each select="md-description">
17           <xsl:value-of select="." />
18         </xsl:for-each>
19         <xsl:value-of select="md-title-responsibility" />
20       </snippet>
21     </document> 
22     </xsl:for-each>
23   </searchresult>
24 </xsl:template>
25 </xsl:stylesheet>