Resolving conflict
authorSebastian Hammer <quinn@indexdata.com>
Fri, 29 Dec 2006 05:10:02 +0000 (05:10 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Fri, 29 Dec 2006 05:10:02 +0000 (05:10 +0000)
etc/default.xsl
etc/pazpar2.cfg

index 77a807b..24d0e2c 100644 (file)
@@ -2,19 +2,38 @@
 <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:pz="http://www.indexdata.com/pazpar2/1.0">
+    xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
+    xmlns:marc="http://www.loc.gov/MARC21/slim">
 
-  <xsl:template match="*">
+  <xsl:template match="/marc:record">
     <pz:record>
-      <xsl:apply-templates/>
+
+      <pz:metadata type="title">
+       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
+       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='b']"/>
+      </pz:metadata>
+
+      <pz:mergekey>
+        <xsl:text>title </xsl:text>
+       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
+       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='b']"/>
+       <xsl:text> author </xsl:text>
+       <xsl:value-of select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
+      </pz:mergekey>
+
+      <xsl:for-each select="marc:datafield[@tag='650']">
+       <pz:facet type="subject">
+         <xsl:value-of select="marc:subfield[@code='a']"/>
+       </pz:facet>
+      </xsl:for-each>
+
+      <xsl:for-each select="marc:datafield[@tag='100']">
+       <pz:facet type="author">
+         <xsl:value-of select="marc:subfield[@code='a']"/>
+       </pz:facet>
+      </xsl:for-each>
     </pz:record>
   </xsl:template>
 
-  <xsl:template match="datafield[@tag='650']/subfield[@code='a']">
-    <pz:facet type="subject">
-      <xsl:value-of select="."/>
-    </pz:facet>
-  </xsl:template>
-  
 </xsl:stylesheet>
 
index 97a5bdd..d59da84 100644 (file)
@@ -18,9 +18,6 @@
   <proxy host="localhost" port="80"/>
 
   <service>
-    <termlist name="subject"/>
-    <termlist name="author"/>
-
     <!-- <metadata name="title"/> -->
   </service>
 </server>
 <!-- The 'profiles' below are repeatable, and tagged with an ID, so that they
      can be linked with targets. -->
 
-<!-- Oooh!!! They can be generated dynamically using XSLT. I just peed in my pants. -->
+<!-- They can be generated dynamically using XSLT. -->
+
+<queryprofile/>  <!-- Like a CCL profile? What else? -->
 
-<queryprofile/>  <!-- Like a CCL profile? Or do these need to be 
-                       dynamically generated from Zeerex??  -->
+<!-- Select by target ID (pattern). What else???   -->
 
-<retrievalprofile/>   <!-- Specify what stylesheets to use to normalize records?? -->
+<retrievalprofile>
+  <requestsyntax>marc21</requestsyntax>
+  <charset>marc-8</charset>
+  <map type="iso2709" charset="marc-8" format="marcxml"/>
+  <map type="xslt" stylesheet="default.xsl"/>
+</retrievalprofile>
 
 </pazpar2>