Skip to content

Instantly share code, notes, and snippets.

@jsicot
Created June 8, 2015 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jsicot/f723b89fdf35b8c59c64 to your computer and use it in GitHub Desktop.
Save jsicot/f723b89fdf35b8c59c64 to your computer and use it in GitHub Desktop.
360.xsl
<xsl:template name="tag_010">
<xsl:param name="tag"/>
<xsl:param name="label"/>
<xsl:if test="marc:datafield[@tag=$tag]/marc:subfield[@code='a']">
<tr valign="top">
<th><xsl:value-of select="$label"/> : </th><td>
<xsl:for-each select="marc:datafield[@tag=$tag]">
<xsl:call-template name="addClassRtl"/>
<xsl:for-each select="marc:subfield[@code='a']">
<div class="ISBN"><xsl:value-of select="."/></div>
<xsl:choose>
<xsl:when test="position()=last()">
<xsl:text></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> ; </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
</td></tr>
</xsl:if>
</xsl:template>
<xsl:template name="tag_011">
<xsl:param name="tag"/>
<xsl:param name="label"/>
<xsl:if test="marc:datafield[@tag=$tag]/marc:subfield[@code='a']">
<tr valign="top">
<th><xsl:value-of select="$label"/> : </th><td>
<xsl:for-each select="marc:datafield[@tag=$tag]">
<xsl:call-template name="addClassRtl"/>
<xsl:for-each select="marc:subfield[@code='a']">
<div class="ISSN"><xsl:value-of select="."/></div>
<xsl:choose>
<xsl:when test="position()=last()">
<xsl:text></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> ; </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
</td></tr>
</xsl:if>
</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment