Oops, I forget a pair of lines at the begining, the code is:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dspace="http://www.dspace.org/xmlns/dspace/dim"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
version="1.0">
<xsl:template match="@* | node()">
<!-- XXX don't copy everything by default.
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
-->
</xsl:template>
<xsl:template match="dspace:dim">
<xsl:element name="dcterms:dc">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="dspace:field[@element ='title']">
<xsl:element name="dc:title">
<xsl:choose>
<xsl:when test='contains("---", .)'>
he<xsl:value-of
select="../dspace:field[@element ='parent' and @qualifier='uri']"/>llo
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template> </xsl:stylesheet>
And the output is
here: http://berstein.cadiretes.cesca.cat:8080/oai/request?verb=ListRecords&metadataPrefix=sample-crosswalk-DIM2DC,
without the handle. It is possible that the reason is the version? I work with
an old 1.5.2...
Thanks^3!!
ricard
On May 28, 2012 at 10:50 PM helix84 <[email protected]> wrote:
> On Mon, May 28, 2012 at 10:42 PM, Ricard de la Vega <[email protected]>
> wrote:
> > Uhmmm, I'm making something more wrong, becouse I don't see nothing if I
> > put:
> >
> > "he<xsl:value-of select="../dspace:field[@element ='parent' and
> > @qualifier='uri']"/>llo", I only can see "hello". :(
>
> I copied and pasted your complete code and it works as expected. If
> you're looking at an item with title "---" you should be able to see
> "<dc:title> hehttp://hdl.handle.net/123/456llo </dc:title>" in the
> output XML.
>
> Regards,
> ~~helix84
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech