Fixing bug #1221: Replication of Z39.92 data in three elements.
authorAnders S. Mortensen <sondberg@indexdata.dk>
Thu, 28 Jun 2007 14:01:56 +0000 (14:01 +0000)
committerAnders S. Mortensen <sondberg@indexdata.dk>
Thu, 28 Jun 2007 14:01:56 +0000 (14:01 +0000)
xsl/irspy2zeerex.xsl

index e08fa90..0076589 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-    $Id: irspy2zeerex.xsl,v 1.20 2007-04-02 10:11:17 sondberg Exp $
+    $Id: irspy2zeerex.xsl,v 1.21 2007-06-28 14:01:56 sondberg Exp $
 
     This stylesheet is used by IRSpy to map the internal mixed Zeerex/IRSpy
     record format into the Zeerex record which we store.
     <xsl:param name="what" select="'unspecified'"/>
     <xsl:param name="i" select="count(*/irspy:probe[@ok='1'])"/>
     <xsl:variable name="date"
-        select="*/irspy:probe[@ok='1' and position() = $i]"/>
+        select="*/irspy:probe[@ok='1'][$i]"/>
     <xsl:variable name="latest"
-        select="$nodes[irspy:strcmp(text(), $date) > 0]"/>
+        select="$nodes[irspy:strcmp(text(), $date) >= 0]"/>
 
     <xsl:choose>
       <xsl:when test="$latest">