<xsl:for-eachselect="//datafield[(@tag='856' and @ind1='4' and @ind2=' ' and (substring(subfield[@code='u'], string-length(subfield[@code='u']) - string-length('.mp4') + 1) = '.mp4') or (substring(subfield[@code='u'], string-length(subfield[@code='u']) - string-length('.mp3') + 1) = '.mp3')) or (@tag='856' and @ind1='7' and @ind2=' ' and (subfield[@code='x']='mp3128' or subfield[@code='x']='mp40600' or subfield[@code='x']='mp4podcast'))]/subfield[@code='u']">
<xsl:for-eachselect="../../datafield[@tag='856' and @ind1='4' and @ind2=' ' and (substring(subfield[@code='u'], string-length(subfield[@code='u']) - string-length('.jpg') + 1) = '.jpg')]/subfield[@code='u']">