- <xsl:for-each select="/*/irspy:status/irspy:search">
- <xsl:variable name="set" select="@set"/>
- <xsl:variable name="ap" select="@ap"/>
- <xsl:variable name="old"
- select="$old_indexes[explain:map/explain:attr/@set = $set and
- explain:map/explain:attr/text() = $ap]"/>
- <xsl:choose>
- <xsl:when test="$old">
- <xsl:call-template name="insert-index-section">
- <xsl:with-param name="title" select="$old/explain:title"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="insert-index-section"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:choose>
+
+ <!-- Check that search was actually probed -->
+ <xsl:when test="/*/irspy:status/irspy:search">
+ <xsl:for-each select="/*/irspy:status/irspy:search">
+ <xsl:variable name="set" select="@set"/>
+ <xsl:variable name="ap" select="@ap"/>
+ <xsl:variable name="old"
+ select="$old_indexes[explain:map/explain:attr/@set = $set and
+ explain:map/explain:attr/text() = $ap]"/>
+ <xsl:choose>
+ <xsl:when test="$old">
+ <xsl:call-template name="insert-index-section">
+ <xsl:with-param name="title" select="$old/explain:title"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="insert-index-section"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+
+ <!-- If not, insert what we already had... -->
+ <xsl:otherwise>
+ <xsl:copy-of select="explain:indexInfo/*"/>
+ </xsl:otherwise>
+ </xsl:choose>