Instead of substring-after/substring-before, just remove "white-space"
chars - such as "[]/ " . At least one target has been seen to use / in
245$h.
<xsl:variable name="medium">
<xsl:choose>
<xsl:when test="$title_medium">
- <xsl:value-of select="substring-after(substring-before($title_medium,']'),'[')"/>
+ <xsl:value-of select="translate($title_medium, ' []/', '')"/>
</xsl:when>
<xsl:when test="$fulltext_a">
<xsl:text>electronic resource</xsl:text>