我正在尝试转换以下 DublinCore XML 目录:
<?xml version="1.0" encoding="UTF-8"?>
<articlesinDublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
<article>
<dc:creator>Laura Steinert</dc:creator>
<dc:creator>Ulrich Hoppe</dc:creator>
<dc:language>English</dc:language>
<dc:date>2015-09-16</dc:date>
<dc:title>Using Network Analytics for the Recommendation of Scientific Papers
</dc:title>
<dc:format>PDF</dc:format>
<dc:publisher>Springer</dc:publisher>
<dc:type>Text</dc:type>
</article>
<article>
<dc:contributor>Nicholas Baloian</dc:contributor>
<dc:contributor>Yasser Zorian</dc:contributor>
<dc:language>English</dc:language>
<dc:date>2015-09-16</dc:date>
<dc:title>Collaboration and Technology</dc:title>
<dc:format>PDF</dc:format>
<dc:publisher>Springer</dc:publisher>
<dc:type>Collection</dc:type>
</article>
</articlesinDublinCore>
使用官方 XLST 文件将其复制到 MARC 目录,如下所示:
<xsl:template match="/">
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" >
<datafield tag="042" ind1=" " ind2=" ">
<subfield code="a">dc</subfield>
</datafield>
<xsl:for-each select="//dc:contributor">
<datafield tag="720" ind1="0" ind2="0">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
<subfield code="e">collaborator</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:coverage">
<datafield tag="500" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:creator">
<datafield tag="720" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
<subfield code="e">author</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:date">
<datafield tag="260" ind1=" " ind2=" ">
<subfield code="c">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:description">
<datafield tag="520" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:format">
<datafield tag="856" ind1=" " ind2=" ">
<subfield code="q">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:identifier">
<datafield tag="024" ind1="8" ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:language">
<datafield tag="546" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:publisher">
<datafield tag="260" ind1=" " ind2=" ">
<subfield code="b">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:relation">
<datafield tag="787" ind1="0" ind2=" ">
<subfield code="n">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:rights">
<datafield tag="540" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:source">
<datafield tag="786" ind1="0" ind2=" ">
<subfield code="n">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:subject">
<datafield tag="653" ind1=" " ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:title[1]">
<datafield tag="245" ind1="0" ind2="0">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:title[position()>1]">
<datafield tag="246" ind1="3" ind2="3">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="//dc:type">
<datafield tag="655" ind1="7" ind2=" ">
<subfield code="a">
<xsl:value-of select="."/>
</subfield>
<subfield code="2">local</subfield>
</datafield>
</xsl:for-each>
</record>
</xsl:template>
转换后的文件将两篇文章中的所有元素累积成一条记录,如下所示(我仅引用其中的一部分):
<?xml version="1.0" encoding="utf-8"?>
<record xmlns="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
<datafield tag="042" ind1=" " ind2=" ">
<subfield code="a">dc</subfield>
</datafield>
<datafield tag="720" ind1="0" ind2="0">
<subfield code="a">Nicholas Baloian</subfield>
<subfield code="e">collaborator</subfield>
</datafield>
<datafield tag="720" ind1="0" ind2="0">
<subfield code="a">Yasser Zorian</subfield>
<subfield code="e">collaborator</subfield>
</datafield>
</record>
但是,我需要将 DoublineCore 中的元素集合转换为 MARC 格式的元素集合。有人知道如何编辑 XLST 文件中的 XPATH 表达式(第二个代码块)以获得我想要的结果吗?
提前致谢。