dc-map.xslt 3.01 KB
<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet
        xmlns:xml="http://www.w3.org/XML/1998/namespace"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<dublin_core>
    <xsl:for-each select="/crossref/titles/title">        
        <dcvalue element="title" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>
    
    <xsl:for-each select="/crossref/issued/date">        
        <dcvalue element="date" qualifier="issued">
            <xsl:value-of select="year"/>
            <xsl:if test="month != ''">
                <xsl:text>-</xsl:text>
                <xsl:value-of select="month"/>
                <xsl:if test="day != ''">
                    <xsl:text>-</xsl:text>
                    <xsl:value-of select="day"/>
                </xsl:if>
            </xsl:if>
        </dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/container-titles/container-title">        
        <dcvalue element="source" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>
    <xsl:for-each select="/crossref/publisher">        
        <dcvalue element="publisher" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/authors/author">        
        <dcvalue element="contributor" qualifier="author">
            <xsl:value-of select="family"/>
            <xsl:text>, </xsl:text>
            <xsl:value-of select="given"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/DOI">        
        <dcvalue element="identifier" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/ISSNs/ISSN">        
        <dcvalue element="identifier" qualifier="issn"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/ISBNs/ISBN">        
        <dcvalue element="identifier" qualifier="isbn"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/type">        
        <dcvalue element="type" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/subjects/subject">        
        <dcvalue element="subject" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

    <xsl:for-each select="/crossref/editors/editor">        
        <dcvalue element="contributor" qualifier="editor"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>
    <xsl:for-each select="/crossref/translators/translator">        
        <dcvalue element="contributor" qualifier="other"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>
    <xsl:for-each select="/crossref/chairs/chair">        
        <dcvalue element="contributor" qualifier="other"><xsl:value-of select="text()"/></dcvalue>
    </xsl:for-each>

</dublin_core>


    </xsl:template>

</xsl:stylesheet>