DC to RLI mapping stylesheet
Click here to get the file
Size
4.3 kB
-
File type
text/xml
File contents
<?xml version="1.0" encoding="utf-8"?>
<!--
JISC ELF Discovery+ Poject - http://devil.lib.ed.ac.uk
Copyright (C) 2004, University of Edinburgh.
This stylesheet is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This styelsheet is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author: Boon Low
MARC2RLI xslt stylesheet version 1.0
Purpose: Mapping Dublin Core metadata (from Eprint UK)
to resource metadata based on the IMS RLI XML Binding
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.imsglobal.org/xsd/imsRLICommonSchema_v1p0" xmlns:jafer="http://www.jafer.org/formats/xml"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
exclude-result-prefixes="jafer dc oai_dc">
<xsl:template match="XMLRecord">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsRLICommonSchema_v1p0 http://www.imsglobal.org/rli/rliv1p0pd/bindings/rlicommon/xsd/imsRLICommonSchema_v1p0.xsd">
<xsl:apply-templates select="record/metadata"/>
</resource>
</xsl:template>
<xsl:template match="record/metadata">
<xsl:if test="../header">
<indexId>
<xsl:value-of select="../header/identifier"/>
</indexId>
</xsl:if>
<xsl:if test="dc/identifier">
<indexId>
<xsl:value-of select="dc/identifier"/>
</indexId>
</xsl:if>
<resourceMetadata>
<!-- *** description *** -->
<xsl:if test="dc/description">
<description>
<metadataLangString><xsl:value-of select="dc/description"/></metadataLangString>
</description>
</xsl:if>
<citation>
<!-- *** titles *** -->
<xsl:if test="dc/title">
<title>
<metadataLangString><xsl:value-of select="dc/title"/></metadataLangString>
</title>
</xsl:if>
<!-- *** authors *** -->
<xsl:for-each select="dc/creator">
<creator>
<metadataLangString>
<xsl:value-of select="."/>
</metadataLangString>
</creator>
</xsl:for-each>
<!-- *** Publication *** -->
<xsl:if test="dc/date">
<publicationDate>
<metadataDate>
<xsl:value-of select="dc/date"/>
</metadataDate>
</publicationDate>
</xsl:if>
<xsl:if test="dc/publisher">
<publisher>
<metadataLangString>
<xsl:value-of select="dc/publisher"/>
</metadataLangString>
</publisher>
</xsl:if>
<!-- *** identifiers *** -->
<xsl:if test="dc/identifier">
<standardIdentifier>
<standardIdentifierType>URI</standardIdentifierType>
<identifierString>
<metadataString><xsl:value-of select="dc/identifier"/></metadataString>
</identifierString>
</standardIdentifier>
</xsl:if>
</citation>
<!-- *** url for electronic resources *** -->
<xsl:if test="dc/identifier">
<location>
<locationType>URI</locationType>
<locator>
<metadataString><xsl:value-of select="dc/identifier"/></metadataString>
</locator>
</location>
</xsl:if>
<xsl:if test="starts-with(substring-after(dc/format, ' '), 'http')">
<location>
<locationType>URI</locationType>
<locator>
<metadataString><xsl:value-of select="substring-after(dc/format, ' ')"/></metadataString>
</locator>
</location>
</xsl:if>
</resourceMetadata>
</xsl:template>
</xsl:stylesheet>
Created by
boon
Last modified
2004-09-02 03:25 PM