OAI 2.0 (a.k.a XOAI) integrated into DSpace 3.0 (squashed)

This commit is contained in:
Lyncode
2012-08-15 17:00:34 +01:00
committed by Ivan Masár
parent deb732e3cb
commit 2442601073
92 changed files with 9973 additions and 4627 deletions

View File

@@ -4,7 +4,4 @@
<Parameter name="dspace-config" override="false"
value="${dspace.dir}/config/dspace.cfg"
description="Path to the DSpace configuration file." />
<Parameter name="properties" override="false"
value="${dspace.dir}/config/oaicat.properties"
description="The location of the oaicat.properties file." />
</Context>
</Context>

View File

@@ -356,12 +356,12 @@
</command>
<command>
<name>update-discovery-index</name>
<description>Update Discovery Solr Search Index</description>
<step>
<class>org.dspace.discovery.IndexClient</class>
</step>
</command>
<name>update-discovery-index</name>
<description>Update Discovery Solr Search Index</description>
<step>
<class>org.dspace.discovery.IndexClient</class>
</step>
</command>
<command>
<name>migrate-embargo</name>
@@ -371,6 +371,12 @@
</step>
</command>
<command>
<name>oai</name>
<description>OAI script manager</description>
<step>
<class>org.dspace.xoai.app.XOAI</class>
</step>
</command>
</commands>

View File

