+ <xsl:template name="insert-recordInfo">
+ <recordInfo>
+ <xsl:choose>
+
+ <!-- Did we actually probe record syntaxes? -->
+ <xsl:when test="/*/irspy:status/irspy:record">
+ <xsl:for-each select="/*/irspy:status/irspy:record_fetch[@ok = 1]">
+ <recordSyntax name="{@syntax}">
+ <elementSet name="F"/> <!-- FIXME: This should be probed too -->
+ </recordSyntax>
+ </xsl:for-each>
+ </xsl:when>
+
+ <!-- If not, use the existing test report... -->
+ <xsl:otherwise>
+ <xsl:copy-of select="explain:recordInfo/*"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </recordInfo>
+ </xsl:template>
+
+
+ <xsl:template name="insert-configInfo">
+ <configInfo>
+ <xsl:choose>
+ <xsl:when test="/*/irspy:status/irspy:init_opt">
+ <xsl:for-each select="/*/irspy:status/irspy:init_opt">
+ <supports type="z3950_{@option}">1</supports>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="explain:configInfo/*"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </configInfo>
+ </xsl:template>
+
+
+ <!--
+ Here we list the bits and pieces of the irspy:status element which we
+ want to keep in the persistent version of the zeerex record.
+ -->
+ <xsl:template name="insert-irspySection">
+ <irspy:status>
+ <xsl:for-each
+ select="*/irspy:probe |
+ */irspy:boolean[irspy:strcmp(text(), $ping_date) >= 0] |
+ */irspy:named_resultset[irspy:strcmp(text(),$ping_date) >= 0]|
+ */irspy:explain[irspy:strcmp(text(),$ping_date) >= 0]">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+ </irspy:status>
+ </xsl:template>
+
+
+ <xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()"/>
+ </xsl:copy>