Revision 1.25 - Mapped 040e to <descriptiveStandard> and Leader/18 to <descriptive standard>aacr2 2008/09/18 tmee
Revision 1.24 - Mapped 852 subfields $h, $i, $j, $k, $l, $m, $t to <shelfLocation> and 852 subfield $u to <physicalLocation> with @xlink 2008/09/17 tmee
Revision 1.23 - Commented out xlink/uri for subfield 0 for 130/240/730, 100/700, 110/710, 111/711 as these are currently unactionable 2008/09/17 tmee
Revision 1.22 - Mapped 022 subfield $l to type "issn-l" subfield $m to output identifier element with corresponding @type and @invalid eq 'yes'2008/09/17 tmee
Revision 1.21 - Mapped 856 ind2=1 or ind2=2 to <relatedItem><location><url> 2008/07/03 tmee
Revision 1.20 - Added genre w/@auth="contents of 2" and type= "musical composition" 2008/07/01 tmee
Revision 1.19 - Added genre offprint for 008/24+ BK code 2 2008/07/01 tmee
Revision 1.18 - Added xlink/uri for subfield 0 for 130/240/730, 100/700, 110/710, 111/711 2008/06/26 tmee
Revision 1.17 - Added mapping of 662 2008/05/14 tmee
Revision 1.16 - Changed @authority from "marc" to "marcgt" for 007 and 008 codes mapped to a term in <genre> 2007/07/10 tmee
Revision 1.15 - For field 630, moved call to part template outside title element 2007/07/10 tmee
Revision 1.14 - Fixed template isValid and fields 010, 020, 022, 024, 028, and 037 to output additional identifier elements with corresponding @type and @invalid eq 'yes' when subfields z or y (in the case of 022) exist in the MARCXML ::: 2007/01/04 17:35:20 cred
Revision 1.13 - Changed order of output under cartographics to reflect schema 2006/11/28 tmee
Revision 1.11 - The attribute objectPart moved from <languageTerm> to <language> 2006/04/08 jrad
Revision 1.10 - MODS 3.1 revisions to language and classification elements (plus ability to find collection embedded in wrapper elements such as SRU zs: wrappers) 2006/02/06 ggar
Revision 1.9 - Subfield $y was added to field 242 2004/09/02 10:57 jrad
<xsl:whentest="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
<genreauthority="marcgt">map</genre>
</xsl:when>
<xsl:whentest="$controlField008-25='e' or controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
<xsl:iftest="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
<xsl:iftest="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
<dateIssuedencoding="marc">
<xsl:value-ofselect="$controlField008-7-10"/>
</dateIssued>
</xsl:if>
</xsl:if>
<xsl:iftest="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
<xsl:iftest="$controlField008-7-10">
<dateIssuedencoding="marc"point="start">
<xsl:value-ofselect="$controlField008-7-10"/>
</dateIssued>
</xsl:if>
</xsl:if>
<xsl:iftest="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
<xsl:iftest="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
<xsl:value-ofselect="true()"/>
</xsl:if>
</xsl:variable>
<xsl:variablename="check008-29">
<xsl:iftest="$typeOf008='MP' or $typeOf008='VM'">
<xsl:value-ofselect="true()"/>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:whentest="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
<formauthority="marcform">braille</form>
</xsl:when>
<xsl:whentest="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
<formauthority="marcform">print</form>
</xsl:when>
<xsl:whentest="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
<formauthority="marcform">electronic</form>
</xsl:when>
<xsl:whentest="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
<formauthority="marcform">microfiche</form>
</xsl:when>
<xsl:whentest="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
<xsl:for-eachselect="datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
<note>
<xsl:call-templatename="uri"/>
<xsl:variablename="str">
<xsl:for-eachselect="subfield[@code!='6' or @code!='8']">
<xsl:whentest="starts-with(subfield[@code='u'],'urn:doi') or starts-with(subfield[@code='u'],'doi')">doi</xsl:when>
<xsl:whentest="starts-with(subfield[@code='u'],'urn:hdl') or starts-with(subfield[@code='u'],'hdl') or starts-with(subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
<xsl:otherwise>uri</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:whentest="starts-with(subfield[@code='u'],'urn:hdl') or starts-with(subfield[@code='u'],'hdl') or starts-with(subfield[@code='u'],'http://hdl.loc.gov') ">
<!-- Put in <location><url access="object in context"></url></location> the entire record URL -->
<location>
<urlaccess="object in context"><xsl:value-ofselect="fn:eval_bibformat(controlfield[@tag='001'],'<BFE_SERVER_INFO var="absoluterecurl">')"/></url>
<xsl:for-eachselect="subfield[@code='v' or @code='x' or @code='y' or @code='z']">
<xsl:choose>
<xsl:whentest="@code='v'">
<xsl:call-templatename="subjectGenre"/>
</xsl:when>
<xsl:whentest="@code='x'">
<xsl:call-templatename="subjectTopic"/>
</xsl:when>
<xsl:whentest="@code='y'">
<xsl:call-templatename="subjectTemporalY"/>
</xsl:when>
<xsl:whentest="@code='z'">
<xsl:call-templatename="subjectGeographicZ"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:templatename="specialSubfieldSelect">
<xsl:paramname="anyCodes"/>
<xsl:paramname="axis"/>
<xsl:paramname="beforeCodes"/>
<xsl:paramname="afterCodes"/>
<xsl:variablename="str">
<xsl:for-eachselect="subfield">
<xsl:iftest="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::subfield[@code=$axis])">