@@ -1,108 +1,25 @@
#---------------------------------------------------------------#
#-------------OAI-PMH & OAI-ORE CONFIGURATIONS------------------#
#--------------------XOAI CONFIGURATIONS------------------------#
#---------------------------------------------------------------#
# These configs are used by both OAI-PMH and OAI-ORE #
# (Harvester) Interfaces. #
#---------------------------------------------------------------#
# The base URL of the OAI webapp (do not include /request).
dspace.oai.url = ${dspace.baseUrl}/oai
#---------------------------------------------------------------#
#--------------OAI-PMH SPECIFIC CONFIGURATIONS------------------#
#---------------------------------------------------------------#
# These configs are only used by the OAI-PMH interface #
# These configs are used by the XOAI #
#---------------------------------------------------------------#
# Max response size for DIDL. This is the maximum size in bytes of the files you
# wish to enclose Base64 encoded in your responses, remember that the base64
# encoding process uses a lot of memory. We recommend at most 200000 for answers
# of 30 records each on a 1 Gigabyte machine. Ultimately, this will change to a
# streaming model and remove this restriction. Also please remember to allocate
# plenty of memory, at least 512 MB to your Tomcat.
#
# didl.maxresponse = 0
# Storage: solr | database
storage=solr
# DSpace by default uses 100 records as the limit for the oai responses.
# This can be altered by enabling the oai.response.max-records parameter
# and setting the desired amount of results.
response.max-records = 100
# Base solr index
solr.url=${solr.server}/oai
# OAI persistent identifier prefix.
# Format - oai:PREFIX:HANDLE
identifier.prefix = ${dspace.hostname}
# Base url for bitstreams
bitstream.baseUrl = ${dspace.url}
# Base Configuration Directory
config.dir = ${dspace.dir}/config/modules/oai
#---------------------------------------------------------------#
#--------------OAI HARVESTING CONFIGURATIONS--------------------#
#---------------------------------------------------------------#
# These configs are only used by the OAI-ORE related functions #
#---------------------------------------------------------------#
# Cache enabled?
cache.enabled = true
### Harvester settings
# Crosswalk settings; the {name} value must correspond to a declared ingestion crosswalk
# harvester.oai.metadataformats.{name} = {namespace},{optional display name}
# The display name is only used in the xmlui for the jspui there are entries in the
# Messages.properties in the form jsp.tools.edit-collection.form.label21.select.{name}
harvester.oai.metadataformats.dc = http://www.openarchives.org/OAI/2.0/oai_dc/, Simple Dublin Core
harvester.oai.metadataformats.qdc = http://purl.org/dc/terms/, Qualified Dublin Core
harvester.oai.metadataformats.dim = http://www.dspace.org/xmlns/dspace/dim, DSpace Intermediate Metadata
# This field works in much the same way as harvester.oai.metadataformats.PluginName
# The {name} must correspond to a declared ingestion crosswalk, while the
# {namespace} must be supported by the target OAI-PMH provider when harvesting content.
# harvester.oai.oreSerializationFormat.{name} = {namespace}
# Determines whether the harvester scheduling process should be started
# automatically when the DSpace webapp is deployed.
# default: false
harvester.autoStart=false
# Amount of time subtracted from the from argument of the PMH request to account
# for the time taken to negotiate a connection. Measured in seconds. Default value is 120.
#harvester.timePadding = 120
# How frequently the harvest scheduler checks the remote provider for updates,
# measured in minutes. The default value is 12 hours (or 720 minutes)
#harvester.harvestFrequency = 720
# The heartbeat is the frequency at which the harvest scheduler queries the local
# database to determine if any collections are due for a harvest cycle (based on
# the harvestFrequency) value. The scheduler is optimized to then sleep until the
# next collection is actually ready to be harvested. The minHeartbeat and
# maxHeartbeat are the lower and upper bounds on this timeframe. Measured in seconds.
# Default minHeartbeat is 30. Default maxHeartbeat is 3600.
#harvester.minHeartbeat = 30
#harvester.maxHeartbeat = 3600
# How many harvest process threads the scheduler can spool up at once. Default value is 3.
#harvester.maxThreads = 3
# How much time passess before a harvest thread is terminated. The termination process
# waits for the current item to complete ingest and saves progress made up to that point.
# Measured in hours. Default value is 24.
#harvester.threadTimeout = 24
# When harvesting an item that contains an unknown schema or field within a schema what
# should the harvester do? Either add a new registry item for the field or schema, ignore
# the specific field or schema (importing everything else about the item), or fail with
# an error. The default value if undefined is: fail.
# Possible values: 'fail', 'add', or 'ignore'
harvester.unknownField = add
harvester.unknownSchema = fail
# The webapp responsible for minting the URIs for ORE Resource Maps.
# If using oai, the dspace.oai.uri config value must be set.
# The URIs generated for ORE ReMs follow the following convention for both cases.
# format: [baseURI]/metadata/handle/[theHandle]/ore.xml
# Default value is oai
#ore.authoritative.source = oai
# A harvest process will attempt to scan the metadata of the incoming items
# (dc.identifier.uri field, to be exact) to see if it looks like a handle.
# If so, it matches the pattern against the values of this parameter.
# If there is a match the new item is assigned the handle from the metadata value
# instead of minting a new one. Default value: hdl.handle.net
#harvester.acceptedHandleServer = hdl.handle.net, handle.myu.edu
# Pattern to reject as an invalid handle prefix (known test string, for example)
# when attempting to find the handle of harvested items. If there is a match with
# this config parameter, a new handle will be minted instead. Default value: 123456789.
#harvester.rejectedHandlePrefix = 123456789, myTestHandle
# Base Cache Directory
cache.dir = ${dspace.dir}/var/oai

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
> http://www.openarchives.org/OAI/2.0/oai_dc.xsd
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<d:DIDL xmlns:d="urn:mpeg:mpeg21:2002:02-DIDL-NS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:mpeg:mpeg21:2002:02-DIDL-NS http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-21_schema_files/did/didl.xsd">
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']">
<d:DIDLInfo>
<dcterms:created xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ ">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field/text()" />
</dcterms:created>
</d:DIDLInfo>
</xsl:if>
<d:Item>
<xsl:attribute name="id">
<xsl:value-of select="doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text()" />
</xsl:attribute>
<d:Descriptor>
<d:Statement mimeType="application/xml; charset=utf-8">
<dii:Identifier xmlns:dii="urn:mpeg:mpeg21:2002:01-DII-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:mpeg21:2002:01-DII-NS http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-21_schema_files/dii/dii.xsd">urn:hdl:<xsl:value-of select="doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text()" /></dii:Identifier>
</d:Statement>
</d:Descriptor>
<d:Descriptor>
<d:Statement mimeType="application/xml; charset=utf-8">
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor><xsl:value-of select="." /></dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format><xsl:value-of select="." /></dc:format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
</oai_dc:dc>
</d:Statement>
</d:Descriptor>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']">
<xsl:if test="doc:field[@name='name']/text() = 'ORIGINAL'">
<xsl:for-each select="doc:element[@name='bitstreams']/doc:element">
<d:Component>
<xsl:attribute name="id">
<xsl:value-of select="/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text()"></xsl:value-of>/<xsl:value-of select="doc:field[@name='sid']/text()"></xsl:value-of>
</xsl:attribute>
<d:Resource>
<xsl:attribute name="ref">
<xsl:value-of select="doc:field[@name='url']/text()"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="mimeType">
<xsl:value-of select="doc:field[@name='format']/text()"></xsl:value-of>
</xsl:attribute>
</d:Resource>
</d:Component>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</d:Item>
</d:DIDL>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright detailed
in the LICENSE and NOTICE files at the root of the source tree and available
online at http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai" version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<!-- An identity transformation to show the internal XOAI generated XML -->
<xsl:template match="/">
<dim:dim xmlns:dim="http://www.dspace.org/xmlns/dspace/dim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.dspace.org/xmlns/dspace/dim http://www.dspace.org/schema/dim.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element/doc:element">
<xsl:choose>
<xsl:when test="doc:element">
<dim:field>
<xsl:attribute name="mdschema">
<xsl:value-of select="../../@name" />
</xsl:attribute>
<xsl:attribute name="element">
<xsl:value-of select="../@name" />
</xsl:attribute>
<xsl:attribute name="qualifier">
<xsl:value-of select="@name" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="doc:element[@name='none']"></xsl:when>
<xsl:otherwise>
<xsl:attribute name="lang">
<xsl:value-of select="doc:element/@name" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="doc:element/doc:field[@name='authority']">
<xsl:attribute name="authority">
<xsl:value-of select="doc:element/doc:field[@name='authority']/text()" />
</xsl:attribute>
</xsl:if>
<xsl:if test="doc:element/doc:field[@name='confidence']">
<xsl:attribute name="confidence">
<xsl:value-of select="doc:element/doc:field[@name='confidence']/text()" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</dim:field>
</xsl:when>
<xsl:otherwise>
<dim:field>
<xsl:attribute name="mdschema">
<xsl:value-of select="../../@name" />
</xsl:attribute>
<xsl:attribute name="element">
<xsl:value-of select="../@name" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="@name='none'"></xsl:when>
<xsl:otherwise>
<xsl:attribute name="lang">
<xsl:value-of select="@name" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="doc:field[@name='authority']">
<xsl:attribute name="authority">
<xsl:value-of select="doc:field[@name='authority']/text()" />
</xsl:attribute>
</xsl:if>
<xsl:if test="doc:field[@name='confidence']">
<xsl:attribute name="confidence">
<xsl:value-of select="doc:field[@name='confidence']/text()" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="doc:field[@name='value']/text()"></xsl:value-of>
</dim:field>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</dim:dim>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<thesis xmlns="http://www.ndltd.org/standards/metadata/etdms/1.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ndltd.org/standards/metadata/etdms/1.0/ http://www.ndltd.org/standards/metadata/etdms/1.0/etdms.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<title><xsl:value-of select="." /></title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<creator><xsl:value-of select="." /></creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<contributor><xsl:value-of select="." /></contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<subject><xsl:value-of select="." /></subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<description><xsl:value-of select="." /></description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<description><xsl:value-of select="." /></description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<date><xsl:value-of select="." /></date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<type><xsl:value-of select="." /></type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<identifier><xsl:value-of select="." /></identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<language><xsl:value-of select="." /></language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<relation><xsl:value-of select="." /></relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<relation><xsl:value-of select="." /></relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<rights><xsl:value-of select="." /></rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<rights><xsl:value-of select="." /></rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<format><xsl:value-of select="." /></format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<covarage><xsl:value-of select="." /></covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<covarage><xsl:value-of select="." /></covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<publisher><xsl:value-of select="." /></publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<publisher><xsl:value-of select="." /></publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<source><xsl:value-of select="." /></source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<source><xsl:value-of select="." /></source>
</xsl:for-each>
<xsl:if test="doc:metadata/doc:element[@name='thesis']">
<degree>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='name']/doc:element/doc:field[@name='value']">
<name><xsl:value-of select="." /></name>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='name']/doc:element/doc:element/doc:field[@name='value']">
<name><xsl:value-of select="." /></name>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='level']/doc:element/doc:field[@name='value']">
<level><xsl:value-of select="." /></level>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='level']/doc:element/doc:element/doc:field[@name='value']">
<level><xsl:value-of select="." /></level>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='discipline']/doc:element/doc:field[@name='value']">
<discipline><xsl:value-of select="." /></discipline>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='discipline']/doc:element/doc:element/doc:field[@name='value']">
<discipline><xsl:value-of select="." /></discipline>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='grantor']/doc:element/doc:field[@name='value']">
<grantor><xsl:value-of select="." /></grantor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='thesis']/doc:element[@name='grantor']/doc:element/doc:element/doc:field[@name='value']">
<grantor><xsl:value-of select="." /></grantor>
</xsl:for-each>
</degree>
</xsl:if>
</thesis>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
> http://www.loc.gov/marc/bibliographic/ecbdlist.html
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<record xmlns="http://www.loc.gov/MARC21/slim"
xmlns:dcterms="http://purl.org/dc/terms/"
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">
<leader>am 3u</leader>
<datafield ind2=" " ind1=" " tag="042">
<subfield code="a">dc</subfield>
</datafield>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<datafield ind2=" " ind1=" " tag="720">
<subfield code="a"><xsl:value-of select="." /></subfield>
<subfield code="e">author</subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<datafield tag="260">
<subfield code="c"><xsl:value-of select="." /></subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<datafield tag="520">
<subfield code="a"><xsl:value-of select="." /></subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<datafield ind1="8" tag="024">
<subfield code="a"><xsl:value-of select="." /></subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<datafield tag="653">
<subfield code="a"><xsl:value-of select="." /></subfield>
</datafield>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<datafield ind2="0" ind1="0" tag="245">
<subfield code="a"><xsl:value-of select="." /></subfield>
</datafield>
</xsl:for-each>
</record>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
> http://www.loc.gov/standards/mets/mets.xsd
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date" version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<mets xmlns="http://www.loc.gov/METS/" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="DSpace_ITEM_10400.7-31"
TYPE="DSpace ITEM" PROFILE="DSpace METS SIP Profile 1.0"
xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd">
<xsl:attribute name="OBJID">
hdl:<xsl:value-of select="doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text()"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="ID">
DSpace_ITEM_<xsl:value-of select="translate(doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(),'/','-')"></xsl:value-of>
</xsl:attribute>
<metsHdr>
<xsl:attribute name="CREATEDATE">
<xsl:value-of select="concat(date:format-date(date:date(), 'yyyy-MM-dd'), 'T' , date:format-date(date:time(), 'HH:mm:ss'), 'Z')"/>
</xsl:attribute>
<agent ROLE="CUSTODIAN" TYPE="ORGANIZATION">
<name><xsl:value-of select="doc:metadata/doc:element[@name='repository']/doc:field[@name='name']/text()" /></name>
</agent>
</metsHdr>
<dmdSec>
<xsl:attribute name="ID">
<xsl:value-of select="concat('DMD_', translate(doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'))" />
</xsl:attribute>
<mdWrap MDTYPE="MODS">
<xmlData xmlns:mods="http://www.loc.gov/mods/v3"
xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd">
<mods:mods
xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element">
<mods:name>
<mods:role>
<mods:roleTerm type="text"><xsl:value-of select="@name" /></mods:roleTerm>
</mods:role>
<mods:namePart><xsl:value-of select="doc:element/doc:field[@name='value']/text()" /></mods:namePart>
</mods:name>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']">
<mods:extension>
<mods:dateAccessioned encoding="iso8601">
<xsl:value-of select="doc:element/doc:field[@name='value']/text()" />
</mods:dateAccessioned>
</mods:extension>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']">
<mods:extension>
<mods:dateAvailable encoding="iso8601">
<xsl:value-of select="doc:field[@name='value']/text()" />
</mods:dateAvailable>
</mods:extension>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']">
<mods:originInfo>
<mods:dateIssued encoding="iso8601">
<xsl:value-of select="doc:element/doc:field[@name='value']/text()" />
</mods:dateIssued>
</mods:originInfo>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element">
<mods:identifier>
<xsl:attribute name="type">
<xsl:value-of select="@name"></xsl:value-of>
</xsl:attribute>
<xsl:value-of select="doc:element/doc:field[@name='value']/text()" />
</mods:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element">
<mods:abstract>
<xsl:value-of select="doc:field[@name='value']/text()" />
</mods:abstract>
</xsl:for-each>
<mods:language>
<mods:languageTerm authority="rfc3066"><xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']"></xsl:value-of></mods:languageTerm>
</mods:language>
<mods:accessCondition type="useAndReproduction"><xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']"></xsl:value-of></mods:accessCondition>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<mods:subject>
<mods:topic><xsl:value-of select="text()" /></mods:topic>
</mods:subject>
</xsl:for-each>
<mods:titleInfo>
<mods:title><xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']"></xsl:value-of></mods:title>
</mods:titleInfo>
<mods:genre><xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']"></xsl:value-of></mods:genre>
</mods:mods>
</xmlData>
</mdWrap>
</dmdSec>
<xsl:if test="doc:metadata/doc:element[@name='license']/doc:field[@name='bin']">
<amdSec>
<xsl:attribute name="ID">
<xsl:value-of select="concat('TMD_', translate(doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'))" />
</xsl:attribute>
<rightsMD>
<xsl:attribute name="ID">
<xsl:value-of select="concat('RIG_', translate(doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'))" />
</xsl:attribute>
<mdWrap MIMETYPE="text/plain" MDTYPE="OTHER" OTHERMDTYPE="DSpaceDepositLicense">
<binData><xsl:value-of select="doc:metadata/doc:element[@name='license']/doc:field[@name='bin']/text()" /></binData>
</mdWrap>
</rightsMD>
</amdSec>
</xsl:if>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element/doc:field[text()='ORIGINAL']">
<xsl:for-each select="../doc:element[@name='bitstreams']/doc:element">
<amdSec>
<xsl:attribute name="ID">
<xsl:value-of select="concat('FO_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<techMD>
<xsl:attribute name="ID">
<xsl:value-of select="concat('TECH_O_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<mdWrap MDTYPE="PREMIS">
<xmlData xmlns:premis="http://www.loc.gov/standards/premis"
xsi:schemaLocation="http://www.loc.gov/standards/premis http://www.loc.gov/standards/premis/PREMIS-v1-0.xsd">
<premis:premis>
<premis:object>
<premis:objectIdentifier>
<premis:objectIdentifierType>URL</premis:objectIdentifierType>
<premis:objectIdentifierValue><xsl:value-of select="doc:field[@name='url']/text()" /></premis:objectIdentifierValue>
</premis:objectIdentifier>
<premis:objectCategory>File</premis:objectCategory>
<premis:objectCharacteristics>
<premis:fixity>
<premis:messageDigestAlgorithm><xsl:value-of select="doc:field[@name='checksumAlgorithm']/text()" /></premis:messageDigestAlgorithm>
<premis:messageDigest><xsl:value-of select="doc:field[@name='checksum']/text()" /></premis:messageDigest>
</premis:fixity>
<premis:size><xsl:value-of select="doc:field[@name='size']/text()" /></premis:size>
<premis:format>
<premis:formatDesignation>
<premis:formatName><xsl:value-of select="doc:field[@name='format']/text()" /></premis:formatName>
</premis:formatDesignation>
</premis:format>
</premis:objectCharacteristics>
<premis:originalName><xsl:value-of select="doc:field[@name='name']/text()" /></premis:originalName>
</premis:object>
</premis:premis>
</xmlData>
</mdWrap>
</techMD>
</amdSec>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element/doc:field[text()='TEXT']">
<xsl:for-each select="../doc:element[@name='bitstreams']/doc:element">
<amdSec>
<xsl:attribute name="ID">
<xsl:value-of select="concat('FT_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<techMD>
<xsl:attribute name="ID">
<xsl:value-of select="concat('TECH_T_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<mdWrap MDTYPE="PREMIS">
<xmlData xmlns:premis="http://www.loc.gov/standards/premis"
xsi:schemaLocation="http://www.loc.gov/standards/premis http://www.loc.gov/standards/premis/PREMIS-v1-0.xsd">
<premis:premis>
<premis:object>
<premis:objectIdentifier>
<premis:objectIdentifierType>URL</premis:objectIdentifierType>
<premis:objectIdentifierValue><xsl:value-of select="doc:field[@name='url']/text()" /></premis:objectIdentifierValue>
</premis:objectIdentifier>
<premis:objectCategory>File</premis:objectCategory>
<premis:objectCharacteristics>
<premis:fixity>
<premis:messageDigestAlgorithm><xsl:value-of select="doc:field[@name='checksumAlgorithm']/text()" /></premis:messageDigestAlgorithm>
<premis:messageDigest><xsl:value-of select="doc:field[@name='checksum']/text()" /></premis:messageDigest>
</premis:fixity>
<premis:size><xsl:value-of select="doc:field[@name='size']/text()" /></premis:size>
<premis:format>
<premis:formatDesignation>
<premis:formatName><xsl:value-of select="doc:field[@name='format']/text()" /></premis:formatName>
</premis:formatDesignation>
</premis:format>
</premis:objectCharacteristics>
<premis:originalName><xsl:value-of select="doc:field[@name='name']/text()" /></premis:originalName>
</premis:object>
</premis:premis>
</xmlData>
</mdWrap>
</techMD>
</amdSec>
</xsl:for-each>
</xsl:for-each>
<fileSec>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element/doc:field[text()='ORIGINAL']">
<fileGrp USE="ORIGINAL">
<xsl:for-each select="../doc:element[@name='bitstreams']/doc:element">
<file>
<xsl:attribute name="ID">
<xsl:value-of select="concat('BITSTREAM_ORIGINAL_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<xsl:attribute name="MIMETYPE">
<xsl:value-of select="doc:field[@name='format']/text()" />
</xsl:attribute>
<xsl:attribute name="SEQ">
<xsl:value-of select="doc:field[@name='sid']/text()" />
</xsl:attribute>
<xsl:attribute name="SIZE">
<xsl:value-of select="doc:field[@name='size']/text()" />
</xsl:attribute>
<xsl:attribute name="CHECKSUM">
<xsl:value-of select="doc:field[@name='checksum']/text()" />
</xsl:attribute>
<xsl:attribute name="CHECKSUMTYPE">
<xsl:value-of select="doc:field[@name='checksumAlgorithm']/text()" />
</xsl:attribute>
<xsl:attribute name="ADMID">
<xsl:value-of select="concat('FO_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<xsl:attribute name="GROUPID">
<xsl:value-of select="concat('GROUP_BITSTREAM_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<FLocat LOCTYPE="URL" xlink:type="simple">
<xsl:attribute name="xlink:href">
<xsl:value-of select="doc:field[@name='url']/text()" />
</xsl:attribute>
</FLocat>
</file>
</xsl:for-each>
</fileGrp>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element/doc:field[text()='TEXT']">
<fileGrp USE="TEXT">
<xsl:for-each select="../doc:element[@name='bitstreams']/doc:element">
<file>
<xsl:attribute name="ID">
<xsl:value-of select="concat('BITSTREAM_TEXT_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<xsl:attribute name="MIMETYPE">
<xsl:value-of select="doc:field[@name='format']/text()" />
</xsl:attribute>
<xsl:attribute name="SEQ">
<xsl:value-of select="doc:field[@name='sid']/text()" />
</xsl:attribute>
<xsl:attribute name="SIZE">
<xsl:value-of select="doc:field[@name='size']/text()" />
</xsl:attribute>
<xsl:attribute name="CHECKSUM">
<xsl:value-of select="doc:field[@name='checksum']/text()" />
</xsl:attribute>
<xsl:attribute name="CHECKSUMTYPE">
<xsl:value-of select="doc:field[@name='checksumAlgorithm']/text()" />
</xsl:attribute>
<xsl:attribute name="ADMID">
<xsl:value-of select="concat('FT_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<xsl:attribute name="GROUPID">
<xsl:value-of select="concat('GROUP_BITSTREAM_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
<FLocat LOCTYPE="URL" xlink:type="simple">
<xsl:attribute name="xlink:href">
<xsl:value-of select="doc:field[@name='url']/text()" />
</xsl:attribute>
</FLocat>
</file>
</xsl:for-each>
</fileGrp>
</xsl:for-each>
</fileSec>
<structMap LABEL="DSpace Object" TYPE="LOGICAL">
<div TYPE="DSpace Object Contents">
<xsl:attribute name="ADMID">
<xsl:value-of select="concat('DMD_', translate(doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'))" />
</xsl:attribute>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element/doc:field[text()='ORIGINAL']">
<xsl:for-each select="../doc:element[@name='bitstreams']/doc:element">
<div TYPE="DSpace BITSTREAM">
<fptr>
<xsl:attribute name="FILEID">
<xsl:value-of select="concat('BITSTREAM_ORIGINAL_', translate(/doc:metadata/doc:element[@name='others']/doc:field[@name='handle']/text(), '/', '_'), '_', doc:field[@name='sid']/text())" />
</xsl:attribute>
</fptr>
</div>
</xsl:for-each>
</xsl:for-each>
</div>
</structMap>
</mets>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<mods:mods xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<mods:name>
<mods:namePart><xsl:value-of select="." /></mods:namePart>
</mods:name>
</xsl:for-each>
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']/doc:element/doc:field[@name='value']">
<mods:extension>
<mods:dateAvailable encoding="iso8601">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</mods:dateAvailable>
</mods:extension>
</xsl:if>
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']">
<mods:extension>
<mods:dateAccessioned encoding="iso8601">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</mods:dateAccessioned>
</mods:extension>
</xsl:if>
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<mods:originInfo>
<mods:dateIssued encoding="iso8601">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</mods:dateIssued>
</mods:originInfo>
</xsl:if>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<mods:identifier>
<xsl:attribute name="type">
<xsl:value-of select="../../@name" />
</xsl:attribute>
<xsl:value-of select="." />
</mods:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<mods:abstract><xsl:value-of select="." /></mods:abstract>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<mods:language>
<mods:languageTerm><xsl:value-of select="." /></mods:languageTerm>
</mods:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<mods:accessCondition type="useAndReproduction"><xsl:value-of select="." /></mods:accessCondition>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<mods:accessCondition type="useAndReproduction"><xsl:value-of select="." /></mods:accessCondition>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<mods:subject>
<mods:topic><xsl:value-of select="." /></mods:topic>
</mods:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<mods:titleInfo>
<mods:title><xsl:value-of select="." /></mods:title>
</mods:titleInfo>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<mods:genre><xsl:value-of select="." /></mods:genre>
</xsl:for-each>
</mods:mods>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
> http://www.openarchives.org/OAI/2.0/oai_dc.xsd
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/doc:elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor><xsl:value-of select="." /></dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format><xsl:value-of select="." /></dc:format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
</oai_dc:dc>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:ore="http://www.openarchives.org/ore/terms/" xmlns:oreatom="http://www.openarchives.org/ore/atom/"
xmlns:dcterms="http://purl.org/dc/terms/">
<atom:id>
<xsl:value-of select="concat(doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']/text(), '/ore.xml')"></xsl:value-of>
</atom:id>
<atom:link rel="alternate">
<xsl:attribute name="href">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</xsl:attribute>
</atom:link>
<atom:link rel="http://www.openarchives.org/ore/terms/describes">
<xsl:attribute name="href">
<xsl:value-of select="concat(doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']/text(), '/ore.xml')"></xsl:value-of>
</xsl:attribute>
</atom:link>
<atom:link rel="self" type="application/atom+xml">
<xsl:attribute name="href">
<xsl:value-of select="concat(doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']/text(), '/ore.xml#atom')"></xsl:value-of>
</xsl:attribute>
</atom:link>
<atom:published>
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</atom:published>
<atom:updated>
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</atom:updated>
<atom:source>
<atom:generator>
<xsl:value-of select="doc:metadata/doc:element[@name='repository']/doc:field[@name='name']/text()"></xsl:value-of>
</atom:generator>
</atom:source>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<atom:title><xsl:value-of select="." /></atom:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<atom:author><atom:name><xsl:value-of select="." /></atom:name></atom:author>
</xsl:for-each>
<atom:category scheme="http://www.openarchives.org/ore/terms/"
term="http://www.openarchives.org/ore/terms/Aggregation" label="Aggregation" />
<atom:category scheme="http://www.openarchives.org/ore/atom/modified">
<xsl:attribute name="term">
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</xsl:attribute>
</atom:category>
<atom:category scheme="http://www.dspace.org/objectModel/" term="DSpaceItem" label="DSpace Item" />
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']">
<xsl:if test="doc:field[@name='name']/text() = 'ORIGINAL'">
<xsl:for-each select="doc:element[@name='bitstreams']/doc:element[@name='bitstream']">
<atom:link rel="http://www.openarchives.org/ore/terms/aggregates">
<xsl:attribute name="href">
<xsl:value-of select="doc:field[@name='url']/text()"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="doc:field[@name='name']/text()"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="doc:field[@name='format']/text()"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="length">
<xsl:value-of select="doc:field[@name='size']/text()"></xsl:value-of>
</xsl:attribute>
</atom:link>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
<oreatom:triples>
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:attribute name="rdf:about">
<xsl:value-of select="concat(doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']/text(), '/ore.xml#atom')"></xsl:value-of>
</xsl:attribute>
<rdf:type rdf:resource="http://www.dspace.org/objectModel/DSpaceItem" />
<dcterms:modified>
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='accessioned']/doc:element/doc:field[@name='value']/text()"></xsl:value-of>
</dcterms:modified>
</rdf:Description>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']/doc:element[@name='bitstreams']/doc:element[@name='bitstream']">
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:attribute name="rdf:about">
<xsl:value-of select="doc:field[@name='url']/text()"></xsl:value-of>
</xsl:attribute>
<rdf:type rdf:resource="http://www.dspace.org/objectModel/DSpaceBitstream" />
<dcterms:description>
<xsl:value-of select="../../doc:field[@name='name']/text()"></xsl:value-of>
</dcterms:description>
</rdf:Description>
</xsl:for-each>
</oreatom:triples>
</atom:entry>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,345 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
> http://www.openarchives.org/OAI/2.0/oai_dc.xsd
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dcterms:abstract xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dcterms:abstract>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']">
<dcterms:dateAccepted xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dcterms:dateAccepted>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']">
<dcterms:available xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dcterms:available>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='available']/doc:element/doc:field[@name='value']">
<dcterms:created xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dcterms:created>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<dcterms:issued xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dcterms:issued>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd">
<xsl:choose>
<xsl:when test="../../doc:element[@name='none']">
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="../../doc:element/@name"></xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="." />
</dc:source>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<rdf:RDF xmlns:rdf="http://www.openarchives.org/OAI/2.0/rdf/"
xmlns:ow="http://www.ontoweb.org/ontology/1#" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ds="http://dspace.org/ds/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/rdf/ http://www.openarchives.org/OAI/2.0/rdf.xsd">
<ow:Publication>
<xsl:if test="doc:metadata/doc:element[@name='others']/doc:field[@name='identifier']">
<xsl:attribute name="rdf:about">
<xsl:value-of select="doc:metadata/doc:element[@name='others']/doc:field[@name='identifier']/text()"></xsl:value-of>
</xsl:attribute>
</xsl:if>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor><xsl:value-of select="." /></dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format><xsl:value-of select="." /></dc:format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='peerreviewed']">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='peerreviewed']/doc:element/doc:element/doc:field[@name='value']">
<dc:peerreviewed><xsl:value-of select="." /></dc:peerreviewed>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='peerreviewed']/doc:element/doc:field[@name='value']">
<dc:peerreviewed><xsl:value-of select="." /></dc:peerreviewed>
</xsl:for-each>
</xsl:if>
</ow:Publication>
</rdf:RDF>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<uketd_dc:uketddc
xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/ http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<dcterms:issued><xsl:value-of select="." /></dcterms:issued>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']">
<dcterms:isReferencedBy xsi:type="dcterms:URI"><xsl:value-of select="." /></dcterms:isReferencedBy>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dcterms:abstract><xsl:value-of select="." /></dcterms:abstract>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor><xsl:value-of select="." /></dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format><xsl:value-of select="." /></dc:format>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']/doc:element[@name='bitstreams']/doc:element[@name='bitstream']">
<dc:identifier xsi:type="dcterms:URI"><xsl:value-of select="doc:field[@name='url']/text()" /></dc:identifier>
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
</xsl:for-each>
</uketd_dc:uketddc>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<!-- An identity transformation to show the internal XOAI generated XML -->
<xsl:template match="/ | @* | node()">
<xsl:copy-of select="@* | node()">
</xsl:copy-of>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
Following Driver Guidelines 2.0:
- http://www.driver-support.eu/managers.html#guidelines
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://www.lyncode.com/xoai">
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<!-- Formatting dc.date.issued -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field/text()">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="." />
</xsl:call-template>
</xsl:template>
<!-- Removing other dc.date.* -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name!='issued']" />
<!-- Prefixing dc.type -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field/text()">
<xsl:call-template name="addPrefix">
<xsl:with-param name="value" select="." />
<xsl:with-param name="prefix" select="'info:eu-repo/semantics/'"></xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- Prefixing and Modifying dc.rights -->
<!-- Removing unwanted -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element" />
<!-- Replacing -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field/text()">
<xsl:text>info:eu-repo/semantics/openAccess</xsl:text>
</xsl:template>
<!-- AUXILIARY TEMPLATES -->
<!-- dc.type prefixing -->
<xsl:template name="addPrefix">
<xsl:param name="value" />
<xsl:param name="prefix" />
<xsl:choose>
<xsl:when test="starts-with($value, $prefix)">
<xsl:value-of select="$value" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($prefix, $value)" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Date format -->
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<xsl:variable name="sub">
<xsl:value-of select="substring($datestr,1,10)" />
</xsl:variable>
<xsl:value-of select="$sub" />
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
Following OpenAIRE Guidelines 1.1:
- http://www.openaire.eu/component/content/article/207
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://www.lyncode.com/xoai">
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<!-- Formatting dc.date.issued -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field/text()">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="." />
</xsl:call-template>
</xsl:template>
<!-- Removing other dc.date.* -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name!='issued']" />
<!-- Prefixing dc.type -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field/text()">
<xsl:call-template name="addPrefix">
<xsl:with-param name="value" select="." />
<xsl:with-param name="prefix" select="'info:eu-repo/semantics/'"></xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- Prefixing and Modifying dc.rights -->
<!-- Removing unwanted -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element" />
<!-- Replacing -->
<xsl:template match="/doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field/text()">
<xsl:choose>
<xsl:when test="contains(., 'open access')">
<xsl:text>info:eu-repo/semantics/openAccess</xsl:text>
</xsl:when>
<xsl:when test="contains(., 'openAccess')">
<xsl:text>info:eu-repo/semantics/openAccess</xsl:text>
</xsl:when>
<xsl:when test="contains(., 'restrictedAccess')">
<xsl:text>info:eu-repo/semantics/restrictedAccess</xsl:text>
</xsl:when>
<xsl:when test="contains(., 'embargoedAccess')">
<xsl:text>info:eu-repo/semantics/embargoedAccess</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>info:eu-repo/semantics/restrictedAccess</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- AUXILIARY TEMPLATES -->
<!-- dc.type prefixing -->
<xsl:template name="addPrefix">
<xsl:param name="value" />
<xsl:param name="prefix" />
<xsl:choose>
<xsl:when test="starts-with($value, $prefix)">
<xsl:value-of select="$value" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($prefix, $value)" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Date format -->
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<xsl:variable name="sub">
<xsl:value-of select="substring($datestr,1,10)" />
</xsl:variable>
<xsl:value-of select="$sub" />
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<Configuration xmlns="http://www.lyncode.com/XOAIConfiguration"
identation="false" maxListIdentifiersSize="100" maxListRecordsSize="100"
maxListSetsSize="100" stylesheet="static/style.xsl">
<Contexts>
<Context baseurl="request">
<Format refid="oaidc" />
<Format refid="mets" />
<Format refid="xoai" />
<Format refid="didl" />
<Format refid="dim" />
<Format refid="ore" />
<Format refid="rdf" />
<Format refid="etdms" />
<Format refid="mods" />
<Format refid="qdc" />
<Format refid="marc" />
<Format refid="uketd_dc" />
</Context>
<!--
Driver Guidelines:
- http://www.driver-support.eu/documents/DRIVER_Guidelines_v2_Final_2008-11-13.pdf
Page 57 - 58
-->
<Context baseurl="driver">
<!-- Date format, field prefixes, etc are ensured by the transformer -->
<Transformer refid="driverTransformer"/>
<!-- Title : Mandatory -->
<Filter refid="titleexistsFilter" />
<!-- Author : Mandatory -->
<Filter refid="authorexistsFilter"/>
<!-- Possible Document Type -->
<Filter refid="driverdocumenttypeFilter"/>
<!-- dc.rights must contain openAccess token -->
<Filter refid="driveraccessFilter"/>
<!-- Open Access (Downloadable) -->
<Filter refid="bitstreamaccessFilter"/>
<!-- Just an alias, if fact it returns all items within the driver context -->
<Set refid="driverSet" />
<!-- Metadata Formats -->
<Format refid="oaidc"/>
<Format refid="mets" />
<Format refid="didl" />
</Context>
<!--
OpenAIRE Guidelines 1.1:
- http://www.openaire.eu/en/component/attachments/download/79%E2%8C%A9=en
There is a limitation over the embargoedEndDate parameter:
- Predefined DSpace fields don't allow to set this up with a default.
-->
<Context baseurl="openaire">
<!-- Date format, field prefixes, etc are ensured by the transformer -->
<Transformer refid="openaireTransformer" />
<!-- Title : Mandatory -->
<Filter refid="titleexistsFilter" />
<!-- Author : Mandatory -->
<Filter refid="authorexistsFilter"/>
<!-- Possible Document Type (same as Driver)-->
<Filter refid="driverdocumenttypeFilter"/>
<!-- dc.relation must has the specified prefix -->
<Filter refid="openairerelationFilter" />
<!-- Just an alias, if fact it returns all items within the driver context -->
<Set refid="openaireSet" />
<!-- Metadata Formats -->
<Format refid="oaidc" />
<Format refid="mets" />
</Context>
</Contexts>
<Formats>
<Format id="oaidc">
<Prefix>oai_dc</Prefix>
<XSLT>metadataFormats/oai_dc.xsl</XSLT>
<Namespace>http://www.openarchives.org/OAI/2.0/oai_dc/</Namespace>
<SchemaLocation>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</SchemaLocation>
</Format>
<Format id="mets">
<Prefix>mets</Prefix>
<XSLT>metadataFormats/mets.xsl</XSLT>
<Namespace>http://www.loc.gov/METS/</Namespace>
<SchemaLocation>http://www.loc.gov/standards/mets/mets.xsd</SchemaLocation>
</Format>
<!-- Shows the XOAI internal generated XML -->
<Format id="xoai">
<Prefix>xoai</Prefix>
<XSLT>metadataFormats/xoai.xsl</XSLT>
<Namespace>http://www.lyncode.com/xoai</Namespace>
<SchemaLocation>http://www.lyncode.com/schemas/xoai.xsd</SchemaLocation>
</Format>
<Format id="didl">
<Prefix>didl</Prefix>
<XSLT>metadataFormats/didl.xsl</XSLT>
<Namespace>urn:mpeg:mpeg21:2002:02-DIDL-NS</Namespace>
<SchemaLocation>http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-21_schema_files/did/didl.xsd</SchemaLocation>
</Format>
<Format id="dim">
<Prefix>dim</Prefix>
<XSLT>metadataFormats/dim.xsl</XSLT>
<Namespace>http://www.dspace.org/xmlns/dspace/dim</Namespace>
<SchemaLocation>http://www.dspace.org/schema/dim.xsd</SchemaLocation>
</Format>
<Format id="ore">
<Prefix>ore</Prefix>
<XSLT>metadataFormats/ore.xsl</XSLT>
<Namespace>http://www.w3.org/2005/Atom</Namespace>
<SchemaLocation>http://tweety.lanl.gov/public/schemas/2008-06/atom-tron.sch</SchemaLocation>
</Format>
<Format id="rdf">
<Prefix>rdf</Prefix>
<XSLT>metadataFormats/rdf.xsl</XSLT>
<Namespace>http://www.openarchives.org/OAI/2.0/rdf/</Namespace>
<SchemaLocation>http://www.openarchives.org/OAI/2.0/rdf.xsd</SchemaLocation>
</Format>
<Format id="etdms">
<Prefix>etdms</Prefix>
<XSLT>metadataFormats/etdms.xsl</XSLT>
<Namespace>http://www.ndltd.org/standards/metadata/etdms/1.0/</Namespace>
<SchemaLocation>http://www.ndltd.org/standards/metadata/etdms/1.0/etdms.xsd</SchemaLocation>
</Format>
<Format id="mods">
<Prefix>mods</Prefix>
<XSLT>metadataFormats/mods.xsl</XSLT>
<Namespace>http://www.loc.gov/mods/v3</Namespace>
<SchemaLocation>http://www.loc.gov/standards/mods/v3/mods-3-1.xsd</SchemaLocation>
</Format>
<Format id="qdc">
<Prefix>qdc</Prefix>
<XSLT>metadataFormats/qdc.xsl</XSLT>
<Namespace>http://purl.org/dc/terms/</Namespace>
<SchemaLocation>http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd</SchemaLocation>
</Format>
<Format id="marc">
<Prefix>marc</Prefix>
<XSLT>metadataFormats/marc.xsl</XSLT>
<Namespace>http://www.loc.gov/MARC21/slim</Namespace>
<SchemaLocation>http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd</SchemaLocation>
</Format>
<Format id="uketd_dc">
<Prefix>uketd_dc</Prefix>
<XSLT>metadataFormats/uketd_dc.xsl</XSLT>
<Namespace>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/</Namespace>
<SchemaLocation>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd</SchemaLocation>
</Format>
</Formats>
<Transformers>
<Transformer id="driverTransformer">
<XSLT>transformers/driver.xsl</XSLT>
</Transformer>
<Transformer id="openaireTransformer">
<XSLT>transformers/openaire.xsl</XSLT>
</Transformer>
</Transformers>
<Filters>
<Filter id="authorexistsFilter">
<Class>org.dspace.xoai.filter.DSpaceMetadataExistsFilter</Class>
<Parameter key="field">
<Value>dc.contributor.author</Value>
</Parameter>
</Filter>
<Filter id="titleexistsFilter">
<Class>org.dspace.xoai.filter.DSpaceMetadataExistsFilter</Class>
<Parameter key="field">
<Value>dc.title</Value>
</Parameter>
</Filter>
<Filter id="driverdocumenttypeFilter">
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
<Parameter key="field">
<Value>dc.type</Value>
</Parameter>
<Parameter key="operator">
<Value>ends_with</Value>
</Parameter>
<Parameter key="value">
<Value>article</Value>
<Value>bachelorThesis</Value>
<Value>masterThesis</Value>
<Value>doctoralThesis</Value>
<Value>book</Value>
<Value>bookPart</Value>
<Value>review</Value>
<Value>conferenceObject</Value>
<Value>lecture</Value>
<Value>workingPaper</Value>
<Value>preprint</Value>
<Value>report</Value>
<Value>annotation</Value>
<Value>contributionToPeriodical</Value>
<Value>patent</Value>
<Value>other</Value>
</Parameter>
</Filter>
<Filter id="driveraccessFilter">
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
<Parameter key="field">
<Value>dc.rights</Value>
</Parameter>
<Parameter key="operator">
<Value>contains</Value>
</Parameter>
<Parameter key="value">
<Value>open access</Value>
<Value>openAccess</Value>
</Parameter>
</Filter>
<Filter id="bitstreamaccessFilter">
<Class>org.dspace.xoai.filter.DSpaceAuthorizationFilter</Class>
</Filter>
<Filter id="openairerelationFilter">
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
<Parameter key="field">
<Value>dc.relation</Value>
</Parameter>
<Parameter key="operator">
<Value>starts_with</Value>
</Parameter>
<Parameter key="value">
<Value>info:eurepo/grantAgreement/EC/FP</Value>
</Parameter>
</Filter>
</Filters>
<Sets>
<Set id="driverSet">
<Pattern>driver</Pattern>
<Name>Open Access DRIVERset</Name>
<!-- Just an alias -->
</Set>
<Set id="openaireSet">
<Pattern>ec_fundedresources</Pattern>
<Name>EC_fundedresources set</Name>
<!-- Just an alias -->
</Set>
</Sets>
</Configuration>

