Commit 102d7a69 authored by Steinberg, Jan's avatar Steinberg, Jan

picaxml to metadata xml / title in block test

parent ac75c177
......@@ -51,7 +51,7 @@
</publication>
</xsl:template>
<xsl:template match="pica:record">
<xsl:apply-templates select="pica:datafield[@tag='021A']"/>
<!--xsl:apply-templates select="pica:datafield[@tag='021A']"/-->
<xsl:apply-templates select="pica:datafield[@tag='031A']"/>
<xsl:apply-templates select="pica:datafield[@tag='028A']"/>
<xsl:apply-templates select="pica:datafield[@tag='027D']"/>
......@@ -59,24 +59,13 @@
<xsl:apply-templates select="pica:datafield[@tag='009P']"/>
</xsl:template>
<xsl:template match="pica:datafield[@tag='021A']">
<!--xsl:template match="pica:datafield[@tag='021A']">
<dc>
<title>
<xsl:choose>
<xsl:when test="string-length(/pica:record/pica:datafield[@tag='039I']/pica:subfield[@code='t']/text()) > 0">
<xsl:value-of select="/pica:record/pica:datafield[@tag='039I']/pica:subfield[@code='t']/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pica:subfield[@code='a']/text()"/>
<xsl:if test="pica:subfield[@code='d']">
<xsl:text>: </xsl:text>
<xsl:value-of select="pica:subfield[@code='d']/text()"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</title>
</dc>
</xsl:template>
</xsl:template-->
<xsl:template match="pica:datafield[@tag='031A']">
......@@ -94,13 +83,29 @@
</xsl:if>
</source>
<xsl:if test="pica:subfield[@code='j']/text()">
<date>
<issued>
<xsl:value-of select="pica:subfield[@code='j']/text()"/>
</issued>
</date>
<date>
<issued>
<xsl:value-of select="pica:subfield[@code='j']/text()"/>
</issued>
</date>
</xsl:if>
<xsl:choose>
<xsl:when test="string-length(/pica:record/pica:datafield[@tag='039I']/pica:subfield[@code='t']/text()) > 0">
<title>
<xsl:value-of select="/pica:record/pica:datafield[@tag='039I']/pica:subfield[@code='t']/text()"/>
</title>
</xsl:when>
<xsl:otherwise>
<title>
<xsl:value-of select="/pica:record/pica:datafield[@tag='021A']/pica:subfield[@code='a']/text()"/>
<xsl:if test="/pica:record/pica:datafield[@tag='021A']/pica:subfield[@code='d']">
<xsl:text>: </xsl:text>
<xsl:value-of select="/pica:record/pica:datafield[@tag='021A']/pica:subfield[@code='d']/text()"/>
</xsl:if>
</dc>
</title>
</xsl:otherwise>
</xsl:choose>
</dc>
</xsl:template>
<xsl:template match="pica:datafield[@tag='028A']">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment