Hi all,

i have installed DSpace 3.0 and playing around with the OAI interface today.
I have added a new MetadataFormat in xoai.xml like this.

                 <Format id="epicur">
                         <Prefix>epicur</Prefix>
                         <XSLT>metadataFormats/epicur.xsl</XSLT>
                         <Namespace>urn:nbn:de:1111-2004033116</Namespace>
                         <SchemaLocation>urn:nbn:de:1111-2004033116  
http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd</SchemaLocation>
                 </Format>

Than copied over the oai_dc.xsl to epicur.xsl and modified it.
After restarting tomcat and cleaning cache i had a look at the XML  
output in my browser and it looks like i'm getting every time the  
whole output of the for-each instead of just the single value with  
this code. Output looks like this

<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl"  
href="static/style.xsl"?><OAI-PMH  
xmlns="http://www.openarchives.org/OAI/2.0/";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/  
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd";><responseDate>2012-12-13T08:46:47Z</responseDate>
     <request verb="GetRecord" identifier="oai:urntest:123456789/4"  
metadataPrefix="epicur">http://10.2.46.252:8080/oai/request</request>
     <GetRecord>
         <record>
             <header>
                 <identifier>oai:urntest:123456789/4</identifier>
                 <datestamp>2012-12-12T08:13:57Z</datestamp>
                 <setSpec>com_123456789_1</setSpec>
                 <setSpec>col_123456789_2</setSpec>
             </header>
             <metadata><epicur xmlns="urn:nbn:de:1111-2004033116"  
xmlns:xlink="http://www.w3.org/TR/xlink/";  
xmlns:mets="http://www.loc.gov/METS/";  
xmlns:doi="http://www.d-nb.de/standards/doi/";  
xmlns:hdl="http://www.d-nb.de/standards/hdl/";  
xmlns:urn="http://www.d-nb.de/standards/urn/";  
xmlns:dc="http://purl.org/dc/elements/1.1/";  
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xmlns:epicur="urn:nbn:de:1111-2004033116"  
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/  
http://www.openarchives.org/OAI/2.0/oai_dc.xsd";>
<administrative_data>
<delivery>
<update_status type="urn_new"/>
</delivery>
</administrative_data>
<record>
<title xmlns="">
Vorname, Nachname 2012-12-12T06:55:31Z 2012-12-12T06:55:31Z 2012-12-12  
http://hdl.handle.net/123456789/4 6cbfa16d-a865-4dc3-bd31-e9d4f7c12e4f  
Submitted by () on 2012-12-12T06:55:30Z&#13; No. of bitstreams: 1&#13;  
Pfirsich2.JPG: 1222120 bytes, checksum:  
c6d000aad2f44e813d5c880870d50a3e (MD5) Made available in DSpace on  
2012-12-12T06:55:31Z (GMT). No. of bitstreams: 1&#13; Pfirsich2.JPG:  
1222120 bytes, checksum: c6d000aad2f44e813d5c880870d50a3e (MD5) de  
Seria;Zähler Titel Anderer Titel Book ORIGINAL Pfirsich2.JPG  
Pfirsich2.JPG image/jpeg 1222120 c6d000aad2f44e813d5c880870d50a3e MD5  
1 LICENSE license.txt license.txt text/plain; charset=utf-8 1748  
8a4605be74aa9ea9d79846c1fba20a33 MD5 2 123456789/4  
oai:urntest:123456789/4 2012-12-12 08:13:57.672
</title>
</record>
</epicur>
</metadata>
         </record>
     </GetRecord>
</OAI-PMH>

Can you provide me a way or documentation from which i can learn how  
to select just the title and not the whole metadata?


Best regards
Marco

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
         xmlns:dim="http://www.dspace.org/xmlns/dspace/dim";
         xmlns:dc="http://purl.org/dc/elements/1.1/";
         xmlns:urn="http://www.d-nb.de/standards/urn/";
         xmlns:hdl="http://www.d-nb.de/standards/hdl/";
         xmlns:doi="http://www.d-nb.de/standards/doi/";
         xmlns:epicur="urn:nbn:de:1111-2004033116"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="urn:nbn:de:1111-2004033116  
http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd";
         xmlns:mets="http://www.loc.gov/METS/";
         xmlns:xlink="http://www.w3.org/TR/xlink/";
         version="1.0">
         <xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />

         <xsl:template match="text()"/>
         <xsl:template match="/">
                 <epicur xmlns="urn:nbn:de:1111-2004033116"
                         xmlns:epicur="urn:nbn:de:1111-2004033116"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                          
xsi:schemaLocation="urn:nbn:de:1111-2004033116  
http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd";>

                         <administrative_data>
                                 <delivery>
                                         <update_status type="urn_new"/>
                                 </delivery>
                         </administrative_data>
                         <record>

                         <xsl:call-template name="urn"/>

                         </record>
                 </epicur>
         </xsl:template>

         <xsl:template name="urn">
                 <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:template>
</xsl:stylesheet>


Mit freundlichen Grüßen
Marco Weiss


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to