Viewing an uploaded item in DSpace 4.2 xmluiHow to add additional attributes to a sitemap?How to use wildcard pattern in DSpace xmlui sitemap?Modifying dspace discover page in xmlui mirage themeOver-riding DRI Templates using xsl in DSpaceRetaining Search String in text box using javascript cookies in DSpace 4.2 Mirage ThemeAdding a new class to DSpace 4.2 xmluiHow to display the top 50 most viewed items in DSpace statisticsdspace error blank xmlui pageDSpace logo community - DSpace 6.2 XMLUIHow to display thumbnails from harvested items in DSpace?

Wired to Wireless Doorbell

Does Rayami, First of the Fallen exile it self?

Find all files in directories named foo

Pseudo Game of Cups in Python

Does battery condition have anything to do with macbook pro performance?

Is there a connection between IT and Ghostbusters?

How to influence manager to not schedule team meetings during lunch?

Manager manipulates my leaves, what's in it for him?

What is the origin of the "being immortal sucks" trope?

Why would a fighter use the afterburner and air brakes at the same time?

Norwegian refuses EU delay (4.7h) compensation because it turned out there was nothing wrong with the aircraft

Debussy as term for bathroom?

EU compensation - fire alarm at the Flight Crew's hotel

Simulate a 1D Game-of-Life-ish Model

Calibrated Esteps Causes Extruder Skipping

How to ask a man to not take up more than one seat on public transport while avoiding conflict?

Is the Necromancer's "Half-Formed Golem" pet available for all classes?

I feel like most of my characters are the same, what can I do?

Which museums have artworks of all four ninja turtles' namesakes?

Do liquid propellant rocket engines experience thrust oscillation?

Nanomachines exist that enable Axolotl-levels of regeneration - So how can crippling injuries exist as well?

Is this quote, "just ten trading days represent 63 per cent of the returns of the past 50 years" true?

Reaction of aqueous sodium carbonate with aluminum foil

As an employer, can I compel my employees to vote?



Viewing an uploaded item in DSpace 4.2 xmlui


How to add additional attributes to a sitemap?How to use wildcard pattern in DSpace xmlui sitemap?Modifying dspace discover page in xmlui mirage themeOver-riding DRI Templates using xsl in DSpaceRetaining Search String in text box using javascript cookies in DSpace 4.2 Mirage ThemeAdding a new class to DSpace 4.2 xmluiHow to display the top 50 most viewed items in DSpace statisticsdspace error blank xmlui pageDSpace logo community - DSpace 6.2 XMLUIHow to display thumbnails from harvested items in DSpace?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















This is how the my search results page of DSpace looks like :



enter image description here
On clicking the item a new page opens up showing its description:



enter image description here



The description page opens the file upon clicking View/Open. Is it possible to directly open the file upon clicking its title on the results page? I want to skip the item description page.



As per my understanding this is the Java file which is called to render items. Do I need to make changes to this file? Or is it possible to achieve what I want by simply modifying the sitemap and xsl files?










share|improve this question
























  • What are you thinking to do if there is none or more than one file?

    – Adán
    Feb 19 '15 at 12:45











  • Currently we're only considering items containing a single file

    – Poonam Anthony
    Feb 19 '15 at 14:00






  • 1





    I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

    – euler
    Feb 19 '15 at 15:21












  • @euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

    – Poonam Anthony
    Feb 20 '15 at 6:49











  • You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

    – Antoine Snyers
    Feb 20 '15 at 15:21

















1















This is how the my search results page of DSpace looks like :



enter image description here
On clicking the item a new page opens up showing its description:



enter image description here



The description page opens the file upon clicking View/Open. Is it possible to directly open the file upon clicking its title on the results page? I want to skip the item description page.



As per my understanding this is the Java file which is called to render items. Do I need to make changes to this file? Or is it possible to achieve what I want by simply modifying the sitemap and xsl files?










share|improve this question
























  • What are you thinking to do if there is none or more than one file?

    – Adán
    Feb 19 '15 at 12:45











  • Currently we're only considering items containing a single file

    – Poonam Anthony
    Feb 19 '15 at 14:00






  • 1





    I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

    – euler
    Feb 19 '15 at 15:21












  • @euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

    – Poonam Anthony
    Feb 20 '15 at 6:49











  • You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

    – Antoine Snyers
    Feb 20 '15 at 15:21













1












1








1








This is how the my search results page of DSpace looks like :



enter image description here
On clicking the item a new page opens up showing its description:



enter image description here