View File

@@ -1,52 +0,0 @@
###########################################################################
# REMEMBER: ONLY UPDATE THE VERSION IN dspace/config/templates
# AND THEN RUN dspace/bin/install-configs!
# DO NOT EDIT THE 'LIVE' VERSION!
###########################################################################
# OAICat Configuration file - see OAICat documentation for details
# Text surrounded by two '${' and '}' symbols is replaced with the corresponding
# property from dspace.cfg. For example:
#
# ${dspace.url}
#
# would be replaced with the dspace.url property in dspace.cfg on Maven compilation
AbstractCatalog.oaiCatalogClassName=org.dspace.app.oai.DSpaceOAICatalog
AbstractCatalog.recordFactoryClassName=org.dspace.app.oai.DSpaceRecordFactory
AbstractCatalog.secondsToLive=3600
AbstractCatalog.granularity=YYYY-MM-DDThh:mm:ssZ
# Custom Identify response values
Identify.repositoryName=${dspace.name}
Identify.adminEmail=${mail.admin}
Identify.earliestDatestamp=2001-01-01T00:00:00Z
Identify.deletedRecord=persistent
# List the supported metadataPrefixes along with the class that performs the associated crosswalk
#Crosswalks.didl=org.dspace.app.oai.DIDLCrosswalk
Crosswalks.mets=org.dspace.app.oai.METSCrosswalk
Crosswalks.oai_dc=org.dspace.app.oai.OAIDCCrosswalk
Crosswalks.rdf=org.dspace.app.oai.RDFCrosswalk
#Crosswalks.uketd_dc=org.dspace.app.oai.UKETDDCCrosswalk
# The following OAI crosswalks use crosswalk plugins defined in dspace.cfg.
# The metadataPrefixes must match the name of the plugin
# for interface org.dspace.content.crosswalk.DisseminationCrosswalk
# (e.g. "ore" matches the DisseminationCrosswalk of that name in dspace.cfg)
Crosswalks.ore=org.dspace.app.oai.PluginCrosswalk
# Uncomment any of the below plugins to enable other harvestable metadata
# formats. Remember to also check the corresponding DisseminationCrosswalk
# settings in your dspace.cfg file.
# Crosswalks.mods=org.dspace.app.oai.PluginCrosswalk
# Crosswalks.mets=org.dspace.app.oai.PluginCrosswalk
# Crosswalks.qdc=org.dspace.app.oai.PluginCrosswalk
# Crosswalks.dim=org.dspace.app.oai.PluginCrosswalk
# Crosswalks.marc=org.dspace.app.oai.PluginCrosswalk
# XSLT stylesheet to transform OAI-PMH XML results in web browser to
# human-readable and browsable HTML pages
OAIHandler.styleSheet=/oai/oai2.xsl

