Hi,

On 27/02/15 01:16, Anja Radoicic wrote:
This helps me save the trail variable. Now I have to somehow acces the fourth or fifth element of the trail. Is there a way to do that?

Also, this is just a workaround to access the collection name. Is there another way that you would suggest to get to a collection name or community name from xsl file?

There is, it's just one more step. Look at this item here, on the demo server: http://demo.dspace.org/xmlui/handle/10673/93
Add ?XML to look at the XML, like you did for the trail: http://demo.dspace.org/xmlui/handle/10673/93?XML
Then look at this section here:

<referenceSet id="aspect.artifactbrowser.ItemViewer.referenceSet.collection-viewer" type="summaryView" n="collection-viewer">
    <reference repositoryID="10673" type="DSpace Item" url="">
        <referenceSet type="itemPageSummaryList" rend="hierarchy">
            <reference repositoryID="10673" type="DSpace Collection" url=""/>
        </referenceSet>
    </reference>
</referenceSet>


The hierarchy tells you which collection this item is in. It gives you the link to the collection's mets.xml. So have a look at that one http://demo.dspace.org/xmlui//metadata/handle/10673/22/mets.xml and you will see the title here:
<dim:field mdschema="dc" element="title">The scramble for and Partition of Africa</dim:field>

Now, to put this all together -- in the same spot where you are assigning the trail to a variable, instead do this:
obtain the URL of the collection's mets.xml file from the snippet above
load that mets file via the XSL document function (http://www.w3schools.com/xsl/func_document.asp)
from the loaded document, select the title metadata (and/or whatever else you want, eg identifier for the link).

then assign _that_ to a variable and pass it into item-view.xsl

I hope this makes sense, I don't have time to go into more detail right now, sorry.

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to