The description page opens the file upon clicking View/Open. Is it possible to directly open the file upon clicking its title on the results page? I want to skip the item description page.



As per my understanding this is the Java file which is called to render items. Do I need to make changes to this file? Or is it possible to achieve what I want by simply modifying the sitemap and xsl files?










share|improve this question














This is how the my search results page of DSpace looks like :



enter image description here
On clicking the item a new page opens up showing its description:



enter image description here



The description page opens the file upon clicking View/Open. Is it possible to directly open the file upon clicking its title on the results page? I want to skip the item description page.



As per my understanding this is the Java file which is called to render items. Do I need to make changes to this file? Or is it possible to achieve what I want by simply modifying the sitemap and xsl files?







xslt sitemap dspace apache-cocoon






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 19 '15 at 11:53









Poonam AnthonyPoonam Anthony

6731 gold badge7 silver badges24 bronze badges




6731 gold badge7 silver badges24 bronze badges















  • What are you thinking to do if there is none or more than one file?

    – Adán
    Feb 19 '15 at 12:45











  • Currently we're only considering items containing a single file

    – Poonam Anthony
    Feb 19 '15 at 14:00






  • 1





    I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

    – euler
    Feb 19 '15 at 15:21












  • @euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

    – Poonam Anthony
    Feb 20 '15 at 6:49











  • You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

    – Antoine Snyers
    Feb 20 '15 at 15:21

















  • What are you thinking to do if there is none or more than one file?

    – Adán
    Feb 19 '15 at 12:45











  • Currently we're only considering items containing a single file

    – Poonam Anthony
    Feb 19 '15 at 14:00






  • 1





    I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

    – euler
    Feb 19 '15 at 15:21












  • @euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

    – Poonam Anthony
    Feb 20 '15 at 6:49











  • You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

    – Antoine Snyers
    Feb 20 '15 at 15:21
















What are you thinking to do if there is none or more than one file?

– Adán
Feb 19 '15 at 12:45





What are you thinking to do if there is none or more than one file?

– Adán
Feb 19 '15 at 12:45













Currently we're only considering items containing a single file

– Poonam Anthony
Feb 19 '15 at 14:00





Currently we're only considering items containing a single file

– Poonam Anthony
Feb 19 '15 at 14:00




1




1





I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

– euler
Feb 19 '15 at 15:21






I believe you have to edit item-list.xsl for browse and discovery.xsl for search results. discover.xsl by the way is found under the themes/dri2xhtml-alt/aspect/artifactbrowser. It will save you time during an upgrade if you'll just copy the relevant templates into Mirage.xsl, preferably under the modules directory mentioned here.

– euler
Feb 19 '15 at 15:21














@euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

– Poonam Anthony
Feb 20 '15 at 6:49





@euler I commented out lines 183 to 192 in discovery.xsl. As a result the action upon clicking the Item name is suppressed. Then I copied lines 505 to 524 from item-view.xsl after line 182 in discovery.xsl. That didn't help. Could you tell me where I'm going wrong?

– Poonam Anthony
Feb 20 '15 at 6:49













You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

– Antoine Snyers
Feb 20 '15 at 15:21





You need to adjust the xpath inside the "view-open" template to apply it on the $metsDoc. There's an example right there in the code you commented out in discovery.xsl.

– Antoine Snyers
Feb 20 '15 at 15:21












3 Answers
3






active

oldest

votes


















3
















The code that generates the thumbnail image is here.



https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl#L34-L47



You could create similar logic to create an href to the original bitstream.



Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. You should see the information that will point you to the original bitstream.






share|improve this answer



























  • Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

    – Poonam Anthony
    Feb 20 '15 at 6:56











  • according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

    – Antoine Snyers
    Feb 20 '15 at 8:14











  • @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

    – Poonam Anthony
    Feb 20 '15 at 10:16











  • Dead link, kindly update.

    – Ayuka
    Mar 28 at 8:46











  • Link has been updated

    – terrywb
    Mar 28 at 14:42


















2
















As was said in the comments, the xsl template to modify is the "itemSummaryList" in discovery.xsl



Replace that href value with $metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"





 <xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="dri:list[@n=(concat($handle, ':dc.title')) and descendant::text()]">
<xsl:apply-templates select="dri:list[@n=(concat($handle, ':dc.title'))]/dri:item"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>





