|
323 | 323 | </xsl:choose> |
324 | 324 | </xsl:template> |
325 | 325 |
|
| 326 | + <xsl:template match="marc:datafield[@tag='024']" mode="work"> |
| 327 | + <xsl:if test='starts-with(marc:subfield[@code="a"], "http://worldcat.org/entity/work/")' > |
| 328 | + <xsl:choose> |
| 329 | + <xsl:when test="$serialization = 'rdfxml'"> |
| 330 | + <xsl:for-each select="marc:subfield[@code='a']"> |
| 331 | + <bf:identifiedBy> |
| 332 | + <bf:Identifier> |
| 333 | + <xsl:attribute name="rdf:about"><xsl:value-of select="."/></xsl:attribute> |
| 334 | + </bf:Identifier> |
| 335 | + </bf:identifiedBy> |
| 336 | + </xsl:for-each> |
| 337 | + </xsl:when> |
| 338 | + </xsl:choose> |
| 339 | + </xsl:if> |
| 340 | + </xsl:template> |
| 341 | + |
326 | 342 | <xsl:template match="marc:datafield[@tag='033']" mode="work"> |
327 | 343 | <xsl:param name="serialization" select="'rdfxml'"/> |
328 | 344 | <xsl:variable name="vDate"> |
|
862 | 878 | </xsl:apply-templates> |
863 | 879 | </xsl:when> |
864 | 880 | <xsl:when test="@tag='024'"> |
865 | | - <xsl:variable name="vIdentifier"> |
| 881 | + <xsl:if test='not(starts-with(marc:subfield[@code="a"], "http://worldcat.org/entity/work/"))' > |
| 882 | + <xsl:variable name="vIdentifier"> |
| 883 | + <xsl:choose> |
| 884 | + <xsl:when test="@ind1 = '0'">bf:Isrc</xsl:when> |
| 885 | + <xsl:when test="@ind1 = '1'">bf:Upc</xsl:when> |
| 886 | + <xsl:when test="@ind1 = '2'">bf:Ismn</xsl:when> |
| 887 | + <xsl:when test="@ind1 = '3'">bf:Ean</xsl:when> |
| 888 | + <xsl:when test="@ind1 = '4'">bf:Sici</xsl:when> |
| 889 | + <xsl:when test="@ind1 = '7'"> |
| 890 | + <xsl:choose> |
| 891 | + <xsl:when test="marc:subfield[@code='2' and text()='ansi']">bf:Ansi</xsl:when> |
| 892 | + <xsl:when test="marc:subfield[@code='2' and text()='doi']">bf:Doi</xsl:when> |
| 893 | + <xsl:when test="marc:subfield[@code='2' and text()='hdl']">bf:Hdl</xsl:when> |
| 894 | + <xsl:when test="marc:subfield[@code='2' and text()='isan']">bf:Isan</xsl:when> |
| 895 | + <xsl:when test="marc:subfield[@code='2' and text()='isni']">bf:Isni</xsl:when> |
| 896 | + <xsl:when test="marc:subfield[@code='2' and text()='iso']">bf:Iso</xsl:when> |
| 897 | + <xsl:when test="marc:subfield[@code='2' and text()='istc']">bf:Istc</xsl:when> |
| 898 | + <xsl:when test="marc:subfield[@code='2' and text()='iswc']">bf:Iswc</xsl:when> |
| 899 | + <xsl:when test="marc:subfield[@code='2' and text()='matrix-number']">bf:MatrixNumber</xsl:when> |
| 900 | + <xsl:when test="marc:subfield[@code='2' and text()='music-plate']">bf:MusicPlate</xsl:when> |
| 901 | + <xsl:when test="marc:subfield[@code='2' and text()='music-publisher']">bf:MusicPublisherNumber</xsl:when> |
| 902 | + <xsl:when test="marc:subfield[@code='2' and text()='stock-number']">bf:StockNumber</xsl:when> |
| 903 | + <xsl:when test="marc:subfield[@code='2' and text()='urn']">bf:Urn</xsl:when> |
| 904 | + <xsl:when test="marc:subfield[@code='2' and text()='videorecording-identifier']">bf:VideoRecordingNumber</xsl:when> |
| 905 | + <xsl:otherwise>bf:Identifier</xsl:otherwise> |
| 906 | + </xsl:choose> |
| 907 | + </xsl:when> |
| 908 | + <xsl:otherwise>bf:Identifier</xsl:otherwise> |
| 909 | + </xsl:choose> |
| 910 | + </xsl:variable> |
866 | 911 | <xsl:choose> |
867 | | - <xsl:when test="@ind1 = '0'">bf:Isrc</xsl:when> |
868 | | - <xsl:when test="@ind1 = '1'">bf:Upc</xsl:when> |
869 | | - <xsl:when test="@ind1 = '2'">bf:Ismn</xsl:when> |
870 | | - <xsl:when test="@ind1 = '3'">bf:Ean</xsl:when> |
871 | | - <xsl:when test="@ind1 = '4'">bf:Sici</xsl:when> |
872 | | - <xsl:when test="@ind1 = '7'"> |
873 | | - <xsl:choose> |
874 | | - <xsl:when test="marc:subfield[@code='2' and text()='ansi']">bf:Ansi</xsl:when> |
875 | | - <xsl:when test="marc:subfield[@code='2' and text()='doi']">bf:Doi</xsl:when> |
876 | | - <xsl:when test="marc:subfield[@code='2' and text()='hdl']">bf:Hdl</xsl:when> |
877 | | - <xsl:when test="marc:subfield[@code='2' and text()='isan']">bf:Isan</xsl:when> |
878 | | - <xsl:when test="marc:subfield[@code='2' and text()='isni']">bf:Isni</xsl:when> |
879 | | - <xsl:when test="marc:subfield[@code='2' and text()='iso']">bf:Iso</xsl:when> |
880 | | - <xsl:when test="marc:subfield[@code='2' and text()='istc']">bf:Istc</xsl:when> |
881 | | - <xsl:when test="marc:subfield[@code='2' and text()='iswc']">bf:Iswc</xsl:when> |
882 | | - <xsl:when test="marc:subfield[@code='2' and text()='matrix-number']">bf:MatrixNumber</xsl:when> |
883 | | - <xsl:when test="marc:subfield[@code='2' and text()='music-plate']">bf:MusicPlate</xsl:when> |
884 | | - <xsl:when test="marc:subfield[@code='2' and text()='music-publisher']">bf:MusicPublisherNumber</xsl:when> |
885 | | - <xsl:when test="marc:subfield[@code='2' and text()='stock-number']">bf:StockNumber</xsl:when> |
886 | | - <xsl:when test="marc:subfield[@code='2' and text()='urn']">bf:Urn</xsl:when> |
887 | | - <xsl:when test="marc:subfield[@code='2' and text()='videorecording-identifier']">bf:VideoRecordingNumber</xsl:when> |
888 | | - <xsl:otherwise>bf:Identifier</xsl:otherwise> |
889 | | - </xsl:choose> |
| 912 | + <xsl:when test="$serialization='rdfxml'"> |
| 913 | + <xsl:for-each select="marc:subfield[@code='c']"> |
| 914 | + <bf:acquisitionTerms> |
| 915 | + <xsl:call-template name="chopPunctuation"> |
| 916 | + <xsl:with-param name="chopString"><xsl:value-of select="."/></xsl:with-param> |
| 917 | + <xsl:with-param name="punctuation"><xsl:text>:,;/ </xsl:text></xsl:with-param> |
| 918 | + </xsl:call-template> |
| 919 | + </bf:acquisitionTerms> |
| 920 | + </xsl:for-each> |
890 | 921 | </xsl:when> |
891 | | - <xsl:otherwise>bf:Identifier</xsl:otherwise> |
892 | 922 | </xsl:choose> |
893 | | - </xsl:variable> |
894 | | - <xsl:choose> |
895 | | - <xsl:when test="$serialization='rdfxml'"> |
896 | | - <xsl:for-each select="marc:subfield[@code='c']"> |
897 | | - <bf:acquisitionTerms> |
898 | | - <xsl:call-template name="chopPunctuation"> |
899 | | - <xsl:with-param name="chopString"><xsl:value-of select="."/></xsl:with-param> |
900 | | - <xsl:with-param name="punctuation"><xsl:text>:,;/ </xsl:text></xsl:with-param> |
901 | | - </xsl:call-template> |
902 | | - </bf:acquisitionTerms> |
903 | | - </xsl:for-each> |
904 | | - </xsl:when> |
905 | | - </xsl:choose> |
906 | | - <xsl:apply-templates select="." mode="instanceId"> |
907 | | - <xsl:with-param name="serialization" select="$serialization"/> |
908 | | - <xsl:with-param name="pIdentifier"><xsl:value-of select="$vIdentifier"/></xsl:with-param> |
909 | | - <xsl:with-param name="pInvalidLabel">invalid</xsl:with-param> |
910 | | - </xsl:apply-templates> |
| 923 | + <xsl:apply-templates select="." mode="instanceId"> |
| 924 | + <xsl:with-param name="serialization" select="$serialization"/> |
| 925 | + <xsl:with-param name="pIdentifier"><xsl:value-of select="$vIdentifier"/></xsl:with-param> |
| 926 | + <xsl:with-param name="pInvalidLabel">invalid</xsl:with-param> |
| 927 | + </xsl:apply-templates> |
| 928 | + </xsl:if> |
911 | 929 | </xsl:when> |
912 | 930 | <xsl:when test="@tag='025'"> |
913 | 931 | <xsl:apply-templates select="." mode="instanceId"> |
|
0 commit comments