View File

@@ -1,101 +1,131 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace.modules</groupId>
<artifactId>oai</artifactId>
<packaging>war</packaging>
<name>DSpace OAI :: Web Application</name>
<description>
DSpace OAI Service Provider Web Application
</description>
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>modules</artifactId>
<groupId>org.dspace</groupId>
<version>3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.dspace.modules</groupId>
<artifactId>oai</artifactId>
<packaging>war</packaging>
<name>DSpace OAI 2.0 :: Web Application</name>
<url>http://www.lyncode.com</url>
<description>XOAI Interface</description>
<!--
A Parent POM that Maven inherits DSpace Default
POM atrributes from.
-->
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<webResources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>WEB-INF/web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<webResources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>WEB-INF/web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<activation>
<property>
<name>dspace.config</name>
</property>
</activation>
<build>
<filters>
<filter>${dspace.config}</filter>
</filters>
</build>
</profile>
<profile>
<id>oracle-support</id>
<activation>
<property>
<name>db.name</name>
<value>oracle</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>postgres-support</id>
<activation>
<property>
<name>!db.name</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai-webapp</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai-api</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.5.6</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>postgres-support</id>
<activation>
<property>
<name>!db.name</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>oracle-support</id>
<activation>
<property>
<name>db.name</name>
<value>oracle</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<developers>
<developer>
<id>lyncode</id>
<email>dspace@lyncode.com</email>
<name>DSpace @ Lyncode</name>
<url>http://www.lyncode.com</url>
</developer>
</developers>
</project>
<dependencies>
<dependency>
<groupId>org.dspace.modules</groupId>
<artifactId>additions</artifactId>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai-webapp</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -52,15 +52,6 @@
<module>lni</module>
</modules>
</profile>
<profile>
<id>dspace-oai</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>oai</module>
</modules>
</profile>
<profile>
<id>dspace-jspui</id>
<activation>
@@ -97,5 +88,14 @@
<module>solr</module>
</modules>
</profile>
<profile>
<id>dspace-xoai</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>oai</module>
</modules>
</profile>
</profiles>
</project>

