summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e4c6861)
If leader position 6 is 'd', then type is 'delete'. Otherwise
type is 'update' (works for insert too).
<!-- match on marcxml record -->
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<!-- match on marcxml record -->
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
+ <xsl:variable name="leader5" select="substring($leader,6,1)"/>
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="$leader5='d'">delete</xsl:when>
+ <xsl:otherwise>update</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField001"
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField001"
</xsl:choose>
</xsl:variable>
</xsl:choose>
</xsl:variable>
- <z:record z:id="{$controlField001}" type="update">
+ <z:record z:id="{$controlField001}" type="{$type}">
<!-- <xsl:attribute name="id"></xsl:attribute> -->
<!-- <xsl:attribute name="id"></xsl:attribute> -->