Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/lui-solr
authorDennis Schafroth <dennis@indexdata.com>
Thu, 24 Apr 2014 10:58:08 +0000 (12:58 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Thu, 24 Apr 2014 10:58:08 +0000 (12:58 +0200)
etc/pz2-solr.xsl [new file with mode: 0644]

diff --git a/etc/pz2-solr.xsl b/etc/pz2-solr.xsl
new file mode 100644 (file)
index 0000000..0b7b796
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+               xmlns:pz="http://www.indexdata.com/pazpar2/1.0" >
+  <xsl:template  match="/">
+    <add>
+      <xsl:apply-templates></xsl:apply-templates>
+    </add>
+  </xsl:template>
+
+  <xsl:template match="pz:record">
+    <doc>
+      <xsl:apply-templates></xsl:apply-templates>
+    </doc>
+  </xsl:template>
+  <xsl:template match="pz:metadata">
+    <xsl:if test="@type">
+      <field>
+       <xsl:attribute  name="name">
+         <xsl:value-of select="@type"/>
+       </xsl:attribute>
+       <xsl:value-of select="."/>
+      </field>
+    </xsl:if>
+  </xsl:template>
+</xsl:stylesheet>