<xslo:template match="text()" mode="index_subfields"/>
<xslo:template match="text()" mode="index_data_field"/>
<xslo:template match="text()" mode="index_heading"/>
+ <xslo:template match="text()" mode="index_heading_conditional"/>
<xslo:template match="text()" mode="index_match_heading"/>
<xslo:template match="text()" mode="index_subject_thesaurus"/>
<xslo:template match="/">
</xslo:if>
</xslo:template>
<xslo:template match="marc:record">
- <xslo:variable name="controlField001" select="normalize-space(marc:controlfield[@tag='001'])"/>
+ <xslo:variable name="idfield" select="normalize-space(marc:datafield[@tag='999']/marc:subfield[@code='c'])"/>
<z:record type="update">
<xslo:attribute name="z:id">
- <xslo:value-of select="$controlField001"/>
+ <xslo:value-of select="$idfield"/>
</xslo:attribute>
<xslo:apply-templates/>
<xslo:apply-templates mode="index_subfields"/>
<xslo:apply-templates mode="index_data_field"/>
<xslo:apply-templates mode="index_heading"/>
+ <xslo:apply-templates mode="index_heading_conditional"/>
<xslo:apply-templates mode="index_match_heading"/>
<xslo:apply-templates mode="index_subject_thesaurus"/>
+ <xslo:apply-templates mode="index_all"/>
</z:record>
</xslo:template>
<xslo:template match="marc:leader">
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
</xslo:template>
- <xslo:template match="*">
+ <xslo:template mode="index_all" match="text()">
<z:index name="Any:w Any:p">
<xslo:value-of select="."/>
</z:index>