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:when test="$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']">
<genre authority="marcgt">map</genre>
</xsl:when>
<xsl:when test="$controlField008-25='e' or controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
<xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
<xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
<dateIssued encoding="marc">
<xsl:value-of select="$controlField008-7-10"/>
</dateIssued>
</xsl:if>
</xsl:if>
<xsl:if test="$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:if test="$controlField008-7-10">
<dateIssued encoding="marc" point="start">
<xsl:value-of select="$controlField008-7-10"/>
</dateIssued>
</xsl:if>
</xsl:if>
<xsl:if test="$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:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
<xsl:value-of select="true()"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="check008-29">
<xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
<xsl:value-of select="true()"/>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
<form authority="marcform">braille</form>
</xsl:when>
<xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
<form authority="marcform">print</form>
</xsl:when>
<xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
<form authority="marcform">electronic</form>
</xsl:when>
<xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
<form authority="marcform">microfiche</form>
</xsl:when>
<xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
<xsl:for-each select="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-template name="uri"/>
<xsl:variable name="str">
<xsl:for-each select="subfield[@code!='6' or @code!='8']">
<xsl:when test="starts-with(subfield[@code='u'],'urn:doi') or starts-with(subfield[@code='u'],'doi')">doi</xsl:when>
<xsl:when test="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:when test="starts-with(subfield[@code='u'],'urn:hdl') or starts-with(subfield[@code='u'],'hdl') or starts-with(subfield[@code='u'],'http://hdl.loc.gov') ">
<xsl:for-each select="subfield[@code='v' or @code='x' or @code='y' or @code='z']">
<xsl:choose>
<xsl:when test="@code='v'">
<xsl:call-template name="subjectGenre"/>
</xsl:when>
<xsl:when test="@code='x'">
<xsl:call-template name="subjectTopic"/>
</xsl:when>
<xsl:when test="@code='y'">
<xsl:call-template name="subjectTemporalY"/>
</xsl:when>
<xsl:when test="@code='z'">
<xsl:call-template name="subjectGeographicZ"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template name="specialSubfieldSelect">
<xsl:param name="anyCodes"/>
<xsl:param name="axis"/>
<xsl:param name="beforeCodes"/>
<xsl:param name="afterCodes"/>
<xsl:variable name="str">
<xsl:for-each select="subfield">
<xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::subfield[@code=$axis])">