Hello all,
I stumbled upon this request for enhancement by jcaffaro that was
submitted almost a year ago, and since I was asked to provide an updated
DC converter for my institution, I made a few changes to DC.xsl (see
attachment) and I include it, in case anyone wants to experiment with
this option.
I didn't create a .patch file because the code needs several
modifications (and cleanup, since I know very little of XSLT)...
For instance, to be more generic, the code should first check if the
856u begins with the CFG_SITE_URL, in order to discard the /files/XXXXX
part (this should not be applied to external URLs even if they contain
the word 'files'), but I didn't know how to get the value of
CFG_SITE_URL without calling fn:eval_bibformat, so I used a static
string of our domain instead...
Kind regards,
Theodoropoulos Theodoros
On 21/10/2010 9:47 πμ, Invenio Trac wrote:
#320: BibFormat: update "identifier" tag of Dublin Core output (DC.xsl)
-------------------------+--------------------------------------------------
Reporter: jcaffaro | Owner: jcaffaro
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: BibFormat | Version:
Keywords: oai-pmh |
-------------------------+--------------------------------------------------
Currently the<dc:identifer> tag of the Dublin Core output (for eg. as
used in OAI-PMH) references the files attached to the record, which is not
the intended usage of this tag:
http://dublincore.org/documents/dcmi-terms/#terms-identifier
http://www.ukoln.ac.uk/metadata/dcmi-ieee/identifiers/
For eg:
http://invenio-demo.cern.ch/record/10/export/xd
(or as returned through OAI-PMH:)
http://invenio-
demo.cern.ch/oai2d?verb=GetRecord&identifier=oai:cds.cern.ch:CERN-
EP-2001-094&metadataPrefix=oai_dc
{{{
<dc:subject>Particle Physics - Experimental Results</dc:subject>
<dc:identifier>http://invenio-
demo.cern.ch/record/10/files/ep-2001-094.pdf</dc:identifier>
<dc:identifier>http://invenio-
demo.cern.ch/record/10/files/ep-2001-094.ps.gz</dc:identifier>
<dc:description>A search for single sneutrino production under the
assumption that $R$-parity [...]
}}}
The<dc:identifer> would better by default simply have the URL of the
record, and a list of report numbers (037$a& 088$a). For eg:
{{{
<dc:subject>Particle Physics - Experimental Results</dc:subject>
<dc:identifier>http://invenio-demo.cern.ch/record/10</dc:identifier>
<dc:identifier>hep-ex/0201013</dc:identifier>
<dc:identifier>CERN-EP-2001-094</dc:identifier>
<dc:description>A search for single sneutrino production under the
assumption that $R$-parity [...]
}}}
<xsl:for-each select="datafield[@tag=856 and @ind1=4]">
<dc:identifier>
<xsl:variable name="myurl">
<xsl:value-of
select="subfield[@code='u']"/>
</xsl:variable>
<xsl:choose>
<xsl:when
test="contains($myurl,'lib.auth.gr') and contains($myurl,'files')">
<xsl:value-of
select="substring-before($myurl,'files')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$myurl"/>
</xsl:otherwise>
</xsl:choose>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="datafield[@tag=037]">
<dc:identifier>
<xsl:value-of select="subfield[@code='a']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="datafield[@tag=909 and @ind1='C' and
@ind2='O']">
<dc:identifier>
<xsl:value-of select="subfield[@code='o']"/>
</dc:identifier>
</xsl:for-each>