share|improve this answer

























  • I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

    – Poonam Anthony
    Feb 25 '15 at 9:36












  • apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

    – Poonam Anthony
    Mar 2 '15 at 11:52












  • that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

    – Antoine Snyers
    Mar 2 '15 at 16:39












  • I was able to solve the problem :) I'm posting an answer

    – Poonam Anthony
    Mar 7 '15 at 4:27


















1
















I was able to achieve what I wanted with help from Antoine Snyers, terrywb and this link. As pointed out by terrywb the information which I needed to read, i.e, the bitstream address of the uploaded file, was stored in the metsDoc. Here's a screenshot of my metsDoc with the fileSec expanded:



enter image description here



To be able to access the fileSec of the metsDoc I changed this line in discovery.xsl and this line in common.xsl to <xsl:text>?sections=dmdSec,fileSec&amp;fileGrpTypes=ORIGINAL,THUMBNAIL</xsl:text>.



Then I added/modified the following code to the itemSummaryList in discovery.xsl so that the title hyperlink now points to the file bitstream.



<xsl:variable name="filetype">
<xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']"/>
</xsl:variable>

<xsl:variable name="fileurl">
<xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
</xsl:variable>


<div class="artifact-title">

<xsl:element name="a">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="$metsDoc/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/@withdrawn">
<xsl:value-of select="$metsDoc/mets:METS/@OBJEDIT"/>
</xsl:when>


<xsl:when test="$filetype">
<xsl:value-of select="$fileurl"/>
</xsl:when>

</xsl:choose>

</xsl:attribute>


Similarly, I also made changes to item-list.xsl file, and added this line <xsl:apply-templates select="mets:fileSec/mets:fileGrp[@USE='CONTENT']"
mode="itemSummaryList-DIM"/>
to the template itemSummaryList-DIM.



So finally I got my desired result:
enter image description here



As visible in the inspector, the href attribute of the title now points to the original bitstream of the file :)