View File

@@ -84,5 +84,16 @@
</plugins>
</build>
<dependencies>
<!-- Don't know how to add artifacts to dspace lib -->
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,31 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The content of this page will be statically included into the top
of the admin page. Uncomment this as an example to see there the content
will show up.
<hr>
<i>This line will appear before the first table</i>
<tr>
<td colspan="2">
This row will be appended to the end of the first table
</td>
</tr>
<hr>
-->

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
-->
<elevate>
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>
<query text="ipod">
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
</query>
</elevate>

View File

@@ -0,0 +1,21 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-----------------------------------------------------------------------
# Use a protected word file to protect against the stemmer reducing two
# unrelated words to the same base word.
# Some non-words that normally won't be encountered,
# just to test that they won't be stemmed.
dontstems
zwhacky

View File

@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="xoai" version="1.2">
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
<fieldtype name="binary" class="solr.BinaryField"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="pint" class="solr.IntField" omitNorms="true"/>
<fieldType name="plong" class="solr.LongField" omitNorms="true"/>
<fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
<fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
<fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
</analyzer>
</fieldType>
<fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
possible with WordDelimiterFilter in conjuncton with stemming. -->
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.TrimFilterFactory" />
<filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z])" replacement="" replace="all"
/>
</analyzer>
</fieldType>
<fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
</analyzer>
</fieldtype>
<fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
</analyzer>
</fieldtype>
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
</analyzer>
</fieldType>
<fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
</types>
<fields>
<!-- Item always present information -->
<field name="item.id" type="int" indexed="true" stored="true" multiValued="false" />
<field name="item.public" type="boolean" indexed="true" stored="true" multiValued="false" />
<field name="item.handle" type="string" indexed="true" stored="true" multiValued="false" />
<field name="item.collections" type="string" indexed="true" stored="true" multiValued="true" />
<field name="item.communities" type="string" indexed="true" stored="true" multiValued="true" />
<field name="item.lastmodified" type="date" indexed="true" stored="true" multiValued="false" />
<field name="item.submitter" type="string" indexed="true" stored="true" multiValued="false" />
<field name="item.deleted" type="boolean" indexed="true" stored="true" multiValued="false" />
<!-- Item compiled -->
<field name="item.compile" type="string" indexed="false" stored="true" multiValued="false" />
<!-- Item metadata -->
<dynamicField name="metadata.*" type="string" indexed="true" stored="true" multiValued="true" />
<!-- Dynamic fields (not used by default) -->
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
<dynamicField name="*_t" type="text" indexed="true" stored="true"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
<dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
<dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
<dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
<dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
<dynamicField name="ignored_*" type="ignored" multiValued="true"/>
<dynamicField name="attr_*" type="textgen" indexed="true" stored="true" multiValued="true"/>
<dynamicField name="random_*" type="random" />
</fields>
<uniqueKey>item.handle</uniqueKey>
<defaultSearchField>item.handle</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>
</schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
pizza
history

View File

@@ -0,0 +1,57 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-----------------------------------------------------------------------
# a couple of test stopwords to test that the words are really being
# configured from this file:
stopworda
stopwordb
#Standard english stop words taken from Lucene's StopAnalyzer
an
and
are
as
at
be
but
by
for
if
in
into
is
it
no
not
of
on
or
s
such
t
that
the
their
then
there
these
they
this
to
was
will
with

View File

@@ -0,0 +1,31 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-----------------------------------------------------------------------
#some test synonym mappings unlikely to appear in real input text
aaa => aaaa
bbb => bbbb1 bbbb2
ccc => cccc1,cccc2
a\=>a => b\=>b
a\,a => b\,b
fooaaa,baraaa,bazaaa
# Some synonym groups specific to this example
GB,gib,gigabyte,gigabytes
MB,mib,megabyte,megabytes
Television, Televisions, TV, TVs
#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
#after us won't split it into two words.
# Synonym mappings can be used for spelling correction too
pixima => pixma

View File

@@ -0,0 +1,105 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<!--
Simple transform of Solr query results to HTML
-->
<xsl:stylesheet version='1.0'
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:output media-type="text/xml; charset=utf-8" encoding="UTF-8"/>
<xsl:template match='/'>
<dri:div rend="solr-results">
<dri:div rend="solr-facets">
<xsl:apply-templates select="response/lst[@name='facet_counts']/lst[@name='facet_fields']/lst"/>
</dri:div>
<dri:div rend="solr-info">
<dri:div rend="solr-numFound">
<xsl:value-of select="response/result/@numFound"/>
</dri:div>
<dri:div rend="solr-start">
<xsl:value-of select="response/result/@start"/>
</dri:div>
<dri:div rend="solr-dspace">
<xsl:value-of select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='dspace']"/>
</dri:div>
<dri:div rend="contextPath">
<xsl:value-of select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='contextPath']"/>
</dri:div>
<dri:div rend="queryString">
<xsl:value-of select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='queryString']"/>
</dri:div>
<dri:div rend="URI">
<xsl:value-of select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='URI']"/>
</dri:div>
</dri:div>
<dri:div rend="solr-facet-queries">
<dri:list n="facet">
<xsl:apply-templates select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='fq']" mode="facet-field"/>
<xsl:apply-templates select="response/lst[@name='responseHeader']/lst[@name='params']/arr[@name='fq']/str" mode="facet-field"/>
</dri:list>
</dri:div>
<dri:div rend="solr-objects">
<dri:referenceSet type="summaryList">
<xsl:apply-templates select="response/result/doc"/>
</dri:referenceSet>
</dri:div>
</dri:div>
</xsl:template>
<xsl:template match="doc">
<dri:reference repositoryID="123456789" type="DSpace Item">
<xsl:attribute name="url">
<xsl:text>/metadata/handle/</xsl:text>
<xsl:value-of select="str[@name = 'handle']"/>
<xsl:text>/mets.xml</xsl:text>
</xsl:attribute>
</dri:reference>
</xsl:template>
<xsl:template match="lst">
<dri:list n="facet">
<dri:head>
<xsl:value-of select="@name"/>
</dri:head>
<xsl:apply-templates select="*" mode="facet"/>
</dri:list>
</xsl:template>
<xsl:template match="*" mode="facet">
<dri:item>
<dri:xref rend="facet"> <!-- TODO: I don't think rend is allowed per definition -->
<xsl:attribute name="target">
<xsl:value-of select="."/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</dri:xref>
</dri:item>
</xsl:template>
<xsl:template match="str" mode="facet-field">
<dri:item>
<xsl:value-of select="."/>
</dri:item>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,132 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<!--
Simple transform of Solr query results to HTML
-->
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:output media-type="text/html; charset=UTF-8" encoding="UTF-8"/>
<xsl:variable name="title" select="concat('Solr search results (',response/result/@numFound,' documents)')"/>
<xsl:template match='/'>
<html>
<head>
<title><xsl:value-of select="$title"/></title>
<xsl:call-template name="css"/>
</head>
<body>
<h1><xsl:value-of select="$title"/></h1>
<div class="note">
This has been formatted by the sample "example.xsl" transform -
use your own XSLT to get a nicer page
</div>
<xsl:apply-templates select="response/result/doc"/>
</body>
</html>
</xsl:template>
<xsl:template match="doc">
<xsl:variable name="pos" select="position()"/>
<div class="doc">
<table width="100%">
<xsl:apply-templates>
<xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>
</xsl:apply-templates>
</table>
</div>
</xsl:template>
<xsl:template match="doc/*[@name='score']" priority="100">
<xsl:param name="pos"></xsl:param>
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<xsl:value-of select="."/>
<xsl:if test="boolean(//lst[@name='explain'])">
<xsl:element name="a">
<!-- can't allow whitespace here -->
<xsl:attribute name="href">javascript:toggle("<xsl:value-of select="concat('exp-',$pos)" />");</xsl:attribute>?</xsl:element>
<br/>
<xsl:element name="div">
<xsl:attribute name="class">exp</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="concat('exp-',$pos)" />
</xsl:attribute>
<xsl:value-of select="//lst[@name='explain']/str[position()=$pos]"/>
</xsl:element>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="doc/arr" priority="100">
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<ul>
<xsl:for-each select="*">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</td>
</tr>
</xsl:template>
<xsl:template match="doc/*">
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<xsl:value-of select="."/>
</td>
</tr>
</xsl:template>
<xsl:template match="*"/>
<xsl:template name="css">
<script>
function toggle(id) {
var obj = document.getElementById(id);
obj.style.display = (obj.style.display != 'block') ? 'block' : 'none';
}
</script>
<style type="text/css">
body { font-family: "Lucida Grande", sans-serif }
td.name { font-style: italic; font-size:80%; }
td { vertical-align: top; }
ul { margin: 0px; margin-left: 1em; padding: 0px; }
.note { font-size:80%; }
.doc { margin-top: 1em; border-top: solid grey 1px; }
.exp { display: none; font-family: monospace; white-space: pre; }
</style>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,67 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<!--
Simple transform of Solr query results to Atom
-->
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output
method="xml"
encoding="utf-8"
media-type="text/xml; charset=UTF-8"
/>
<xsl:template match='/'>
<xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Solr Atom 1.0 Feed</title>
<subtitle>
This has been formatted by the sample "example_atom.xsl" transform -
use your own XSLT to get a nicer Atom feed.
</subtitle>
<author>
<name>Apache Solr</name>
<email>solr-user@lucene.apache.org</email>
</author>
<link rel="self" type="application/atom+xml"
href="http://localhost:8983/solr/q={$query}&amp;wt=xslt&amp;tr=atom.xsl"/>
<updated>
<xsl:value-of select="response/result/doc[position()=1]/date[@name='timestamp']"/>
</updated>
<id>tag:localhost,2007:example</id>
<xsl:apply-templates select="response/result/doc"/>
</feed>
</xsl:template>
<!-- search results xslt -->
<xsl:template match="doc">
<xsl:variable name="id" select="str[@name='id']"/>
<entry>
<title><xsl:value-of select="str[@name='name']"/></title>
<link href="http://localhost:8983/solr/select?q={$id}"/>
<id>tag:localhost,2007:<xsl:value-of select="$id"/></id>
<summary><xsl:value-of select="arr[@name='features']"/></summary>
<updated><xsl:value-of select="date[@name='timestamp']"/></updated>
</entry>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,66 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<!--
Simple transform of Solr query results to RSS
-->
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output
method="xml"
encoding="utf-8"
media-type="text/xml; charset=UTF-8"
/>
<xsl:template match='/'>
<rss version="2.0">
<channel>
<title>Example Solr RSS 2.0 Feed</title>
<link>http://localhost:8983/solr</link>
<description>
This has been formatted by the sample "example_rss.xsl" transform -
use your own XSLT to get a nicer RSS feed.
</description>
<language>en-us</language>
<docs>http://localhost:8983/solr</docs>
<xsl:apply-templates select="response/result/doc"/>
</channel>
</rss>
</xsl:template>
<!-- search results xslt -->
<xsl:template match="doc">
<xsl:variable name="id" select="str[@name='id']"/>
<xsl:variable name="timestamp" select="date[@name='timestamp']"/>
<item>
<title><xsl:value-of select="str[@name='name']"/></title>
<link>
http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
</link>
<description>
<xsl:value-of select="arr[@name='features']"/>
</description>
<pubDate><xsl:value-of select="$timestamp"/></pubDate>
<guid>
http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
</guid>
</item>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,337 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Display the luke request handler with graphs
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0"
>
<xsl:output
method="html"
encoding="UTF-8"
media-type="text/html; charset=UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>
<xsl:variable name="title">Solr Luke Request Handler Response</xsl:variable>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="solr-admin.css"/>
<link rel="icon" href="favicon.ico" type="image/ico"/>
<link rel="shortcut icon" href="favicon.ico" type="image/ico"/>
<title>
<xsl:value-of select="$title"/>
</title>
<xsl:call-template name="css"/>
</head>
<body>
<h1>
<xsl:value-of select="$title"/>
</h1>
<div class="doc">
<ul>
<xsl:if test="response/lst[@name='index']">
<li>
<a href="#index">Index Statistics</a>
</li>
</xsl:if>
<xsl:if test="response/lst[@name='fields']">
<li>
<a href="#fields">Field Statistics</a>
<ul>
<xsl:for-each select="response/lst[@name='fields']/lst">
<li>
<a href="#{@name}">
<xsl:value-of select="@name"/>
</a>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
<xsl:if test="response/lst[@name='doc']">
<li>
<a href="#doc">Document statistics</a>
</li>
</xsl:if>
</ul>
</div>
<xsl:if test="response/lst[@name='index']">
<h2><a name="index"/>Index Statistics</h2>
<xsl:apply-templates select="response/lst[@name='index']"/>
</xsl:if>
<xsl:if test="response/lst[@name='fields']">
<h2><a name="fields"/>Field Statistics</h2>
<xsl:apply-templates select="response/lst[@name='fields']"/>
</xsl:if>
<xsl:if test="response/lst[@name='doc']">
<h2><a name="doc"/>Document statistics</h2>
<xsl:apply-templates select="response/lst[@name='doc']"/>
</xsl:if>
</body>
</html>
</xsl:template>
<xsl:template match="lst">
<xsl:if test="parent::lst">
<tr>
<td colspan="2">
<div class="doc">
<xsl:call-template name="list"/>
</div>
</td>
</tr>
</xsl:if>
<xsl:if test="not(parent::lst)">
<div class="doc">
<xsl:call-template name="list"/>
</div>
</xsl:if>
</xsl:template>
<xsl:template name="list">
<xsl:if test="count(child::*)>0">
<table>
<thead>
<tr>
<th colspan="2">
<p>
<a name="{@name}"/>
</p>
<xsl:value-of select="@name"/>
</th>
</tr>
</thead>
<tbody>
<xsl:choose>
<xsl:when
test="@name='histogram'">
<tr>
<td colspan="2">
<xsl:call-template name="histogram"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</tbody>
</table>
</xsl:if>
</xsl:template>
<xsl:template name="histogram">
<div class="doc">
<xsl:call-template name="barchart">
<xsl:with-param name="max_bar_width">50</xsl:with-param>
<xsl:with-param name="iwidth">800</xsl:with-param>
<xsl:with-param name="iheight">160</xsl:with-param>
<xsl:with-param name="fill">blue</xsl:with-param>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template name="barchart">
<xsl:param name="max_bar_width"/>
<xsl:param name="iwidth"/>
<xsl:param name="iheight"/>
<xsl:param name="fill"/>
<xsl:variable name="max">
<xsl:for-each select="int">
<xsl:sort data-type="number" order="descending"/>
<xsl:if test="position()=1">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="bars">
<xsl:value-of select="count(int)"/>
</xsl:variable>
<xsl:variable name="bar_width">
<xsl:choose>
<xsl:when test="$max_bar_width &lt; ($iwidth div $bars)">
<xsl:value-of select="$max_bar_width"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$iwidth div $bars"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<table class="histogram">
<tbody>
<tr>
<xsl:for-each select="int">
<td>
<xsl:value-of select="."/>
<div class="histogram">
<xsl:attribute name="style">background-color: <xsl:value-of select="$fill"/>; width: <xsl:value-of select="$bar_width"/>px; height: <xsl:value-of select="($iheight*number(.)) div $max"/>px;</xsl:attribute>
</div>
</td>
</xsl:for-each>
</tr>
<tr>
<xsl:for-each select="int">
<td>
<xsl:value-of select="@name"/>
</td>
</xsl:for-each>
</tr>
</tbody>
</table>
</xsl:template>
<xsl:template name="keyvalue">
<xsl:choose>
<xsl:when test="@name">
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<xsl:value-of select="."/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="int|bool|long|float|double|uuid|date">
<xsl:call-template name="keyvalue"/>
</xsl:template>
<xsl:template match="arr">
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<ul>
<xsl:for-each select="child::*">
<li>
<xsl:apply-templates/>
</li>
</xsl:for-each>
</ul>
</td>
</tr>
</xsl:template>
<xsl:template match="str">
<xsl:choose>
<xsl:when test="@name='schema' or @name='index' or @name='flags'">
<xsl:call-template name="schema"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="keyvalue"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="schema">
<tr>
<td class="name">
<xsl:value-of select="@name"/>
</td>
<td class="value">
<xsl:if test="contains(.,'unstored')">
<xsl:value-of select="."/>
</xsl:if>
<xsl:if test="not(contains(.,'unstored'))">
<xsl:call-template name="infochar2string">
<xsl:with-param name="charList">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template name="infochar2string">
<xsl:param name="i">1</xsl:param>
<xsl:param name="charList"/>
<xsl:variable name="char">
<xsl:value-of select="substring($charList,$i,1)"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$char='I'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='I']"/> - </xsl:when>
<xsl:when test="$char='T'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='T']"/> - </xsl:when>
<xsl:when test="$char='S'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='S']"/> - </xsl:when>
<xsl:when test="$char='M'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='M']"/> - </xsl:when>
<xsl:when test="$char='V'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='V']"/> - </xsl:when>
<xsl:when test="$char='o'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='o']"/> - </xsl:when>
<xsl:when test="$char='p'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='p']"/> - </xsl:when>
<xsl:when test="$char='O'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='O']"/> - </xsl:when>
<xsl:when test="$char='L'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='L']"/> - </xsl:when>
<xsl:when test="$char='B'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='B']"/> - </xsl:when>
<xsl:when test="$char='C'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='C']"/> - </xsl:when>
<xsl:when test="$char='f'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='f']"/> - </xsl:when>
<xsl:when test="$char='l'">
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='l']"/> -
</xsl:when>
</xsl:choose>
<xsl:if test="not($i>=string-length($charList))">
<xsl:call-template name="infochar2string">
<xsl:with-param name="i">
<xsl:value-of select="$i+1"/>
</xsl:with-param>
<xsl:with-param name="charList">
<xsl:value-of select="$charList"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="css">
<style type="text/css">
<![CDATA[
td.name {font-style: italic; font-size:80%; }
.doc { margin: 0.5em; border: solid grey 1px; }
.exp { display: none; font-family: monospace; white-space: pre; }
div.histogram { background: none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;}
table.histogram { width: auto; vertical-align: bottom; }
table.histogram td, table.histogram th { text-align: center; vertical-align: bottom; border-bottom: 1px solid #ff9933; width: auto; }
]]>
</style>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,36 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
All (relative) paths are relative to the installation path
persistent: Save changes made via the API to this file
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="false">
<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via REST
-->
<cores adminPath="/admin/cores">
<core name="search" instanceDir="search" />
<core name="statistics" instanceDir="statistics" />
</cores>
</solr>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
All (relative) paths are relative to the installation path
persistent: Save changes made via the API to this file
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="false">
<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via REST
-->
<cores adminPath="/admin/cores">
<core name="search" instanceDir="search" />
<core name="statistics" instanceDir="statistics" />
<core name="oai" instanceDir="oai" />
</cores>
</solr>

View File

@@ -730,6 +730,10 @@ Common usage:
<mkdir dir="${dspace.dir}/solr" />
<!-- Runtime files (Could be erased - just for performing purposes) -->
<mkdir dir="${dspace.dir}/var" />
<!-- Runtime files for OAI 2.0 -->
<mkdir dir="${dspace.dir}/var/oai" />
</target>