share|improve this answer



























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28605712%2fviewing-an-uploaded-item-in-dspace-4-2-xmlui%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3
















    The code that generates the thumbnail image is here.



    https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl#L34-L47



    You could create similar logic to create an href to the original bitstream.



    Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. You should see the information that will point you to the original bitstream.






    share|improve this answer



























    • Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

      – Poonam Anthony
      Feb 20 '15 at 6:56











    • according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

      – Antoine Snyers
      Feb 20 '15 at 8:14











    • @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

      – Poonam Anthony
      Feb 20 '15 at 10:16











    • Dead link, kindly update.

      – Ayuka
      Mar 28 at 8:46











    • Link has been updated

      – terrywb
      Mar 28 at 14:42















    3
















    The code that generates the thumbnail image is here.



    https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl#L34-L47



    You could create similar logic to create an href to the original bitstream.



    Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. You should see the information that will point you to the original bitstream.






    share|improve this answer



























    • Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

      – Poonam Anthony
      Feb 20 '15 at 6:56











    • according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

      – Antoine Snyers
      Feb 20 '15 at 8:14











    • @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

      – Poonam Anthony
      Feb 20 '15 at 10:16











    • Dead link, kindly update.

      – Ayuka
      Mar 28 at 8:46











    • Link has been updated

      – terrywb
      Mar 28 at 14:42













    3














    3










    3









    The code that generates the thumbnail image is here.



    https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl#L34-L47



    You could create similar logic to create an href to the original bitstream.



    Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. You should see the information that will point you to the original bitstream.






    share|improve this answer















    The code that generates the thumbnail image is here.



    https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl#L34-L47



    You could create similar logic to create an href to the original bitstream.



    Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. You should see the information that will point you to the original bitstream.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 28 at 14:41

























    answered Feb 19 '15 at 16:37









    terrywbterrywb

    2,5751 gold badge11 silver badges31 bronze badges




    2,5751 gold badge11 silver badges31 bronze badges















    • Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

      – Poonam Anthony
      Feb 20 '15 at 6:56











    • according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

      – Antoine Snyers
      Feb 20 '15 at 8:14











    • @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

      – Poonam Anthony
      Feb 20 '15 at 10:16











    • Dead link, kindly update.

      – Ayuka
      Mar 28 at 8:46











    • Link has been updated

      – terrywb
      Mar 28 at 14:42

















    • Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

      – Poonam Anthony
      Feb 20 '15 at 6:56











    • according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

      – Antoine Snyers
      Feb 20 '15 at 8:14











    • @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

      – Poonam Anthony
      Feb 20 '15 at 10:16











    • Dead link, kindly update.

      – Ayuka
      Mar 28 at 8:46











    • Link has been updated

      – terrywb
      Mar 28 at 14:42
















    Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

    – Poonam Anthony
    Feb 20 '15 at 6:56





    Hi thanks for your answer. But I didn't get Look at the XML in /metadata/handle/xxx/yyy/mets.xml where xxx/yyy is your item handle. Could you please explain. Where do I find /metadata/handle/xxx/yyy/mets.xml

    – Poonam Anthony
    Feb 20 '15 at 6:56













    according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

    – Antoine Snyers
    Feb 20 '15 at 8:14





    according to your screenshot, at 10.17.250.230:8080/xmlui/metadata/handle/123456789/3/mets.xml

    – Antoine Snyers
    Feb 20 '15 at 8:14













    @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

    – Poonam Anthony
    Feb 20 '15 at 10:16





    @AntoineSnyers what I understood is that these lines of code are used to open the file in view mode. Can these lines be of help?

    – Poonam Anthony
    Feb 20 '15 at 10:16













    Dead link, kindly update.

    – Ayuka
    Mar 28 at 8:46





    Dead link, kindly update.

    – Ayuka
    Mar 28 at 8:46













    Link has been updated

    – terrywb
    Mar 28 at 14:42





    Link has been updated

    – terrywb
    Mar 28 at 14:42













    2
















    As was said in the comments, the xsl template to modify is the "itemSummaryList" in discovery.xsl



    Replace that href value with $metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"





     <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:value-of select="$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
    </xsl:attribute>
    <xsl:choose>
    <xsl:when test="dri:list[@n=(concat($handle, ':dc.title')) and descendant::text()]">
    <xsl:apply-templates select="dri:list[@n=(concat($handle, ':dc.title'))]/dri:item"/>
    </xsl:when>
    <xsl:otherwise>
    <i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:element>





    share|improve this answer

























    • I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

      – Poonam Anthony
      Feb 25 '15 at 9:36












    • apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

      – Poonam Anthony
      Mar 2 '15 at 11:52












    • that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

      – Antoine Snyers
      Mar 2 '15 at 16:39












    • I was able to solve the problem :) I'm posting an answer

      – Poonam Anthony
      Mar 7 '15 at 4:27















    2
















    As was said in the comments, the xsl template to modify is the "itemSummaryList" in discovery.xsl



    Replace that href value with $metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"





     <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:value-of select="$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
    </xsl:attribute>
    <xsl:choose>
    <xsl:when test="dri:list[@n=(concat($handle, ':dc.title')) and descendant::text()]">
    <xsl:apply-templates select="dri:list[@n=(concat($handle, ':dc.title'))]/dri:item"/>
    </xsl:when>
    <xsl:otherwise>
    <i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:element>





    share|improve this answer

























    • I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

      – Poonam Anthony
      Feb 25 '15 at 9:36












    • apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

      – Poonam Anthony
      Mar 2 '15 at 11:52












    • that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

      – Antoine Snyers
      Mar 2 '15 at 16:39












    • I was able to solve the problem :) I'm posting an answer

      – Poonam Anthony
      Mar 7 '15 at 4:27













    2














    2










    2









    As was said in the comments, the xsl template to modify is the "itemSummaryList" in discovery.xsl



    Replace that href value with $metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"





     <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:value-of select="$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
    </xsl:attribute>
    <xsl:choose>
    <xsl:when test="dri:list[@n=(concat($handle, ':dc.title')) and descendant::text()]">
    <xsl:apply-templates select="dri:list[@n=(concat($handle, ':dc.title'))]/dri:item"/>
    </xsl:when>
    <xsl:otherwise>
    <i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:element>





    share|improve this answer













    As was said in the comments, the xsl template to modify is the "itemSummaryList" in discovery.xsl



    Replace that href value with $metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"





     <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:value-of select="$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
    </xsl:attribute>
    <xsl:choose>
    <xsl:when test="dri:list[@n=(concat($handle, ':dc.title')) and descendant::text()]">
    <xsl:apply-templates select="dri:list[@n=(concat($handle, ':dc.title'))]/dri:item"/>
    </xsl:when>
    <xsl:otherwise>
    <i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:element>






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 24 '15 at 7:40









    Antoine SnyersAntoine Snyers

    6043 silver badges7 bronze badges




    6043 silver badges7 bronze badges















    • I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

      – Poonam Anthony
      Feb 25 '15 at 9:36












    • apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

      – Poonam Anthony
      Mar 2 '15 at 11:52












    • that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

      – Antoine Snyers
      Mar 2 '15 at 16:39












    • I was able to solve the problem :) I'm posting an answer

      – Poonam Anthony
      Mar 7 '15 at 4:27

















    • I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

      – Poonam Anthony
      Feb 25 '15 at 9:36












    • apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

      – Poonam Anthony
      Mar 2 '15 at 11:52












    • that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

      – Antoine Snyers
      Mar 2 '15 at 16:39












    • I was able to solve the problem :) I'm posting an answer

      – Poonam Anthony
      Mar 7 '15 at 4:27
















    I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

    – Poonam Anthony
    Feb 25 '15 at 9:36






    I made the change which you suggested, but it didn't work. So I then replaced the href value in the corresponding line in items-list.xsl with "$metsDoc//mets:FLocat[@LOCTYPE='URL']/@xlink:href". Now upon clicking the file name, the same page i.e the /xmlui/discover page is getting reloaded. Maybe the link is not getting resolved properly.

    – Poonam Anthony
    Feb 25 '15 at 9:36














    apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

    – Poonam Anthony
    Mar 2 '15 at 11:52






    apparently the files discovery.xsl and items-list.xsl can only access the fileGrp=THUMBNAIL section of the metsDoc. I changed this line in discovery.xsl to include fileGrpTypes=ORIGINAL,THUMBNAIL and also made similar change to this line in common.xsl. But it still doesn't read the xpath. Any suggestions?

    – Poonam Anthony
    Mar 2 '15 at 11:52














    that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

    – Antoine Snyers
    Mar 2 '15 at 16:39






    that should be right, could you show us the contents of the $metsDoc? (in a pastebin or something) you can view it in your browser or by doing a copy-of and inspecting the HTML of the page.

    – Antoine Snyers
    Mar 2 '15 at 16:39














    I was able to solve the problem :) I'm posting an answer

    – Poonam Anthony
    Mar 7 '15 at 4:27





    I was able to solve the problem :) I'm posting an answer

    – Poonam Anthony
    Mar 7 '15 at 4:27











    1
















    I was able to achieve what I wanted with help from Antoine Snyers, terrywb and this link. As pointed out by terrywb the information which I needed to read, i.e, the bitstream address of the uploaded file, was stored in the metsDoc. Here's a screenshot of my metsDoc with the fileSec expanded:



    enter image description here



    To be able to access the fileSec of the metsDoc I changed this line in discovery.xsl and this line in common.xsl to <xsl:text>?sections=dmdSec,fileSec&amp;fileGrpTypes=ORIGINAL,THUMBNAIL</xsl:text>.



    Then I added/modified the following code to the itemSummaryList in discovery.xsl so that the title hyperlink now points to the file bitstream.



    <xsl:variable name="filetype">
    <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']"/>
    </xsl:variable>

    <xsl:variable name="fileurl">
    <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
    </xsl:variable>


    <div class="artifact-title">

    <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:choose>
    <xsl:when test="$metsDoc/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/@withdrawn">
    <xsl:value-of select="$metsDoc/mets:METS/@OBJEDIT"/>
    </xsl:when>


    <xsl:when test="$filetype">
    <xsl:value-of select="$fileurl"/>
    </xsl:when>

    </xsl:choose>

    </xsl:attribute>


    Similarly, I also made changes to item-list.xsl file, and added this line <xsl:apply-templates select="mets:fileSec/mets:fileGrp[@USE='CONTENT']"
    mode="itemSummaryList-DIM"/>
    to the template itemSummaryList-DIM.



    So finally I got my desired result:
    enter image description here



    As visible in the inspector, the href attribute of the title now points to the original bitstream of the file :)






    share|improve this answer





























      1
















      I was able to achieve what I wanted with help from Antoine Snyers, terrywb and this link. As pointed out by terrywb the information which I needed to read, i.e, the bitstream address of the uploaded file, was stored in the metsDoc. Here's a screenshot of my metsDoc with the fileSec expanded:



      enter image description here



      To be able to access the fileSec of the metsDoc I changed this line in discovery.xsl and this line in common.xsl to <xsl:text>?sections=dmdSec,fileSec&amp;fileGrpTypes=ORIGINAL,THUMBNAIL</xsl:text>.



      Then I added/modified the following code to the itemSummaryList in discovery.xsl so that the title hyperlink now points to the file bitstream.



      <xsl:variable name="filetype">
      <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']"/>
      </xsl:variable>

      <xsl:variable name="fileurl">
      <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
      </xsl:variable>


      <div class="artifact-title">

      <xsl:element name="a">
      <xsl:attribute name="href">
      <xsl:choose>
      <xsl:when test="$metsDoc/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/@withdrawn">
      <xsl:value-of select="$metsDoc/mets:METS/@OBJEDIT"/>
      </xsl:when>


      <xsl:when test="$filetype">
      <xsl:value-of select="$fileurl"/>
      </xsl:when>

      </xsl:choose>

      </xsl:attribute>


      Similarly, I also made changes to item-list.xsl file, and added this line <xsl:apply-templates select="mets:fileSec/mets:fileGrp[@USE='CONTENT']"
      mode="itemSummaryList-DIM"/>
      to the template itemSummaryList-DIM.



      So finally I got my desired result:
      enter image description here



      As visible in the inspector, the href attribute of the title now points to the original bitstream of the file :)






      share|improve this answer



























        1














        1










        1









        I was able to achieve what I wanted with help from Antoine Snyers, terrywb and this link. As pointed out by terrywb the information which I needed to read, i.e, the bitstream address of the uploaded file, was stored in the metsDoc. Here's a screenshot of my metsDoc with the fileSec expanded:



        enter image description here



        To be able to access the fileSec of the metsDoc I changed this line in discovery.xsl and this line in common.xsl to <xsl:text>?sections=dmdSec,fileSec&amp;fileGrpTypes=ORIGINAL,THUMBNAIL</xsl:text>.



        Then I added/modified the following code to the itemSummaryList in discovery.xsl so that the title hyperlink now points to the file bitstream.



        <xsl:variable name="filetype">
        <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']"/>
        </xsl:variable>

        <xsl:variable name="fileurl">
        <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
        </xsl:variable>


        <div class="artifact-title">

        <xsl:element name="a">
        <xsl:attribute name="href">
        <xsl:choose>
        <xsl:when test="$metsDoc/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/@withdrawn">
        <xsl:value-of select="$metsDoc/mets:METS/@OBJEDIT"/>
        </xsl:when>


        <xsl:when test="$filetype">
        <xsl:value-of select="$fileurl"/>
        </xsl:when>

        </xsl:choose>

        </xsl:attribute>


        Similarly, I also made changes to item-list.xsl file, and added this line <xsl:apply-templates select="mets:fileSec/mets:fileGrp[@USE='CONTENT']"
        mode="itemSummaryList-DIM"/>
        to the template itemSummaryList-DIM.



        So finally I got my desired result:
        enter image description here



        As visible in the inspector, the href attribute of the title now points to the original bitstream of the file :)






        share|improve this answer













        I was able to achieve what I wanted with help from Antoine Snyers, terrywb and this link. As pointed out by terrywb the information which I needed to read, i.e, the bitstream address of the uploaded file, was stored in the metsDoc. Here's a screenshot of my metsDoc with the fileSec expanded:



        enter image description here



        To be able to access the fileSec of the metsDoc I changed this line in discovery.xsl and this line in common.xsl to <xsl:text>?sections=dmdSec,fileSec&amp;fileGrpTypes=ORIGINAL,THUMBNAIL</xsl:text>.



        Then I added/modified the following code to the itemSummaryList in discovery.xsl so that the title hyperlink now points to the file bitstream.



        <xsl:variable name="filetype">
        <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']"/>
        </xsl:variable>

        <xsl:variable name="fileurl">
        <xsl:value-of select="$metsDoc/mets:METS/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
        </xsl:variable>


        <div class="artifact-title">

        <xsl:element name="a">
        <xsl:attribute name="href">
        <xsl:choose>
        <xsl:when test="$metsDoc/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/@withdrawn">
        <xsl:value-of select="$metsDoc/mets:METS/@OBJEDIT"/>
        </xsl:when>


        <xsl:when test="$filetype">
        <xsl:value-of select="$fileurl"/>
        </xsl:when>

        </xsl:choose>

        </xsl:attribute>


        Similarly, I also made changes to item-list.xsl file, and added this line <xsl:apply-templates select="mets:fileSec/mets:fileGrp[@USE='CONTENT']"
        mode="itemSummaryList-DIM"/>
        to the template itemSummaryList-DIM.



        So finally I got my desired result:
        enter image description here



        As visible in the inspector, the href attribute of the title now points to the original bitstream of the file :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 '15 at 4:57









        Poonam AnthonyPoonam Anthony

        6731 gold badge7 silver badges24 bronze badges




        6731 gold badge7 silver badges24 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28605712%2fviewing-an-uploaded-item-in-dspace-4-2-xmlui%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript